]> git.saurik.com Git - wxWidgets.git/commitdiff
Merge the new wxWebView classes from the SOC2011_WEBVIEW branch.
authorSteve Lamerton <steve.lamerton@gmail.com>
Sat, 10 Sep 2011 18:09:12 +0000 (18:09 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sat, 10 Sep 2011 18:09:12 +0000 (18:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

54 files changed:
build/bakefiles/build_cfg.bkl
build/bakefiles/common.bkl
build/bakefiles/config.bkl
build/bakefiles/files.bkl
build/bakefiles/monolithic.bkl
build/bakefiles/multilib.bkl
build/bakefiles/wxpresets/presets/wx.bkl
build/bakefiles/wxwin.py
configure.in
docs/changes.txt
docs/doxygen/groups/class_webview.h [new file with mode: 0644]
docs/doxygen/mainpages/const_cpp.h
docs/doxygen/mainpages/const_wxusedef.h
docs/doxygen/mainpages/libs.h
docs/doxygen/mainpages/samples.h
include/wx/dlimpexp.h
include/wx/gtk/webview_webkit.h [new file with mode: 0644]
include/wx/gtk/webviewhistoryitem_webkit.h [new file with mode: 0644]
include/wx/msw/chkconf.h
include/wx/msw/missing.h
include/wx/msw/setup0.h
include/wx/msw/webview_ie.h [new file with mode: 0644]
include/wx/msw/webviewhistoryitem_ie.h [new file with mode: 0644]
include/wx/osx/webview_webkit.h [new file with mode: 0644]
include/wx/osx/webviewhistoryitem_webkit.h [new file with mode: 0644]
include/wx/setup_inc.h
include/wx/webview.h [new file with mode: 0644]
include/wx/webviewarchivehandler.h [new file with mode: 0644]
interface/wx/webview.h [new file with mode: 0644]
interface/wx/webviewarchivehandler.h [new file with mode: 0644]
samples/samples.bkl
samples/webview/Makefile.in [new file with mode: 0644]
samples/webview/makefile.bcc [new file with mode: 0644]
samples/webview/makefile.gcc [new file with mode: 0644]
samples/webview/makefile.unx [new file with mode: 0644]
samples/webview/makefile.vc [new file with mode: 0644]
samples/webview/makefile.wat [new file with mode: 0644]
samples/webview/refresh.xpm [new file with mode: 0644]
samples/webview/stop.xpm [new file with mode: 0644]
samples/webview/webview.bkl [new file with mode: 0644]
samples/webview/webview.cpp [new file with mode: 0644]
samples/webview/webview.dsp [new file with mode: 0644]
samples/webview/webview_vc7.vcproj [new file with mode: 0644]
samples/webview/webview_vc8.vcproj [new file with mode: 0644]
samples/webview/webview_vc9.vcproj [new file with mode: 0644]
samples/webview/wxlogo.xpm [new file with mode: 0644]
setup.h.in
src/common/webview.cpp [new file with mode: 0644]
src/common/webviewarchivehandler.cpp [new file with mode: 0644]
src/gtk/webview_webkit.cpp [new file with mode: 0644]
src/msw/webview_ie.cpp [new file with mode: 0644]
src/osx/webview_webkit.mm [new file with mode: 0644]
tests/controls/webtest.cpp [new file with mode: 0644]
tests/test.bkl

index 00b2d33f5cd5677e452ac894eccbab10ed5cf020..808e249cb4defd9d0a8abe28ecb11d937c94e12b 100644 (file)
@@ -39,6 +39,7 @@
                 @echo USE_THREADS=$(USE_THREADS) >>$(BUILD_CFG_FILE)
                 @echo USE_GUI=$(USE_GUI) >>$(BUILD_CFG_FILE)
                 @echo USE_HTML=$(USE_HTML) >>$(BUILD_CFG_FILE)
+                @echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE)
                 @echo USE_MEDIA=$(USE_MEDIA) >>$(BUILD_CFG_FILE)
                 @echo USE_OPENGL=$(USE_OPENGL) >>$(BUILD_CFG_FILE)
                 @echo USE_QA=$(USE_QA) >>$(BUILD_CFG_FILE)
index 8948042f2bdb687f87da1a303f0952a89965c46b..a3ff845849701db60a93df5b2ad1c3f6577b8be5 100644 (file)
     <set var="WXLIB_STC">
         <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('stc')))</if>
     </set>
-
+    <set var="WXLIB_WEBVIEW">
+        <if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('webview')))</if>
+    </set>
     <set var="WXLIB_MONO">
         <if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
     </set>
index ee14b32871d42795f06272bb34c1a0484e64e15f..28f74af6a5ede9b04b2b22dd787d5552558ef6ed 100644 (file)
@@ -200,6 +200,14 @@ Default is to use debug CRT if and only if BUILD==debug.
         </description>
     </option>
 
+    <option name="USE_WEBVIEW">
+        <values>0,1</values>
+        <default-value>1</default-value>
+        <description>
+            Build wxWebView library (USE_GUI must be 1)?
+        </description>
+    </option>
+    
     <option name="USE_MEDIA">
         <values>0,1</values>
         <default-value>1</default-value>
@@ -480,6 +488,7 @@ Set the version of your Mingw installation here.
         <set var="USE_RICHTEXT">1</set>
         <set var="USE_STC">1</set>
         <set var="USE_HTML">1</set>
+        <set var="USE_WEBVIEW">1</set>
         <set var="USE_MEDIA">1</set>
         <set var="USE_XRC">1</set>
         <set var="USE_OPENGL">1</set>
index ec23135fa0bcf2f1da31a170f55e621f899951ad..3a7fb6df0d6b7c91c94c27db588d1b56f7649ba9 100644 (file)
@@ -3353,7 +3353,40 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     $(MSW_HTML_HDR)
 </set>
 
+<!-- ====================================================================== -->
+<!--                                wxWEBVIEW                               -->
+<!-- ====================================================================== -->
 
+<set var="WEBVIEW_SRC_PLATFORM">
+    <if cond="TOOLKIT=='MSW'">src/msw/webview_ie.cpp</if>
+    <if cond="PLATFORM_UNIX=='1'">src/gtk/webview_webkit.cpp</if>
+    <if cond="PLATFORM_MACOSX=='1'">src/osx/webview_webkit.mm</if>
+</set>
+<set var="WEBVIEW_SRC" hints="files">
+    $(WEBVIEW_SRC_PLATFORM)
+    src/common/webview.cpp
+    src/common/webviewarchivehandler.cpp
+</set>
+
+<set var="WEBVIEW_HDR_PLATFORM" hints="files">
+    <if cond="TOOLKIT=='MSW'">
+        wx/msw/webviewhistoryitem_ie.h
+        wx/msw/webview_ie.h
+    </if>
+    <if cond="PLATFORM_UNIX=='1'">
+        wx/gtk/webviewhistoryitem_webkit.h
+        wx/gtk/webview_webkit.h
+    </if>
+    <if cond="PLATFORM_MACOSX=='1'">
+        wx/osx/webviewhistoryitem_webkit.h
+        wx/osx/webview_webkit.h
+    </if>
+</set>
+<set var="WEBVIEW_HDR" hints="files">
+    $(WEBVIEW_HDR_PLATFORM)
+    wx/webview.h
+    wx/webviewarchivehandler.h
+</set>
 
 <!-- ====================================================================== -->
 <!--                                wxXRC                                   -->
@@ -3958,7 +3991,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
             $(GUI_CORE_HEADERS)
             $(ADVANCED_HDR) $(MEDIA_HDR) $(HTML_HDR)
             $(OPENGL_HDR) $(QA_HDR) $(XRC_HDR) $(AUI_HDR) $(PROPGRID_HDR)
-            $(RIBBON_HDR) $(RICHTEXT_HDR) $(STC_HDR)
+            $(RIBBON_HDR) $(RICHTEXT_HDR) $(STC_HDR) ${WEBVIEW_HDR}
         </if>
     </set>
 
index 1ad6d4af0247504f858b61d2b918b3fb4eca0b9e..b1f7c23fd569ac3b964c292a4aa20cf7e2f568dc 100644 (file)
@@ -4,9 +4,9 @@
 
     <set var="MONOLIB_GUI_SRC">
         <if cond="USE_GUI=='1'">
-            $(CORE_SRC) $(ADVANCED_SRC) $(MEDIA_SRC) $(HTML_SRC) $(QA_SRC)
-            $(XRC_SRC) $(AUI_SRC) $(PROPGRID_SRC) $(RIBBON_SRC) $(RICHTEXT_SRC)
-            $(STC_SRC)
+            $(CORE_SRC) $(ADVANCED_SRC) $(MEDIA_SRC) $(HTML_SRC) $(WEBVIEW_SRC)
+            $(QA_SRC) $(XRC_SRC) $(AUI_SRC) $(PROPGRID_SRC) $(RIBBON_SRC)
+            $(RICHTEXT_SRC) $(STC_SRC)
         </if>
     </set>
     <set var="MONOLIB_SRC">
index 2217008017f15536611ce72967e0f32246559d67..545ca64ce76d4ad286b408027e526ecd1d3a735c 100644 (file)
 
     <set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">html=htmllib+htmldll</set>
 
+    <!-- ================================================================ -->
+    <!--                               wxWEBVIEW                          -->
+    <!-- ================================================================ -->
+
+    <dll id="webviewdll" template="wx_dll"
+         cond="SHARED=='1' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'">
+        <define>WXUSINGDLL</define>
+        <define>WXMAKINGDLL_WEBVIEW</define>
+        <sources>$(WEBVIEW_SRC)</sources>
+        <library>coredll</library>
+        <library>basedll</library>
+        <msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
+    </dll>
+
+    <lib id="webviewlib" template="wx_lib"
+         cond="SHARED=='0' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'">
+        <sources>$(WEBVIEW_SRC)</sources>
+        <msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
+    </lib>
+
+    <wxshortcut id="wxwebview" cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'"/>
+
+    <set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">webview=webviewlib+webviewdll</set>
+
     <!-- ================================================================ -->
     <!--                             OpenGL                               -->
     <!-- ================================================================ -->
index ec262c9e096e1843d20a7c56a83940f0f3a768d8..5ca63850a9caeb4c19f7e65a826feb405f6be3fc 100644 (file)
@@ -89,6 +89,7 @@
  NOTE: as a reference here is a list of all wxWidgets libraries satisfying
        the dependency constraints mentioned in <wx-lib> description:
 
+        <wx-lib>webview</wx-lib>
         <wx-lib>richtext</wx-lib>
         <wx-lib>aui</wx-lib>
         <wx-lib>ribbon</wx-lib>
                          tag definitions.
     -->
     <set var="WX_LIB_LIST">
-        base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc
+        base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc webview
     </set>
 
     <!-- if you define this variable to 0 before including wx presets, the
index 8f5cb31f8a7393ee432474f7a19671e6c8b29ccd..989942ace2394fc640a3b95b0b4de49df6f3b6cd 100644 (file)
@@ -39,12 +39,12 @@ def mk_wxid(id):
 
 
 # All libs that are part of the main library:
-MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net',
+MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net', 'webview',
              'media', 'qa', 'xrc', 'aui', 'ribbon', 'propgrid', 'richtext', 'stc']
 # List of library names/ids for categories with different names:
 LIBS_NOGUI = ['xml', 'net']
 LIBS_GUI   = ['core', 'adv', 'html', 'gl', 'qa', 'xrc', 'media',
-              'aui', 'propgrid', 'richtext', 'stc', 'ribbon']
+              'aui', 'propgrid', 'richtext', 'stc', 'ribbon', 'webview']
 # Additional libraries that must be linked in:
 EXTRALIBS = {
     'gl' : '$(EXTRALIBS_OPENGL)',
index 310d0e3783656e0a75379a9b9c21fc157d2f7434..d639c276386964526cd1ac2a87d01238b41f40c9 100644 (file)
@@ -850,6 +850,7 @@ WX_ARG_FEATURE(richtext,    [  --enable-richtext       use wxRichTextCtrl], wxUS
 WX_ARG_FEATURE(postscript,  [  --enable-postscript     use wxPostscriptDC device context (default for gtk+)], wxUSE_POSTSCRIPT)
 WX_ARG_FEATURE(printarch,   [  --enable-printarch      use printing architecture], wxUSE_PRINTING_ARCHITECTURE)
 WX_ARG_FEATURE(svg,         [  --enable-svg            use wxSVGFileDC device context], wxUSE_SVG)
+WX_ARG_FEATURE(webview,     [  --enable-webview        use wxWebView library], wxUSE_WEBVIEW)
 
 dnl wxDC is implemented in terms of wxGraphicsContext in wxOSX so the latter
 dnl can't be disabled, don't even provide an option to do it
@@ -1047,6 +1048,7 @@ WX_ARG_FEATURE(dragimage,   [  --enable-dragimage      use wxDragImage], wxUSE_D
 WX_ARG_FEATURE(accessibility,[  --enable-accessibility  enable accessibility support], wxUSE_ACCESSIBILITY)
 WX_ARG_FEATURE(uiactionsim,  [  --enable-uiactionsim    use wxUIActionSimulator (experimental)], wxUSE_UIACTIONSIMULATOR)
 WX_ARG_FEATURE(dctransform,  [  --enable-dctransform    use wxDC::SetTransformMatrix and related], wxUSE_DC_TRANSFORM_MATRIX)
+WX_ARG_FEATURE(webviewwebkit,[  --enable-webview-webkit use wxWebView WebKit backend], wxUSE_WEBVIEW_WEBKIT)
 
 dnl ---------------------------------------------------------------------------
 dnl support for image formats that do not rely on external library
@@ -1071,6 +1073,7 @@ WX_ARG_FEATURE(ps-in-msw,   [  --enable-ps-in-msw      use PS printing in wxMSW
 WX_ARG_FEATURE(ownerdrawn,  [  --enable-ownerdrawn     use owner drawn controls (Win32 and OS/2 only)], wxUSE_OWNER_DRAWN)
 WX_ARG_FEATURE(uxtheme,     [  --enable-uxtheme        enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME)
 WX_ARG_FEATURE(wxdib,       [  --enable-wxdib          use wxDIB class (Win32 only)], wxUSE_DIB)
+WX_ARG_FEATURE(webviewie,   [  --enable-webview-ie     use wxWebView IE backend (Win32 only)], wxUSE_WEBVIEW_IE)
 
 dnl this one is not really MSW-specific but it exists mainly to be turned off
 dnl under MSW, it should be off by default on the other platforms
@@ -7363,6 +7366,74 @@ if test "$wxUSE_RICHTEXT" = "yes"; then
     SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS richtext"
 fi
 
+USE_WEBVIEW=0
+if test "$wxUSE_WEBVIEW" = "yes"; then
+   AC_DEFINE(wxUSE_WEBVIEW)
+   USE_WEBVIEW=1
+   SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview"
+
+   if test "$wxUSE_WEBVIEW_WEBKIT" = "yes" -a "$wxUSE_GTK" = 1; then
+       AC_DEFINE(wxUSE_WEBVIEW_WEBKIT)
+       AC_MSG_CHECKING([for webkitgtk libraries])
+       WX_PATH_FIND_LIBRARIES([$SEARCH_LIB],webkitgtk-1.0)
+       if test "$ac_find_libraries" != "" ; then
+           WX_LINK_PATH_EXIST([$ac_find_libraries],[$LDFLAGS])
+           if test "$ac_path_to_link" != " -L/usr/lib" ; then
+               LDFLAGS="$LDFLAGS $ac_path_to_link"
+           fi
+           GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lwebkitgtk-1.0"
+           AC_MSG_RESULT([yes])
+       else
+           AC_MSG_RESULT([no])
+           AC_MSG_WARN([libwebkitgtk-1.0 not found; disabling webkit backend])
+           wxUSE_WEBVIEW_WEBKIT="no"
+       fi
+
+       AC_MSG_CHECKING(for webkitgtk includes)
+       WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /usr/include/webkit-1.0], webkit/webkit.h)
+       if test "$ac_find_includes" != "" ; then
+           AC_MSG_RESULT(found in $ac_find_includes)
+           WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
+           CPPFLAGS="$ac_path_to_include $CPPFLAGS"
+       else
+           AC_MSG_RESULT([not found])
+       fi
+       dnl we also depend on libsoup
+       AC_MSG_CHECKING(for libsoup includes)
+       WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /usr/include/libsoup-2.4], libsoup/soup.h)
+       if test "$ac_find_includes" != "" ; then
+           AC_MSG_RESULT(found in $ac_find_includes)
+           WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
+           CPPFLAGS="$ac_path_to_include $CPPFLAGS"
+       else
+           AC_MSG_RESULT([not found])
+       fi
+   fi
+
+    if test "$wxUSE_WEBVIEW_WEBKIT" = "yes" -a "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then
+        old_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="-x objective-c++ $CPPFLAGS"
+        AC_CHECK_HEADER([WebKit/HIWebView.h],
+                        [
+                           AC_DEFINE(wxUSE_WEBVIEW_WEBKIT)
+                           WEBKIT_LINK="-framework WebKit"
+                        ],
+                        [
+                           AC_MSG_WARN([WebKit headers not found; disabling wxWebView WebKit])
+                           wxUSE_WEBVIEW_WEBKIT=no
+                        ],
+                        [
+                           #include <Carbon/Carbon.h>
+                           #include <WebKit/WebKit.h>
+                        ])
+        CPPFLAGS="$old_CPPFLAGS"
+    elif test "$wxUSE_OLD_COCOA" = 1; then
+        AC_DEFINE(wxUSE_WEBVIEW_WEBKIT)
+    else
+        wxUSE_WEBVIEW_WEBKIT=no
+    fi
+fi
+
 dnl ---------------------------------------------------------------------------
 dnl wxImage options
 dnl ---------------------------------------------------------------------------
@@ -7745,6 +7816,10 @@ if test "$wxUSE_GUI" = "yes"; then
     if test "$wxUSE_STC" = "yes" ; then
         BUILT_WX_LIBS="stc $BUILT_WX_LIBS"
     fi
+    if test "$wxUSE_WEBVIEW" = "yes" ; then
+        STD_GUI_LIBS="web $STD_GUI_LIBS"
+        BUILT_WX_LIBS="web $BUILT_WX_LIBS"
+    fi
     if test "$wxUSE_XRC" = "yes" ; then
         STD_GUI_LIBS="xrc $STD_GUI_LIBS"
         BUILT_WX_LIBS="xrc $BUILT_WX_LIBS"
index 067e8e03bb7cb348c573797172212332d19a65d9..e80e5e619b7ea9d2378bb108ceee4efd90b66103 100644 (file)
@@ -468,6 +468,7 @@ All (GUI):
 - Added wxFLP_SMALL and wxDIRP_SMALL styles.
 - Added support for saving alpha with TIFF images.
 - Added wxPersistentSplitter.
+- Added wxWebView library (Steven Lamerton & Auria, GSoC 2011 project).
 
 OSX:
 
diff --git a/docs/doxygen/groups/class_webview.h b/docs/doxygen/groups/class_webview.h
new file mode 100644 (file)
index 0000000..9a6ee1b
--- /dev/null
@@ -0,0 +1,18 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        class_webview.h
+// Purpose:     WebView classes group docs
+// Author:      wxWidgets team
+// RCS-ID:      $Id$
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+
+@defgroup group_class_webview WebView
+@ingroup group_class
+
+The wxWebView library is a set of classes for viewing complex web documents and 
+for internet browsing. It is built around a series of backends, and exposes
+common functions for them.
+
+*/
\ No newline at end of file
index b422555de82294404f69c6d1d04613a430c30d86..423462f925c90156c49a813342f052eed9282ab0 100644 (file)
@@ -246,6 +246,7 @@ with the corresponding library. The following symbols are honoured:
     - wxNO_PROPGRID_LIB
     - wxNO_QA_LIB
     - wxNO_RICHTEXT_LIB
+    - wxNO_WEBVIEW_LIB
     - wxNO_XML_LIB
     - wxNO_REGEX_LIB
     - wxNO_EXPAT_LIB
index f248e6774766f572a1b69ef269ebebdcb91fd767..c7be578182fcd8f61592c484718ce3b88308d50d 100644 (file)
@@ -257,6 +257,7 @@ library:
 @itemdef{wxUSE_URL_NATIVE, Use native support for some operations with wxURL.}
 @itemdef{wxUSE_VALIDATORS, Use wxValidator class.}
 @itemdef{wxUSE_VARIANT, Use wxVariant class.}
+@itemdef{wxUSE_WEBVIEW, Use wxWebView class.}
 @itemdef{wxUSE_WIZARDDLG, Use wxWizard class.}
 @itemdef{wxUSE_WXHTML_HELP, Use wxHtmlHelpController and related classes.}
 @itemdef{wxUSE_XML, Use XML parsing classes.}
index 88c682f776a7d058803e79cc0d3f0e5d01b98c15..897debd50113cb6a7be3529c1fc9fc61bc57e523 100644 (file)
@@ -39,6 +39,7 @@ digraph Dependancies
     wxRichText [fillcolor = green, URL = "\ref page_libs_wxrichtext"];
     wxSTC      [fillcolor = green, URL = "\ref page_libs_wxstc"];
     wxXRC      [fillcolor = green, URL = "\ref page_libs_wxxrc"];
+    wxWebView  [fillcolor = green, URL = "\ref page_libs_wxwebview"];
 
     wxCore -> wxBase;
     wxNet -> wxBase;
@@ -55,6 +56,7 @@ digraph Dependancies
     wxRichText -> wxAdvanced; wxRichText -> wxHTML; wxRichText -> wxXML;
     wxSTC -> wxCore;
     wxXRC -> wxAdvanced; wxXRC -> wxHTML; wxXRC -> wxXML;
+    wxWebView -> wxCore;
 }
 @enddot
 
@@ -202,5 +204,11 @@ text editor. See <http://www.scintilla.org/> for more info about Scintilla.
 
 Requires @ref page_libs_wxcore, @ref page_libs_wxbase.
 
+@section page_libs_wxwebview wxWebView
+
+The wxWebView library contains the wxWebView control and its associated classes.
+
+Requires @ref page_libs_wxcore, @ref page_libs_wxbase.
+
 */
 
index 2e2683ecfbe156b6ccb59bd4d30f0a1d1694d63c..68314151aaca7a81fad2e8095796572f14912b10 100644 (file)
@@ -41,7 +41,7 @@ may find the following samples showing the corresponding controls:
 @li wxTreeCtrl: @ref page_samples_treectrl
 @li wxGrid: @ref page_samples_grid
 @li wxDataViewCtrl: @ref page_samples_dataview
-
+@li wxWebView: @ref page_samples_webview
 
 Finally, here is the full list of samples:
 <!--
@@ -110,8 +110,8 @@ TODO: Organize them in a more human-readable way.
 @li @sample{power}
 @li @sample{printing}
 @li @sample{propgrid}
-</td><td>
 @li @sample{regtest}
+</td><td>
 @li @sample{render}
 @li @sample{richtext}
 @li @sample{sashtest}
@@ -134,6 +134,7 @@ TODO: Organize them in a more human-readable way.
 @li @sample{uiaction}
 @li @sample{validate}
 @li @sample{vscroll}
+@li @sample{webview}
 @li @sample{widgets}
 @li @sample{wizard}
 @li @sample{wrapsizer}
@@ -1001,7 +1002,7 @@ demonstrated here as well - try the corresponding menu entries.
 @sampleabout{wxUIActionSimulator}
 
 This sample shows some features of wxUIActionSimulator class. When a simulation
-is ran using its menu items, you can see that the button is pressed
+is run using its menu items, you can see that the button is pressed
 programmatically and the characters generated by the program appear in the text
 control.
 
@@ -1019,6 +1020,15 @@ control.
 
 @sampledir{vscroll}
 
+@section page_samples_webview wxWebView Sample
+
+The wxWebView sample demonstarates the various capabilities of the wxWebView
+control. It is set up as a simple single window web broswer, but with support
+for many of the more complex wxWebView features, including browsing through 
+archives.
+
+@sampledir{webview}
+
 @section page_samples_widgets Widgets Sample
 
 The widgets sample is the main presentation program for most simple and advanced
index d6c7522d844633025c070e31d5e133f48d7248c0..fc5e008f9d88e7bb665db953951a2f8d81b9064e 100644 (file)
 #    define WXMAKINGDLL_RICHTEXT
 #    define WXMAKINGDLL_MEDIA
 #    define WXMAKINGDLL_STC
+#    define WXMAKINGDLL_WEBVIEW
 #endif /* WXMAKINGDLL */
 
 /*
 #    define WXDLLIMPEXP_DATA_STC(type) type
 #endif
 
+#ifdef WXMAKINGDLL_WEBVIEW
+#    define WXDLLIMPEXP_WEBVIEW WXEXPORT
+#    define WXDLLIMPEXP_DATA_WEBVIEW(type) WXEXPORT type
+#elif defined(WXUSINGDLL)
+#    define WXDLLIMPEXP_WEBVIEW WXIMPORT
+#    define WXDLLIMPEXP_DATA_WEBVIEW(type) WXIMPORT type
+#else /* not making nor using DLL */
+#    define WXDLLIMPEXP_WEBVIEW
+#    define WXDLLIMPEXP_DATA_WEBVIEW(type) type
+#endif
+
 /*
    GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
    forward declarations while MSVC complains about forward declarations without
     #define WXDLLIMPEXP_FWD_RICHTEXT
     #define WXDLLIMPEXP_FWD_MEDIA
     #define WXDLLIMPEXP_FWD_STC
+    #define WXDLLIMPEXP_FWD_WEBVIEW
 #else
     #define WXDLLIMPEXP_FWD_BASE      WXDLLIMPEXP_BASE
     #define WXDLLIMPEXP_FWD_NET       WXDLLIMPEXP_NET
     #define WXDLLIMPEXP_FWD_RICHTEXT  WXDLLIMPEXP_RICHTEXT
     #define WXDLLIMPEXP_FWD_MEDIA     WXDLLIMPEXP_MEDIA
     #define WXDLLIMPEXP_FWD_STC       WXDLLIMPEXP_STC
+    #define WXDLLIMPEXP_FWD_WEBVIEW   WXDLLIMPEXP_WEBVIEW
 #endif
 
 /* for backwards compatibility, define suffix-less versions too */
diff --git a/include/wx/gtk/webview_webkit.h b/include/wx/gtk/webview_webkit.h
new file mode 100644 (file)
index 0000000..3add4d9
--- /dev/null
@@ -0,0 +1,159 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        include/gtk/wx/webview.h
+// Purpose:     GTK webkit backend for web view component
+// Author:      Robert Roebling, Marianne Gagnon
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, 1998 Robert Roebling
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GTK_WEBKITCTRL_H_
+#define _WX_GTK_WEBKITCTRL_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
+
+#include "webkit/webkit.h"
+#include "wx/sharedptr.h"
+#include "wx/webview.h"
+
+//-----------------------------------------------------------------------------
+// wxWebViewWebKit
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView
+{
+public:
+    wxWebViewWebKit() { Init(); }
+
+    wxWebViewWebKit(wxWindow *parent,
+           wxWindowID id = wxID_ANY,
+           const wxString& url = wxWebViewDefaultURLStr,
+           const wxPoint& pos = wxDefaultPosition,
+           const wxSize& size = wxDefaultSize, long style = 0,
+           const wxString& name = wxWebViewNameStr)
+    {
+        Init();
+
+        Create(parent, id, url, pos, size, style, name);
+    }
+
+    virtual bool Create(wxWindow *parent,
+           wxWindowID id = wxID_ANY,
+           const wxString& url = wxWebViewDefaultURLStr,
+           const wxPoint& pos = wxDefaultPosition,
+           const wxSize& size = wxDefaultSize, long style = 0,
+           const wxString& name = wxWebViewNameStr);
+
+    virtual bool Enable( bool enable = true );
+
+    // implementation
+    // --------------
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+    virtual void Stop();
+    virtual void LoadURL(const wxString& url);
+    virtual void GoBack();
+    virtual void GoForward();
+    virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT);
+    virtual bool CanGoBack() const;
+    virtual bool CanGoForward() const;
+    virtual void ClearHistory();
+    virtual void EnableHistory(bool enable = true);
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
+    virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
+    virtual wxString GetCurrentURL() const;
+    virtual wxString GetCurrentTitle() const;
+    virtual wxString GetPageSource() const;
+    virtual wxString GetPageText() const;
+    //We do not want to hide the other overloads
+    using wxWebView::SetPage;
+    virtual void SetPage(const wxString& html, const wxString& baseUrl);
+    virtual void Print();
+    virtual bool IsBusy() const;
+
+    void SetZoomType(wxWebViewZoomType);
+    wxWebViewZoomType GetZoomType() const;
+    bool CanSetZoomType(wxWebViewZoomType) const;
+    virtual wxWebViewZoom GetZoom() const;
+    virtual void SetZoom(wxWebViewZoom);
+
+    //Clipboard functions
+    virtual bool CanCut() const;
+    virtual bool CanCopy() const;
+    virtual bool CanPaste() const;
+    virtual void Cut();
+    virtual void Copy();
+    virtual void Paste();
+
+    //Undo / redo functionality
+    virtual bool CanUndo() const;
+    virtual bool CanRedo() const;
+    virtual void Undo();
+    virtual void Redo();
+
+    //Editing functions
+    virtual void SetEditable(bool enable = true);
+    virtual bool IsEditable() const;
+
+    //Selection
+    virtual void DeleteSelection();
+    virtual bool HasSelection() const;
+    virtual void SelectAll();
+    virtual wxString GetSelectedText() const;
+    virtual wxString GetSelectedSource() const;
+    virtual void ClearSelection();
+
+    virtual void RunScript(const wxString& javascript);
+    
+    //Virtual Filesystem Support
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
+    virtual wxVector<wxSharedPtr<wxWebViewHandler> > GetHandlers() { return m_handlerList; }
+
+    /** FIXME: hack to work around signals being received too early */
+    bool m_ready;
+
+
+    /** TODO: check if this can be made private
+     * The native control has a getter to check for busy state, but except in
+     * very recent versions of webkit this getter doesn't say everything we need
+     * (namely it seems to stay indefinitely busy when loading is cancelled by
+     * user)
+     */
+    bool m_busy;
+
+    wxString m_vfsurl;
+
+    //We use this flag to stop recursion when we load a page from the navigation
+    //callback, mainly when loading a VFS page
+    bool m_guard;
+
+protected:
+
+    virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
+
+private:
+
+    void ZoomIn();
+    void ZoomOut();
+    void SetWebkitZoom(float level);
+    float GetWebkitZoom() const;
+
+    // focus event handler: calls GTKUpdateBitmap()
+    void GTKOnFocus(wxFocusEvent& event);
+
+    GtkWidget *web_view;
+    gint m_historyLimit;
+
+    wxVector<wxSharedPtr<wxWebViewHandler> > m_handlerList;
+
+    wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit);
+};
+
+#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
+
+#endif
diff --git a/include/wx/gtk/webviewhistoryitem_webkit.h b/include/wx/gtk/webviewhistoryitem_webkit.h
new file mode 100644 (file)
index 0000000..071f3fb
--- /dev/null
@@ -0,0 +1,36 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        include/wx/gtk/webviewhistoryitem.h
+// Purpose:     wxWebViewHistoryItem header for GTK
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GTK_WEBVIEWHISTORYITEM_H_
+#define _WX_GTK_WEBVIEWHISTORYITEM_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
+
+#include "webkit/webkit.h"
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem
+{
+public:
+    wxWebViewHistoryItem(const wxString& url, const wxString& title) : 
+                     m_url(url), m_title(title) {}
+    wxString GetUrl() { return m_url; }
+    wxString GetTitle() { return m_title; }
+
+    friend class wxWebViewWebKit;
+
+private:
+    wxString m_url, m_title;
+    WebKitWebHistoryItem* m_histItem;
+};
+
+#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__)
+
+#endif // _WX_GTK_WEBVIEWHISTORYITEM_H_
index 5643870029123b1a65f06f9c275e3a98641388fd..90518a77ae9dbd5b6c323778fa8db9f4d142a2b5 100644 (file)
 #           define wxUSE_MEDIACTRL 0
 #       endif
 #   endif
+#    if wxUSE_WEB
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxWebView requires wxActiveXContainer under MSW"
+#       else
+#           undef wxUSE_WEB
+#           define wxUSE_WEB 0
+#       endif
+#   endif
 #endif /* !wxUSE_ACTIVEX */
 
 #if !wxUSE_THREADS
 #   endif
 #endif /* !wxUSE_THREADS */
 
+
+#if !wxUSE_OLE_AUTOMATION
+#    if wxUSE_WEB
+#       ifdef wxABORT_ON_CONFIG_ERROR
+#           error "wxWebView requires wxUSE_OLE_AUTOMATION under MSW"
+#       else
+#           undef wxUSE_WEB
+#           define wxUSE_WEB 0
+#       endif
+#   endif
+#endif /* !wxUSE_OLE_AUTOMATION */
+
 #if defined(__WXUNIVERSAL__) && wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT
 #   undef wxUSE_POSTSCRIPT
 #   define wxUSE_POSTSCRIPT 1
index 95157acc1b2079fc9593b65a2a984177996fa117..6b2d1cd956e62f8f7de3bccc4f2afca6cbb7630b 100644 (file)
@@ -514,6 +514,77 @@ typedef struct
 
 #endif
 
+#endif
+
+// Various definitions are missing from mingw
+// Used by webview_ie.cpp
+#ifdef __MINGW32__
+typedef enum CommandStateChangeConstants {
+    CSC_UPDATECOMMANDS = (int) 0xFFFFFFFF,
+    CSC_NAVIGATEFORWARD = 0x1,
+    CSC_NAVIGATEBACK = 0x2
+} CommandStateChangeConstants;
+
+#define DISPID_COMMANDSTATECHANGE 105
+#define DISPID_NAVIGATECOMPLETE2 252
+#define DISPID_NAVIGATEERROR 271
+#define DISPID_NEWWINDOW3 273
+#define INET_E_ERROR_FIRST 0x800C0002L
+#define INET_E_INVALID_URL 0x800C0002L
+#define INET_E_NO_SESSION 0x800C0003L
+#define INET_E_CANNOT_CONNECT 0x800C0004L
+#define INET_E_RESOURCE_NOT_FOUND 0x800C0005L
+#define INET_E_OBJECT_NOT_FOUND 0x800C0006L
+#define INET_E_DATA_NOT_AVAILABLE 0x800C0007L
+#define INET_E_DOWNLOAD_FAILURE 0x800C0008L
+#define INET_E_AUTHENTICATION_REQUIRED 0x800C0009L
+#define INET_E_NO_VALID_MEDIA 0x800C000AL
+#define INET_E_CONNECTION_TIMEOUT 0x800C000BL
+#define INET_E_INVALID_REQUEST 0x800C000CL
+#define INET_E_UNKNOWN_PROTOCOL 0x800C000DL
+#define INET_E_SECURITY_PROBLEM 0x800C000EL
+#define INET_E_CANNOT_LOAD_DATA 0x800C000FL
+#define INET_E_CANNOT_INSTANTIATE_OBJECT 0x800C0010L
+#define INET_E_QUERYOPTION_UNKNOWN 0x800C0013L
+#define INET_E_REDIRECT_FAILED 0x800C0014L
+#define INET_E_REDIRECT_TO_DIR 0x800C0015L
+#define INET_E_CANNOT_LOCK_REQUEST 0x800C0016L
+#define INET_E_USE_EXTEND_BINDING 0x800C0017L
+#define INET_E_TERMINATED_BIND 0x800C0018L
+#define INET_E_INVALID_CERTIFICATE 0x800C0019L
+#define INET_E_CODE_DOWNLOAD_DECLINED 0x800C0100L
+#define INET_E_RESULT_DISPATCHED 0x800C0200L
+#define INET_E_CANNOT_REPLACE_SFP_FILE 0x800C0300L
+#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L
+#define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L
+
+#define REFRESH_NORMAL 0
+#define REFRESH_COMPLETELY 3
+#endif
+
+// For Visual C++ 6 and MinGW32. Used by webview_ie.cpp
+
+#if defined (__MINGW32__) || (_MSC_VER < 1300)
+enum
+{
+    OLECMDID_OPTICAL_ZOOM = 63
+};
+#endif
+
+#ifndef INET_E_INVALID_CERTIFICATE
+#define INET_E_INVALID_CERTIFICATE 0x800C0019L
+#endif
+
+#ifndef INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY
+#define INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY 0x800C0500L
+#endif
+
+#ifndef INET_E_CODE_INSTALL_SUPPRESSED
+#define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L
+#endif
+
+#ifndef DISPID_NEWWINDOW3
+#define DISPID_NEWWINDOW3 273
 #endif
 
  /*
index a98739b5fa7d25337961ff89d4b6d3261198eff5..ce3af5eddeb87f805f2f3888bba2d4a631cad214 100644 (file)
 // Recommended setting: 1
 #define wxUSE_STC 1
 
+// Use wxWidget's web viewing classes
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_WEBVIEW 1
+
+// Use the IE wxWebView backend
+//
+// Default is 1 on MSW
+//
+// Recommended setting: 1
+#ifdef __WXMSW__
+#define wxUSE_WEBVIEW_IE 1
+#else
+#define wxUSE_WEBVIEW_IE 0
+#endif
+
 
 // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
 // 2D drawing API.  (Still somewhat experimental)
diff --git a/include/wx/msw/webview_ie.h b/include/wx/msw/webview_ie.h
new file mode 100644 (file)
index 0000000..bcc823a
--- /dev/null
@@ -0,0 +1,230 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        include/wx/msw/webviewie.h
+// Purpose:     wxMSW IE wxWebView backend
+// Author:      Marianne Gagnon
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef wxWebViewIE_H
+#define wxWebViewIE_H
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW_IE && defined(__WXMSW__)
+
+#include "wx/control.h"
+#include "wx/webview.h"
+#include "wx/msw/ole/automtn.h"
+#include "wx/msw/ole/activex.h"
+#include "wx/sharedptr.h"
+#include "wx/vector.h"
+
+struct IHTMLDocument2;
+class wxFSFile;
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView
+{
+public:
+
+    wxWebViewIE() {}
+
+    wxWebViewIE(wxWindow* parent,
+           wxWindowID id,
+           const wxString& url = wxWebViewDefaultURLStr,
+           const wxPoint& pos = wxDefaultPosition,
+           const wxSize& size = wxDefaultSize,
+           long style = 0,
+           const wxString& name = wxWebViewNameStr)
+   {
+       Create(parent, id, url, pos, size, style, name);
+   }
+
+    bool Create(wxWindow* parent,
+           wxWindowID id,
+           const wxString& url = wxWebViewDefaultURLStr,
+           const wxPoint& pos = wxDefaultPosition,
+           const wxSize& size = wxDefaultSize,
+           long style = 0,
+           const wxString& name = wxWebViewNameStr);
+
+    virtual void LoadURL(const wxString& url);
+    virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
+
+    virtual bool CanGoForward() const;
+    virtual bool CanGoBack() const;
+    virtual void GoBack();
+    virtual void GoForward();
+    virtual void ClearHistory();
+    virtual void EnableHistory(bool enable = true);
+    virtual void Stop();
+    virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT);
+
+    virtual wxString GetPageSource() const;
+    virtual wxString GetPageText() const;
+
+    virtual bool IsBusy() const;
+    virtual wxString GetCurrentURL() const;
+    virtual wxString GetCurrentTitle() const;
+
+    virtual void SetZoomType(wxWebViewZoomType);
+    virtual wxWebViewZoomType GetZoomType() const;
+    virtual bool CanSetZoomType(wxWebViewZoomType) const;
+
+    virtual void Print();
+
+    virtual void SetPage(const wxString& html, const wxString& baseUrl);
+
+    virtual wxWebViewZoom GetZoom() const;
+    virtual void SetZoom(wxWebViewZoom zoom);
+
+    //Clipboard functions
+    virtual bool CanCut() const;
+    virtual bool CanCopy() const;
+    virtual bool CanPaste() const;
+    virtual void Cut();
+    virtual void Copy();
+    virtual void Paste();
+
+    //Undo / redo functionality
+    virtual bool CanUndo() const;
+    virtual bool CanRedo() const;
+    virtual void Undo();
+    virtual void Redo();
+
+    //Editing functions
+    virtual void SetEditable(bool enable = true);
+    virtual bool IsEditable() const;
+
+    //Selection
+    virtual void SelectAll();
+    virtual bool HasSelection() const;
+    virtual void DeleteSelection();
+    virtual wxString GetSelectedText() const;
+    virtual wxString GetSelectedSource() const;
+    virtual void ClearSelection();
+
+    virtual void RunScript(const wxString& javascript);
+
+    //Virtual Filesystem Support
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
+
+    // ---- IE-specific methods
+
+    // FIXME: I seem to be able to access remote webpages even in offline mode...
+    bool IsOfflineMode();
+    void SetOfflineMode(bool offline);
+
+    wxWebViewZoom GetIETextZoom() const;
+    void SetIETextZoom(wxWebViewZoom level);
+
+    wxWebViewZoom GetIEOpticalZoom() const;
+    void SetIEOpticalZoom(wxWebViewZoom level);
+
+    void onActiveXEvent(wxActiveXEvent& evt);
+    void onEraseBg(wxEraseEvent&) {}
+
+    DECLARE_EVENT_TABLE();
+
+private:
+    wxActiveXContainer* m_container;
+    wxAutomationObject m_ie;
+    IWebBrowser2* m_webBrowser;
+    DWORD m_dwCookie;
+
+    //We store the current zoom type;
+    wxWebViewZoomType m_zoomType;
+
+    /** The "Busy" property of IWebBrowser2 does not always return busy when
+     *  we'd want it to; this variable may be set to true in cases where the
+     *  Busy property is false but should be true.
+     */
+    bool m_isBusy;
+    //We manage our own history, the history list contains the history items 
+    //which are added as documentcomplete events arrive, unless we are loading
+    //an item from the history. The position is stored as an int, and reflects
+    //where we are in the history list.
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > m_historyList;
+    int m_historyPosition;
+    bool m_historyLoadingFromList;
+    bool m_historyEnabled;
+
+    //Generic helper functions for IHtmlDocument commands
+    bool CanExecCommand(wxString command) const;
+    void ExecCommand(wxString command);
+    IHTMLDocument2* GetDocument() const;
+
+    wxDECLARE_DYNAMIC_CLASS(wxWebViewIE);
+};
+
+class VirtualProtocol : public IInternetProtocol
+{
+protected:
+    ULONG m_refCount;
+    IInternetProtocolSink* m_protocolSink;
+    wxString m_html;
+    VOID * fileP;
+
+    wxFSFile* m_file;
+    wxSharedPtr<wxWebViewHandler> m_handler;
+
+public:
+    VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler);
+    ~VirtualProtocol();
+
+    //IUnknown
+    ULONG STDMETHODCALLTYPE AddRef();
+    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+    ULONG STDMETHODCALLTYPE Release();
+
+    //IInternetProtocolRoot
+    HRESULT STDMETHODCALLTYPE Abort(HRESULT WXUNUSED(hrReason), 
+                                    DWORD WXUNUSED(dwOptions))
+                                   { return E_NOTIMPL; }
+    HRESULT STDMETHODCALLTYPE Continue(PROTOCOLDATA *WXUNUSED(pProtocolData))
+                                       { return S_OK; }
+    HRESULT STDMETHODCALLTYPE Resume() { return S_OK; }
+    HRESULT STDMETHODCALLTYPE Start(LPCWSTR szUrl, 
+                                    IInternetProtocolSink *pOIProtSink,
+                                    IInternetBindInfo *pOIBindInfo, 
+                                    DWORD grfPI, 
+                                    HANDLE_PTR dwReserved);
+    HRESULT STDMETHODCALLTYPE Suspend() { return S_OK; }
+    HRESULT STDMETHODCALLTYPE Terminate(DWORD WXUNUSED(dwOptions)) { return S_OK; }
+
+    //IInternetProtocol
+    HRESULT STDMETHODCALLTYPE LockRequest(DWORD WXUNUSED(dwOptions)) 
+                                          { return S_OK; }
+    HRESULT STDMETHODCALLTYPE Read(void *pv, ULONG cb, ULONG *pcbRead);
+    HRESULT STDMETHODCALLTYPE Seek(LARGE_INTEGER WXUNUSED(dlibMove), 
+                                   DWORD WXUNUSED(dwOrigin), 
+                                   ULARGE_INTEGER* WXUNUSED(plibNewPosition)) 
+                                   { return E_FAIL; }
+    HRESULT STDMETHODCALLTYPE UnlockRequest() { return S_OK; }
+};
+
+class ClassFactory : public IClassFactory
+{
+private:
+    ULONG m_refCount;
+public:
+    ClassFactory(wxSharedPtr<wxWebViewHandler> handler) : m_handler(handler) {}
+    //IUnknown
+    ULONG STDMETHODCALLTYPE AddRef();
+    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject);
+    ULONG STDMETHODCALLTYPE Release();
+
+    //IClassFactory
+    HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter, 
+                                             REFIID riid, void** ppvObject);
+    HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock);
+private:
+    wxSharedPtr<wxWebViewHandler> m_handler;
+};
+
+#endif // wxUSE_WEBVIEW_IE && defined(__WXMSW__)
+
+#endif // wxWebViewIE_H
diff --git a/include/wx/msw/webviewhistoryitem_ie.h b/include/wx/msw/webviewhistoryitem_ie.h
new file mode 100644 (file)
index 0000000..102b98f
--- /dev/null
@@ -0,0 +1,31 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        include/wx/msw/webviewhistoryitem.h
+// Purpose:     wxWebViewHistoryItem header for MSW
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_MSW_WEBVIEWHISTORYITEM_H_
+#define _WX_MSW_WEBVIEWHISTORYITEM_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW_IE && defined(__WXMSW__)
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem
+{
+public:
+    wxWebViewHistoryItem(const wxString& url, const wxString& title) : 
+                     m_url(url), m_title(title) {}
+    wxString GetUrl() { return m_url; }
+    wxString GetTitle() { return m_title; }
+
+private:
+    wxString m_url, m_title;
+};
+
+#endif // wxUSE_WEBVIEW_IE && defined(__WXMSW__)
+
+#endif // _WX_MSW_WEBVIEWHISTORYITEM_H_
diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h
new file mode 100644 (file)
index 0000000..32a4d98
--- /dev/null
@@ -0,0 +1,163 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        include/wx/osx/webkit.h
+// Purpose:     wxWebViewWebKit - embeddable web kit control,
+//                             OS X implementation of web view component
+// Author:      Jethro Grassie / Kevin Ollivier / Marianne Gagnon
+// Modified by:
+// Created:     2004-4-16
+// RCS-ID:      $Id$
+// Copyright:   (c) Jethro Grassie / Kevin Ollivier / Marianne Gagnon
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_WEBKIT_H
+#define _WX_WEBKIT_H
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
+                         ||  defined(__WXOSX_CARBON__))
+
+#include "wx/control.h"
+#include "wx/webview.h"
+
+// ----------------------------------------------------------------------------
+// Web Kit Control
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView
+{
+public:
+    wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit);
+
+    wxWebViewWebKit() {}
+    wxWebViewWebKit(wxWindow *parent,
+                    wxWindowID winID = wxID_ANY,
+                    const wxString& strURL = wxWebViewDefaultURLStr,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize, long style = 0,
+                    const wxString& name = wxWebViewNameStr)
+    {
+        Create(parent, winID, strURL, pos, size, style, name);
+    }
+    bool Create(wxWindow *parent,
+                wxWindowID winID = wxID_ANY,
+                const wxString& strURL = wxWebViewDefaultURLStr,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize, long style = 0,
+                const wxString& name = wxWebViewNameStr);
+    virtual ~wxWebViewWebKit();
+
+    virtual bool CanGoBack() const;
+    virtual bool CanGoForward() const;
+    virtual void GoBack();
+    virtual void GoForward();
+    virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT);
+    virtual void Stop();
+    virtual wxString GetPageSource() const;
+    virtual wxString GetPageText() const;
+
+    //We do not want to hide the other overloads
+    using wxWebView::SetPage;
+    virtual void SetPage(const wxString& html, const wxString& baseUrl);
+
+    virtual void Print();
+
+    virtual void LoadURL(const wxString& url);
+    virtual wxString GetCurrentURL() const;
+    virtual wxString GetCurrentTitle() const;
+    virtual wxWebViewZoom GetZoom() const;
+    virtual void SetZoom(wxWebViewZoom zoom);
+
+    virtual void SetZoomType(wxWebViewZoomType zoomType);
+    virtual wxWebViewZoomType GetZoomType() const;
+    virtual bool CanSetZoomType(wxWebViewZoomType type) const;
+
+    virtual bool IsBusy() const { return m_busy; }
+    
+    //History functions
+    virtual void ClearHistory();
+    virtual void EnableHistory(bool enable = true);
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory();
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory();
+    virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item);
+    
+    //Undo / redo functionality
+    virtual bool CanUndo() const;
+    virtual bool CanRedo() const;
+    virtual void Undo();
+    virtual void Redo();
+
+    //Clipboard functions
+    virtual bool CanCut() const { return true; }
+    virtual bool CanCopy() const { return true; }
+    virtual bool CanPaste() const { return true; }
+    virtual void Cut();
+    virtual void Copy();
+    virtual void Paste();
+    
+    //Editing functions
+    virtual void SetEditable(bool enable = true);
+    virtual bool IsEditable() const;
+    
+    //Selection
+    virtual void DeleteSelection();
+    virtual bool HasSelection() const;
+    virtual void SelectAll();
+    virtual wxString GetSelectedText() const;
+    virtual wxString GetSelectedSource() const;
+    virtual void ClearSelection();
+    
+    void RunScript(const wxString& javascript);
+    
+    //Virtual Filesystem Support
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler);
+
+    // ---- methods not from the parent (common) interface
+    bool  CanGetPageSource() const;
+
+    void  SetScrollPos(int pos);
+    int   GetScrollPos();
+
+    bool  CanIncreaseTextSize() const;
+    void  IncreaseTextSize();
+    bool  CanDecreaseTextSize() const;
+    void  DecreaseTextSize();
+
+    float GetWebkitZoom() const;
+    void  SetWebkitZoom(float zoom);
+
+    // don't hide base class virtuals
+    virtual void SetScrollPos( int orient, int pos, bool refresh = true )
+        { return wxControl::SetScrollPos(orient, pos, refresh); }
+    virtual int GetScrollPos( int orient ) const
+        { return wxControl::GetScrollPos(orient); }
+
+    //we need to resize the webview when the control size changes
+    void OnSize(wxSizeEvent &event);
+    void OnMove(wxMoveEvent &event);
+    void OnMouseEvents(wxMouseEvent &event);
+
+    bool m_busy;
+
+protected:
+    DECLARE_EVENT_TABLE()
+    void MacVisibilityChanged();
+
+private:
+    wxWindow *m_parent;
+    wxWindowID m_windowID;
+    wxString m_pageTitle;
+
+    struct objc_object *m_webView;
+
+    // we may use this later to setup our own mouse events,
+    // so leave it in for now.
+    void* m_webKitCtrlEventHandler;
+    //It should be WebView*, but WebView is an Objective-C class
+    //TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this.
+};
+
+#endif // wxUSE_WEBKIT
+
+#endif // _WX_WEBKIT_H_
diff --git a/include/wx/osx/webviewhistoryitem_webkit.h b/include/wx/osx/webviewhistoryitem_webkit.h
new file mode 100644 (file)
index 0000000..9ae2577
--- /dev/null
@@ -0,0 +1,35 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        include/wx/osx/webviewhistoryitem.h
+// Purpose:     wxWebViewHistoryItem header for OSX
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_OSX_WEBVIEWHISTORYITEM_H_
+#define _WX_OSX_WEBVIEWHISTORYITEM_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
+                         ||  defined(__WXOSX_CARBON__))
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem
+{
+public:
+    wxWebViewHistoryItem(const wxString& url, const wxString& title) :
+                     m_url(url), m_title(title) {}
+    wxString GetUrl() { return m_url; }
+    wxString GetTitle() { return m_title; }
+
+    friend class wxWebViewWebKit;
+
+private:
+    wxString m_url, m_title;
+    struct objc_object *m_histItem;
+};
+
+#endif // wxUSE_WEBVIEW_WEBKIT && defined(__WXOSX_MAC__)
+
+#endif // _WX_OSX_WEBVIEWHISTORYITEM_H_
index 39e7081696e9942404336fec58b0aa4a73ef7917..2b3ce56c6e4f6d7d3d53fb53a9090374d7bf0571 100644 (file)
 // Recommended setting: 1
 #define wxUSE_STC 1
 
+// Use wxWidget's web viewing classes
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_WEBVIEW 1
+
+// Use the IE wxWebView backend
+//
+// Default is 1 on MSW
+//
+// Recommended setting: 1
+#ifdef __WXMSW__
+#define wxUSE_WEBVIEW_IE 1
+#else
+#define wxUSE_WEBVIEW_IE 0
+#endif
+
+// Use the WebKit wxWebView backend
+//
+// Default is 1 on GTK and OSX
+//
+// Recommended setting: 1
+#if defined(__WXGTK__) || defined(__WXOSX__)
+#define wxUSE_WEBVIEW_WEBKIT 1
+#else
+#define wxUSE_WEBVIEW_WEBKIT 0
+#endif
 
 // Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced
 // 2D drawing API.  (Still somewhat experimental)
diff --git a/include/wx/webview.h b/include/wx/webview.h
new file mode 100644 (file)
index 0000000..a58fd87
--- /dev/null
@@ -0,0 +1,235 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webview.h
+// Purpose:     Common interface and events for web view component
+// Author:      Marianne Gagnon
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_WEB_VIEW_H_
+#define _WX_WEB_VIEW_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW
+
+#include "wx/control.h"
+#include "wx/event.h"
+#include "wx/sstream.h"
+#include "wx/sharedptr.h"
+#include "wx/vector.h"
+
+#include "wx/osx/webviewhistoryitem_webkit.h"
+#include "wx/gtk/webviewhistoryitem_webkit.h"
+#include "wx/msw/webviewhistoryitem_ie.h"
+
+class wxFSFile;
+class wxFileSystem;
+
+enum wxWebViewZoom
+{
+    wxWEB_VIEW_ZOOM_TINY,
+    wxWEB_VIEW_ZOOM_SMALL,
+    wxWEB_VIEW_ZOOM_MEDIUM,
+    wxWEB_VIEW_ZOOM_LARGE,
+    wxWEB_VIEW_ZOOM_LARGEST
+};
+
+enum wxWebViewZoomType
+{
+    //Scales entire page, including images
+    wxWEB_VIEW_ZOOM_TYPE_LAYOUT,
+    wxWEB_VIEW_ZOOM_TYPE_TEXT
+};
+
+enum wxWebViewNavigationError
+{
+    wxWEB_NAV_ERR_CONNECTION,
+    wxWEB_NAV_ERR_CERTIFICATE,
+    wxWEB_NAV_ERR_AUTH,
+    wxWEB_NAV_ERR_SECURITY,
+    wxWEB_NAV_ERR_NOT_FOUND,
+    wxWEB_NAV_ERR_REQUEST,
+    wxWEB_NAV_ERR_USER_CANCELLED,
+    wxWEB_NAV_ERR_OTHER
+};
+
+enum wxWebViewReloadFlags
+{
+    //Default, may access cache
+    wxWEB_VIEW_RELOAD_DEFAULT,
+    wxWEB_VIEW_RELOAD_NO_CACHE 
+};
+
+enum wxWebViewBackend
+{
+    wxWEB_VIEW_BACKEND_DEFAULT,
+    wxWEB_VIEW_BACKEND_WEBKIT,
+    wxWEB_VIEW_BACKEND_IE
+};
+
+//Base class for custom scheme handlers
+class WXDLLIMPEXP_WEBVIEW wxWebViewHandler
+{
+public:
+    wxWebViewHandler(const wxString& scheme) : m_scheme(scheme) {}
+    virtual ~wxWebViewHandler() {}
+    virtual wxString GetName() const { return m_scheme; }
+    virtual wxFSFile* GetFile(const wxString &uri) = 0;
+private:
+    wxString m_scheme;
+};
+
+extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[];
+extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewDefaultURLStr[];
+
+class WXDLLIMPEXP_WEBVIEW wxWebView : public wxControl
+{
+public:
+
+    virtual bool Create(wxWindow* parent,
+           wxWindowID id,
+           const wxString& url,
+           const wxPoint& pos,
+           const wxSize& size,
+           long style,
+           const wxString& name) = 0;
+
+    static wxWebView* New(wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT);
+    static wxWebView* New(wxWindow* parent,
+           wxWindowID id,
+           const wxString& url = wxWebViewDefaultURLStr,
+           const wxPoint& pos = wxDefaultPosition,
+           const wxSize& size = wxDefaultSize,
+           wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT,
+           long style = 0,
+           const wxString& name = wxWebViewNameStr);
+
+    //General methods
+    virtual wxString GetCurrentTitle() const = 0;
+    virtual wxString GetCurrentURL() const = 0;
+    // TODO: handle choosing a frame when calling GetPageSource()?
+    virtual wxString GetPageSource() const = 0;
+    virtual wxString GetPageText() const = 0;
+    virtual bool IsBusy() const = 0;
+    virtual bool IsEditable() const = 0;
+    virtual void LoadURL(const wxString& url) = 0;
+    virtual void Print() = 0;
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) = 0;
+    virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT) = 0;
+    virtual void RunScript(const wxString& javascript) = 0;
+    virtual void SetEditable(bool enable = true) = 0;
+    virtual void SetPage(const wxString& html, const wxString& baseUrl) = 0;
+    virtual void SetPage(wxInputStream& html, wxString baseUrl)
+    {
+        wxStringOutputStream stream;
+        stream.Write(html);
+        SetPage(stream.GetString(), baseUrl);
+    }
+    virtual void Stop() = 0;
+
+    //History
+    virtual bool CanGoBack() const = 0;
+    virtual bool CanGoForward() const = 0;
+    virtual void GoBack() = 0;
+    virtual void GoForward() = 0;
+    virtual void ClearHistory() = 0;
+    virtual void EnableHistory(bool enable = true) = 0;
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory() = 0;
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory() = 0;
+    virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item) = 0;
+
+    //Zoom
+    virtual bool CanSetZoomType(wxWebViewZoomType type) const = 0;
+    virtual wxWebViewZoom GetZoom() const = 0;
+    virtual wxWebViewZoomType GetZoomType() const = 0;
+    virtual void SetZoom(wxWebViewZoom zoom) = 0;
+    virtual void SetZoomType(wxWebViewZoomType zoomType) = 0;
+
+    //Selection
+    virtual void SelectAll() = 0;
+    virtual bool HasSelection() const = 0;
+    virtual void DeleteSelection() = 0;
+    virtual wxString GetSelectedText() const = 0;
+    virtual wxString GetSelectedSource() const = 0;
+    virtual void ClearSelection() = 0;
+
+    //Clipboard functions
+    virtual bool CanCut() const = 0;
+    virtual bool CanCopy() const = 0;
+    virtual bool CanPaste() const = 0;
+    virtual void Cut() = 0;
+    virtual void Copy() = 0;
+    virtual void Paste() = 0;
+
+    //Undo / redo functionality
+    virtual bool CanUndo() const = 0;
+    virtual bool CanRedo() const = 0;
+    virtual void Undo() = 0;
+    virtual void Redo() = 0;
+
+    wxDECLARE_ABSTRACT_CLASS(wxWebView);
+};
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewEvent : public wxNotifyEvent
+{
+public:
+    wxWebViewEvent() {}
+    wxWebViewEvent(wxEventType type, int id, const wxString url,
+                   const wxString target)
+        : wxNotifyEvent(type, id), m_url(url), m_target(target)
+    {}
+
+
+    const wxString& GetURL() const { return m_url; }
+    const wxString& GetTarget() const { return m_target; }
+
+    virtual wxEvent* Clone() const { return new wxWebViewEvent(*this); }
+private:
+    wxString m_url;
+    wxString m_target;
+
+    wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWebViewEvent);
+};
+
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_NAVIGATING, wxWebViewEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_NAVIGATED, wxWebViewEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_LOADED, wxWebViewEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_ERROR, wxWebViewEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, wxWebViewEvent );
+wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, wxWebViewEvent );
+
+typedef void (wxEvtHandler::*wxWebViewEventFunction)
+             (wxWebViewEvent&);
+
+#define wxWebViewEventHandler(func) \
+    wxEVENT_HANDLER_CAST(wxWebViewEventFunction, func)
+
+#define EVT_WEB_VIEW_NAVIGATING(id, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NAVIGATING, id, \
+                     wxWebViewEventHandler(fn))
+
+#define EVT_WEB_VIEW_NAVIGATED(id, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NAVIGATED, id, \
+                     wxWebViewEventHandler(fn))
+
+#define EVT_WEB_VIEW_LOADED(id, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_LOADED, id, \
+                     wxWebViewEventHandler(fn))
+
+#define EVT_WEB_VIEW_ERRROR(id, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_ERROR, id, \
+                     wxWebViewEventHandler(fn))
+
+#define EVT_WEB_VIEW_NEWWINDOW(id, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, id, \
+                     wxWebViewEventHandler(fn))
+
+#define EVT_WEB_VIEW_TITLE_CHANGED(id, fn) \
+    wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, id, \
+                     wxWebViewEventHandler(fn))
+
+#endif // wxUSE_WEBVIEW
+
+#endif // _WX_WEB_VIEW_H_
diff --git a/include/wx/webviewarchivehandler.h b/include/wx/webviewarchivehandler.h
new file mode 100644 (file)
index 0000000..a0d02b6
--- /dev/null
@@ -0,0 +1,37 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webviewarchivehandler.h
+// Purpose:     Custom webview handler to allow archive browsing
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_WEB_VIEW_FILE_HANDLER_H_
+#define _WX_WEB_VIEW_FILE_HANDLER_H_
+
+#include "wx/setup.h"
+
+#if wxUSE_WEBVIEW
+
+class wxFSFile;
+class wxFileSystem;
+
+#include "wx/webview.h"
+
+//Loads from uris such as scheme:///C:/example/example.html or archives such as
+//scheme:///C:/example/example.zip;protocol=zip/example.html 
+
+class WXDLLIMPEXP_WEBVIEW wxWebViewArchiveHandler : public wxWebViewHandler
+{
+public:
+    wxWebViewArchiveHandler(const wxString& scheme);
+    virtual ~wxWebViewArchiveHandler() {}
+    virtual wxFSFile* GetFile(const wxString &uri);
+private:
+    wxFileSystem* m_fileSystem;
+};
+
+#endif // wxUSE_WEBVIEW
+
+#endif // _WX_WEB_VIEW_FILE_HANDLER_H_
diff --git a/interface/wx/webview.h b/interface/wx/webview.h
new file mode 100644 (file)
index 0000000..94d3c68
--- /dev/null
@@ -0,0 +1,651 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webview.h
+// Purpose:     interface of wxWebView
+// Author:      wxWidgets team
+// RCS-ID:      $Id$
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+    Zoom levels availiable in wxWebView
+*/
+enum wxWebViewZoom
+{
+    wxWEB_VIEW_ZOOM_TINY,
+    wxWEB_VIEW_ZOOM_SMALL,
+    wxWEB_VIEW_ZOOM_MEDIUM, //!< default size
+    wxWEB_VIEW_ZOOM_LARGE,
+    wxWEB_VIEW_ZOOM_LARGEST
+};
+
+/**
+    The type of zooming that the web view control can perform
+*/
+enum wxWebViewZoomType
+{
+    /** 
+        The entire layout scales when zooming, including images 
+    */
+    wxWEB_VIEW_ZOOM_TYPE_LAYOUT,
+    /** 
+        Only the text changes in size when zooming, images and other layout
+        elements retain their initial size 
+    */
+    wxWEB_VIEW_ZOOM_TYPE_TEXT
+};
+
+/** 
+    Types of errors that can cause navigation to fail
+*/
+enum wxWebViewNavigationError
+{
+    /** Connection error (timeout, etc.) */
+    wxWEB_NAV_ERR_CONNECTION,
+    /** Invalid certificate */
+    wxWEB_NAV_ERR_CERTIFICATE,
+    /** Authentication required */
+    wxWEB_NAV_ERR_AUTH,
+    /** Other security error */
+    wxWEB_NAV_ERR_SECURITY,
+    /** Requested resource not found */
+    wxWEB_NAV_ERR_NOT_FOUND,
+    /** Invalid request/parameters (e.g. bad URL, bad protocol,
+        unsupported resource type) */
+    wxWEB_NAV_ERR_REQUEST,
+    /** The user cancelled (e.g. in a dialog) */
+    wxWEB_NAV_ERR_USER_CANCELLED,
+    /** Another (exotic) type of error that didn't fit in other categories*/
+    wxWEB_NAV_ERR_OTHER
+};
+
+/** 
+    Type of refresh 
+*/
+enum wxWebViewReloadFlags
+{
+    /** Default reload, will access cache */
+    wxWEB_VIEW_RELOAD_DEFAULT,
+    /** Reload the current view without accessing the cache */
+    wxWEB_VIEW_RELOAD_NO_CACHE 
+};
+
+
+/**
+ * List of available backends for wxWebView
+ */
+enum wxWebViewBackend
+{
+    /** Value that may be passed to wxWebView to let it pick an appropriate
+     * engine for the current platform*/
+    wxWEB_VIEW_BACKEND_DEFAULT,
+
+    /** The WebKit web engine */
+    wxWEB_VIEW_BACKEND_WEBKIT,
+
+    /** Use Microsoft Internet Explorer as web engine */
+    wxWEB_VIEW_BACKEND_IE
+};
+
+/**
+    @class wxWebViewHistoryItem
+  
+    A simple class that contains the URL and title of an element of the history
+    of a wxWebView. 
+   
+    @since 2.9.3
+    @library{wxwebview}
+    @category{webview}
+    
+    @see wxWebView
+ */
+class wxWebViewHistoryItem
+{
+public:
+    /**
+        Construtor.
+    */
+    wxWebViewHistoryItem(const wxString& url, const wxString& title);
+    
+    /**
+        @return The url of the page.
+    */
+    wxString GetUrl();
+    
+    /**
+        @return The title of the page.
+    */
+    wxString GetTitle();
+};
+
+/**
+    @class wxWebViewHandler
+  
+    The base class for handling custom schemes in wxWebView, for example to 
+    allow virtual file system support.
+   
+    @since 2.9.3
+    @library{wxwebview}
+    @category{webview}
+    
+    @see wxWebView
+ */
+class wxWebViewHandler
+{
+public:
+    /**
+        Constructor. Takes the name of the scheme that will be handled by this
+        class for example @c file or @c zip.
+    */
+    wxWebViewHandler(const wxString& scheme);
+
+    /**
+        @return A pointer to the file represented by @c uri.
+    */  
+    virtual wxFSFile* GetFile(const wxString &uri) = 0;
+
+    /**
+        @return The name of the scheme, as passed to the constructor.
+    */
+    virtual wxString GetName() const = 0;
+};
+
+/**
+    @class wxWebView
+  
+    This control may be used to render web (HTML / CSS / javascript) documents.
+    It is designed to allow the creation of multiple backends for each port, 
+    although currently just one is available. It differs from wxHtmlWindow in
+    that each backend is actually a full rendering engine, Trident on MSW and
+    Webkit on OSX and GTK. This allows the correct viewing complex pages with
+    javascript and css. 
+    
+    @section descriptions Backend Descriptions
+    
+    @par wxWEB_VIEW_BACKEND_IE (MSW)
+    
+    The IE backend uses Microsoft's Trident rendering engine, specifically the
+    version used by the locally installed copy of Internet Explorer. As such it
+    is only available for the MSW port. By default recent versions of the 
+    <a href="http://msdn.microsoft.com/en-us/library/aa752085%28v=VS.85%29.aspx">WebBrowser</a>
+    control, which this backend uses, emulate Internet Explorer 7. This can be
+    changed with a registry setting, see 
+    <a href="http://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx#browser_emulation">
+    this</a> article for more information. This backend has full support for
+    custom schemes and virtual file systems.
+    
+    @par wxWEB_VIEW_WEBKIT (GTK)
+    
+    Under GTK the WebKit backend uses 
+    <a href="http://webkitgtk.org/">WebKitGTK+</a>. The current minimum version
+    required is 1.3.1 which ships by default with Ubuntu Natty and Debian
+    Wheezy and has the package name libwebkitgtk-dev. Custom schemes and 
+    virtual files systems are supported under this backend, however embedded
+    resources such as images and stylesheets are currently loaded using the
+    data:// scheme.
+    
+    @par wxWEB_VIEW_WEBKIT (OSX)
+    
+    The OSX WebKit backend uses Apple's 
+    <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Classes/WebView_Class/Reference/Reference.html#//apple_ref/doc/uid/20001903">WebView</a>
+    class. This backend has full support for custom schemes and virtual file
+    systems.
+
+    @section async Asynchronous Notifications
+    
+    Many of the methods in wxWebView are asynchronous, i.e. they return
+    immediately and perform their work in the background. This includes
+    functions such as LoadUrl() and Reload(). To receive notification of the 
+    progress and completion of these functions you need to handle the events
+    that are provided. Specifically @c wxEVT_COMMAND_WEB_VIEW_LOADED notifies
+    when the page or a sub-frame has finished loading and 
+    @c wxEVT_COMMAND_WEB_VIEW_ERROR notifies that an error has occurred.
+    
+    @section vfs Virtual File Systems and Custom Schemes
+    
+    wxWebView supports the registering of custom scheme handlers, for example
+    @c file or @c http. To do this create a new class which inherits from 
+    wxWebViewHandler, where wxWebHandler::GetFile() returns a pointer to a 
+    wxFSFile which represents the given url. You can then register your handler
+    with RegisterHandler() it will be called for all pages and resources.
+    
+    wxWebFileHandler is provided to allow the navigation of pages inside a zip
+    archive. It overrides the @c file scheme and provides support for the 
+    standard @c file syntax as well as paths to archives of the form 
+    @c file:///C:/exmaple/docs.zip;protocol=zip/main.htm 
+  
+    @beginEventEmissionTable{wxWebViewEvent}
+    @event{EVT_WEB_VIEW_NAVIGATING(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_NAVIGATING event, generated before trying
+       to get a resource. This event may be vetoed to prevent navigating to this
+       resource. Note that if the displayed HTML document has several frames, one
+       such event will be generated per frame.
+    @event{EVT_WEB_VIEW_NAVIGATED(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_NAVIGATED event generated after it was
+       confirmed that a resource would be requested. This event may not be vetoed.
+       Note that if the displayed HTML document has several frames, one such event
+       will be generated per frame.
+    @event{EVT_WEB_VIEW_LOADED(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_LOADED event generated when the document
+       is fully loaded and displayed. Note that if the displayed HTML document has 
+       several frames, one such event will be generated per frame.
+    @event{EVT_WEB_VIEW_ERRROR(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_ERROR event generated when a navigation
+       error occurs.
+       The integer associated with this event will be a wxWebNavigationError item.
+       The string associated with this event may contain a backend-specific more
+       precise error message/code.
+    @event{EVT_WEB_VIEW_NEWWINDOW(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_NEWWINDOW event, generated when a new
+       window is created. You must handle this event if you want anything to 
+       happen, for example to load the page in a new window or tab.
+    @event{EVT_WEB_VIEW_TITLE_CHANGED(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED event, generated when 
+       the page title changes. Use GetString to get the title.
+    @endEventTable
+   
+    @since 2.9.3
+    @library{wxwebview}
+    @category{ctrl,webview}
+    @see wxWebViewHandler, wxWebViewEvent
+ */
+class wxWebView : public wxControl
+{
+public:
+
+    /**
+        Creation function for two-step creation.
+    */
+    virtual bool Create(wxWindow* parent,
+                        wxWindowID id,
+                        const wxString& url,
+                        const wxPoint& pos,
+                        const wxSize& size,
+                        long style,
+                        const wxString& name) = 0;
+
+    /**
+        Factory function to create a new wxWebView for two-step creation
+        (you need to call wxWebView::Create on the returned object)
+        @param backend which web engine to use as backend for wxWebView
+        @return the created wxWebView, or NULL if the requested backend is
+                not available
+     */
+    static wxWebView* New(wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT);
+
+    /**
+        Factory function to create a new wxWebView
+        @param parent parent window to create this view in
+        @param id ID of this control
+        @param url URL to load by default in the web view
+        @param pos position to create this control at
+               (you may use wxDefaultPosition if you use sizers)
+        @param size size to create this control with
+               (you may use wxDefaultSize if you use sizers)
+        @param backend which web engine to use as backend for wxWebView
+        @return the created wxWebView, or NULL if the requested backend
+                is not available
+    */
+    static wxWebView* New(wxWindow* parent,
+           wxWindowID id,
+           const wxString& url = wxWebViewDefaultURLStr,
+           const wxPoint& pos = wxDefaultPosition,
+           const wxSize& size = wxDefaultSize,
+           wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT,
+           long style = 0,
+           const wxString& name = wxWebViewNameStr);
+
+    /**
+        Get the title of the current web page, or its URL/path if title is not
+        available.
+    */
+    virtual wxString GetCurrentTitle() const = 0;
+
+   /**
+        Get the URL of the currently displayed document.
+    */
+    virtual wxString GetCurrentURL() const = 0;
+
+    /**
+        Get the HTML source code of the currently displayed document.
+        @return The HTML source code, or an empty string if no page is currently
+                shown.
+    */
+    virtual wxString GetPageSource() const = 0;
+    
+    /**
+        Get the text of the current page.
+    */
+    virtual wxString GetPageText() const = 0;
+    
+    /**
+        Returns whether the web control is currently busy (e.g. loading a page).
+    */
+    virtual bool IsBusy() const = 0;
+
+    /**
+        Returns whether the web control is currently editable
+    */
+    virtual bool IsEditable() const = 0;
+
+    /**
+        Load a web page from a URL
+        @param url The URL of the page to be loaded.
+        @note Web engines generally report errors asynchronously, so if you wish
+            to know whether loading the URL was successful, register to receive
+            navigation error events.
+    */
+    virtual void LoadURL(const wxString& url) = 0;
+
+    /**
+        Opens a print dialog so that the user may print the currently
+        displayed page.
+    */
+    virtual void Print() = 0;
+    
+    /**
+        Registers a custom scheme handler.
+        @param handler A shared pointer to a wxWebHandler.
+    */
+    virtual void RegisterHandler(wxSharedPtr<wxWebViewHandler> handler) = 0;
+
+    /**
+        Reload the currently displayed URL.
+        @param flags A bit array that may optionally contain reload options.
+    */
+    virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT) = 0;
+    
+    /**
+        Runs the given javascript code. 
+    */
+    virtual void RunScript(const wxString& javascript) = 0;
+    
+    /**
+        Set the editable property of the web control. Enabling allows the user
+        to edit the page even if the @c contenteditable attribute is not set.
+        The exact capabilities vary with the backend being used.
+    */
+    virtual void SetEditable(bool enable = true) = 0;
+
+    /**
+        Set the displayed page source to the contents of the given string.
+        @param html    The string that contains the HTML data to display.
+        @param baseUrl URL assigned to the HTML data, to be used to resolve
+                    relative paths, for instance.
+    */
+    virtual void SetPage(const wxString& html, const wxString& baseUrl) = 0;
+
+    /**
+        Set the displayed page source to the contents of the given stream.
+        @param html    The stream to read HTML data from.
+        @param baseUrl URL assigned to the HTML data, to be used to resolve
+                    relative paths, for instance.
+    */
+    virtual void SetPage(wxInputStream& html, wxString baseUrl);
+
+    /**
+        Stop the current page loading process, if any.
+        May trigger an error event of type @c wxWEB_NAV_ERR_USER_CANCELLED.
+        TODO: make @c wxWEB_NAV_ERR_USER_CANCELLED errors uniform across ports.
+    */
+    virtual void Stop() = 0;
+
+    /**
+        @name Clipboard
+    */
+
+    /**
+        Returns @true if the current selection can be copied.
+        
+        @note This always returns @c true on the OSX WebKit backend.
+    */
+    virtual bool CanCopy() const = 0;
+
+    /**
+        Returns @true if the current selection can be cut.
+        
+         @note This always returns @c true on the OSX WebKit backend.
+    */
+    virtual bool CanCut() const = 0;
+
+    /**
+        Returns @true if data can be pasted.
+        
+        @note This always returns @c true on the OSX WebKit backend.
+    */
+    virtual bool CanPaste() const = 0;
+
+    /**
+        Copies the current selection. 
+    */
+    virtual void Copy() = 0;
+
+    /**
+        Cuts the current selection.
+    */
+    virtual void Cut() = 0;
+
+    /**
+        Pastes the current data.
+    */
+    virtual void Paste() = 0;
+
+    /**
+        @name History
+    */
+
+    /** 
+        Returns @true if it is possible to navigate backward in the history of
+        visited pages.
+    */
+    virtual bool CanGoBack() const = 0;
+
+    /** 
+        Returns @true if it is possible to navigate forward in the history of
+        visited pages.
+    */
+    virtual bool CanGoForward() const = 0;
+
+    /**
+        Clear the history, this will also remove the visible page.
+    */
+    virtual void ClearHistory() = 0;
+
+    /**
+        Enable or disable the history. This will also clear the history.
+    */
+    virtual void EnableHistory(bool enable = true) = 0;
+
+    /**
+        Returns a list of items in the back history. The first item in the
+        vector is the first page that was loaded by the control.
+    */
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetBackwardHistory() = 0;
+
+    /**
+        Returns a list of items in the forward history. The first item in the 
+        vector is the next item in the history with respect to the curently 
+        loaded page.
+    */
+    virtual wxVector<wxSharedPtr<wxWebViewHistoryItem> > GetForwardHistory() = 0;
+
+    /** 
+        Navigate back in the history of visited pages.
+        Only valid if CanGoBack() returns true.
+    */
+    virtual void GoBack() = 0;
+
+    /**
+        Navigate forward in the history of visited pages.
+        Only valid if CanGoForward() returns true.
+    */
+    virtual void GoForward() = 0;
+
+    /**
+        Loads a history item. 
+    */
+    virtual void LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item) = 0;
+    
+    /**
+        @name Selection
+    */
+    
+    /**
+        Clears the current selection. 
+    */
+    virtual void ClearSelection() = 0;
+    
+    /**
+        Deletes the current selection. Note that for @c wxWEB_VIEW_BACKEND_WEBKIT
+        the selection must be editable, either through SetEditable or the 
+        correct HTML attribute.
+    */
+    virtual void DeleteSelection() = 0;
+    
+    /**
+        Returns the currently selected source, if any.
+    */
+    virtual wxString GetSelectedSource() const = 0;
+    
+    /**
+        Returns the currently selected text, if any.
+    */
+    virtual wxString GetSelectedText() const = 0;
+
+    /**
+        Returns @true if there is a current selection.
+    */
+    virtual bool HasSelection() const = 0;
+
+    /**
+        Selects the entire page.
+    */
+    virtual void SelectAll() = 0;
+
+    /**
+        @name Undo / Redo
+    */
+
+    /**
+        Returns @true if there is an action to redo.
+    */
+    virtual bool CanRedo() const = 0;
+
+    /**
+        Returns @true if there is an action to undo.
+    */
+    virtual bool CanUndo() const = 0;
+
+    /**
+        Redos the last action.
+    */
+    virtual void Redo() = 0;
+
+    /**
+        Undos the last action.
+    */
+    virtual void Undo() = 0;
+
+    /**
+        @name Zoom
+    */
+
+    /**
+        Retrieve whether the current HTML engine supports a zoom type.
+        @param type The zoom type to test.
+        @return Whether this type of zoom is supported by this HTML engine
+                (and thus can be set through SetZoomType()).
+    */
+    virtual bool CanSetZoomType(wxWebViewZoomType type) const = 0;
+
+    /**
+        Get the zoom factor of the page.
+        @return The current level of zoom.
+    */
+    virtual wxWebViewZoom GetZoom() const = 0;
+
+    /**
+        Get how the zoom factor is currently interpreted.
+        @return How the zoom factor is currently interpreted by the HTML engine.
+    */
+    virtual wxWebViewZoomType GetZoomType() const = 0;
+
+    /**
+        Set the zoom factor of the page.
+        @param zoom How much to zoom (scale) the HTML document.
+    */
+    virtual void SetZoom(wxWebViewZoom zoom) = 0;
+
+    /**
+        Set how to interpret the zoom factor.
+        @param zoomType How the zoom factor should be interpreted by the
+                        HTML engine.
+        @note invoke    CanSetZoomType() first, some HTML renderers may not
+                        support all zoom types.
+    */
+    virtual void SetZoomType(wxWebViewZoomType zoomType) = 0;
+};
+
+
+
+
+/**
+    @class wxWebViewEvent
+
+    A navigation  event holds information about events associated with 
+    wxWebView objects.
+
+    @beginEventEmissionTable{wxWebViewEvent}
+    @event{EVT_WEB_VIEW_NAVIGATING(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_NAVIGATING event, generated before trying
+       to get a resource. This event may be vetoed to prevent navigating to this
+       resource. Note that if the displayed HTML document has several frames, one
+       such event will be generated per frame.
+    @event{EVT_WEB_VIEW_NAVIGATED(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_NAVIGATED event generated after it was
+       confirmed that a resource would be requested. This event may not be vetoed.
+       Note that if the displayed HTML document has several frames, one such event
+       will be generated per frame.
+    @event{EVT_WEB_VIEW_LOADED(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_LOADED event generated when the document
+       is fully loaded and displayed. Note that if the displayed HTML document has 
+       several frames, one such event will be generated per frame.
+    @event{EVT_WEB_VIEW_ERRROR(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_ERROR event generated when a navigation
+       error occurs.
+       The integer associated with this event will be a wxWebNavigationError item.
+       The string associated with this event may contain a backend-specific more
+       precise error message/code.
+    @event{EVT_WEB_VIEW_NEWWINDOW(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_NEWWINDOW event, generated when a new
+       window is created. You must handle this event if you want anything to 
+       happen, for example to load the page in a new window or tab.
+    @event{EVT_WEB_VIEW_TITLE_CHANGED(id, func)}
+       Process a @c wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED event, generated when 
+       the page title changes. Use GetString to get the title.
+    @endEventTable
+    
+    @since 2.9.3
+    @library{wxwebview}
+    @category{events,webview}
+
+    @see wxWebView
+*/
+class wxWebViewEvent : public wxNotifyEvent
+{
+public:
+    wxWebViewEvent();
+    wxWebViewEvent(wxEventType type, int id, const wxString href,
+                   const wxString target);
+
+    /**
+        Get the name of the target frame which the url of this event
+        has been or will be loaded into. This may return an emptry string
+        if the frame is not avaliable.
+    */
+    const wxString& GetTarget() const;
+
+    /**
+        Get the URL being visited
+    */
+    const wxString& GetURL() const;
+};
\ No newline at end of file
diff --git a/interface/wx/webviewarchivehandler.h b/interface/wx/webviewarchivehandler.h
new file mode 100644 (file)
index 0000000..bb85475
--- /dev/null
@@ -0,0 +1,32 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webviewarchivehandler.h
+// Purpose:     interface of wxWebViewArchiveHandler
+// Author:      wxWidgets team
+// RCS-ID:      $Id$
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+    @class wxWebViewArchiveHandler
+  
+    A custom handler for the file scheme which also supports loading from 
+    archives. The syntax for wxWebViewArchiveHandler differs from virtual file 
+    systems in the rest of wxWidgets by using a syntax such as
+    <code> scheme:///C:/exmaple/docs.zip;protocol=zip/main.htm </code> 
+    Currently the only supported protocol is @c zip. 
+   
+    @since 2.9.3
+    @library{wxwebview}
+    @category{webview}
+    
+    @see wxWebView, wxWebViewHandler
+ */
+class wxWebViewArchiveHandler : public wxWebViewHandler
+{
+public:
+    /**
+        Constructor.
+    */
+    wxWebViewArchiveHandler(const wxString& scheme);
+    virtual wxFSFile* GetFile(const wxString &uri);
+};
\ No newline at end of file
index 5073244c206199e7055ea096ee415b5c6e0ded59..7e0e9978264e1d417fb8a85c94ab8aed57a53459 100644 (file)
@@ -87,6 +87,7 @@
     <subproject id="uiaction" template="sub"/>
     <subproject id="validate" template="sub"/>
     <subproject id="vscroll" template="sub"/>
+    <subproject id="webview" template="sub"/>
     <subproject id="widgets" template="sub"/>
     <subproject id="wizard" template="sub"/>
     <subproject id="wrapsizer" template="sub"/>
diff --git a/samples/webview/Makefile.in b/samples/webview/Makefile.in
new file mode 100644 (file)
index 0000000..da27af1
--- /dev/null
@@ -0,0 +1,198 @@
+# =========================================================================
+#     This makefile was generated by
+#     Bakefile 0.2.9 (http://www.bakefile.org)
+#     Do not modify, all changes will be overwritten!
+# =========================================================================
+
+
+@MAKE_SET@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+INSTALL = @INSTALL@
+EXEEXT = @EXEEXT@
+WINDRES = @WINDRES@
+SETFILE = @SETFILE@
+NM = @NM@
+BK_DEPS = @BK_DEPS@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+LIBS = @LIBS@
+LDFLAGS_GUI = @LDFLAGS_GUI@
+CXX = @CXX@
+CXXFLAGS = @CXXFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
+TOOLKIT = @TOOLKIT@
+TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
+TOOLKIT_VERSION = @TOOLKIT_VERSION@
+TOOLCHAIN_FULLNAME = @TOOLCHAIN_FULLNAME@
+EXTRALIBS = @EXTRALIBS@
+EXTRALIBS_GUI = @EXTRALIBS_GUI@
+EXTRALIBS_SDL = @EXTRALIBS_SDL@
+CXXWARNINGS = @CXXWARNINGS@
+HOST_SUFFIX = @HOST_SUFFIX@
+SAMPLES_RPATH_FLAG = @SAMPLES_RPATH_FLAG@
+wx_top_builddir = @wx_top_builddir@
+
+### Variables: ###
+
+DESTDIR = 
+WX_RELEASE = 2.9
+WX_VERSION = $(WX_RELEASE).3
+LIBDIRNAME = $(wx_top_builddir)/lib
+WEBVIEW_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
+       $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
+       -I$(srcdir) $(__DLLFLAG_p) -I$(srcdir)/../../samples $(CXXWARNINGS) \
+       $(CPPFLAGS) $(CXXFLAGS)
+WEBVIEW_OBJECTS =  \
+       $(__webview_os2_lib_res) \
+       webview_webview.o \
+       $(__webview___win32rc)
+
+### Conditionally set variables: ###
+
+@COND_DEPS_TRACKING_0@CXXC = $(CXX)
+@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
+@COND_USE_PLUGINS_0@PLUGIN_ADV_EXTRALIBS = $(EXTRALIBS_SDL)
+@COND_USE_GUI_0@PORTNAME = base
+@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
+@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
+@COND_BUILD_debug@WXDEBUGFLAG = d
+@COND_UNICODE_1@WXUNICODEFLAG = u
+@COND_WXUNIV_1@WXUNIVNAME = univ
+@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
+@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
+@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
+@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI = 
+@COND_PLATFORM_MAC_0@__webview___mac_setfilecmd = @true
+@COND_PLATFORM_MAC_1@__webview___mac_setfilecmd = \
+@COND_PLATFORM_MAC_1@  $(SETFILE) -t APPL webview$(EXEEXT)
+@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
+@COND_WXUNIV_1@__WXUNIV_DEFINE_p_2 = --define __WXUNIVERSAL__
+@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0
+@COND_DEBUG_FLAG_0@__DEBUG_DEFINE_p_2 = --define wxDEBUG_LEVEL=0
+@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
+@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_2 = --define wxNO_EXCEPTIONS
+@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
+@COND_USE_RTTI_0@__RTTI_DEFINE_p_2 = --define wxNO_RTTI
+@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
+@COND_USE_THREADS_0@__THREAD_DEFINE_p_2 = --define wxNO_THREADS
+@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
+@COND_SHARED_1@__DLLFLAG_p_2 = --define WXUSINGDLL
+COND_PLATFORM_OS2_1___webview___os2_emxbindcmd = $(NM) webview$(EXEEXT) | if \
+       grep -q pmwin.763 ; then emxbind -ep webview$(EXEEXT) ; fi
+@COND_PLATFORM_OS2_1@__webview___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___webview___os2_emxbindcmd)
+@COND_TOOLKIT_MSW@__RCDEFDIR_p_1 = --include-dir \
+@COND_TOOLKIT_MSW@     $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
+@COND_PLATFORM_OS2_1@__webview_os2_lib_res = \
+@COND_PLATFORM_OS2_1@  $(top_srcdir)/include/wx/os2/wx.res
+@COND_PLATFORM_MACOSX_1@__webview_app_Contents_PkgInfo___depname \
+@COND_PLATFORM_MACOSX_1@       = webview.app/Contents/PkgInfo
+@COND_PLATFORM_MACOSX_1@__webview_bundle___depname = webview_bundle
+@COND_TOOLKIT_MAC@____webview_BUNDLE_TGT_REF_DEP = \
+@COND_TOOLKIT_MAC@     $(__webview_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_OSX_CARBON@____webview_BUNDLE_TGT_REF_DEP \
+@COND_TOOLKIT_OSX_CARBON@      = $(__webview_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_OSX_COCOA@____webview_BUNDLE_TGT_REF_DEP \
+@COND_TOOLKIT_OSX_COCOA@       = $(__webview_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_OSX_IPHONE@____webview_BUNDLE_TGT_REF_DEP \
+@COND_TOOLKIT_OSX_IPHONE@      = $(__webview_app_Contents_PkgInfo___depname)
+@COND_TOOLKIT_COCOA@____webview_BUNDLE_TGT_REF_DEP = \
+@COND_TOOLKIT_COCOA@   $(__webview_app_Contents_PkgInfo___depname)
+COND_MONOLITHIC_0___WXLIB_WEBVIEW_p = \
+       -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_WEBVIEW_p = $(COND_MONOLITHIC_0___WXLIB_WEBVIEW_p)
+COND_MONOLITHIC_0___WXLIB_STC_p = \
+       -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_STC_p = $(COND_MONOLITHIC_0___WXLIB_STC_p)
+COND_MONOLITHIC_0___WXLIB_ADV_p = \
+       -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_ADV_p = $(COND_MONOLITHIC_0___WXLIB_ADV_p)
+COND_MONOLITHIC_0___WXLIB_CORE_p = \
+       -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
+COND_MONOLITHIC_0___WXLIB_BASE_p = \
+       -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
+@COND_PLATFORM_WIN32_1@__webview___win32rc = webview_sample_rc.o
+COND_MONOLITHIC_1___WXLIB_MONO_p = \
+       -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
+@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@__LIB_TIFF_p \
+@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ = \
+@COND_USE_GUI_1_wxUSE_LIBTIFF_builtin@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@__LIB_JPEG_p \
+@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ = \
+@COND_USE_GUI_1_wxUSE_LIBJPEG_builtin@ -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@__LIB_PNG_p \
+@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@  = \
+@COND_USE_GUI_1_wxUSE_LIBPNG_builtin@  -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_wxUSE_ZLIB_builtin@__LIB_ZLIB_p = \
+@COND_wxUSE_ZLIB_builtin@      -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+COND_wxUSE_REGEX_builtin___LIB_REGEX_p = \
+       -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+@COND_wxUSE_REGEX_builtin@__LIB_REGEX_p = $(COND_wxUSE_REGEX_builtin___LIB_REGEX_p)
+@COND_wxUSE_EXPAT_builtin@__LIB_EXPAT_p = \
+@COND_wxUSE_EXPAT_builtin@     -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
+
+### Targets: ###
+
+all: webview$(EXEEXT) $(__webview_bundle___depname)
+
+install: 
+
+uninstall: 
+
+install-strip: install
+
+clean: 
+       rm -rf ./.deps ./.pch
+       rm -f ./*.o
+       rm -f webview$(EXEEXT)
+       rm -rf webview.app
+
+distclean: clean
+       rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
+
+webview$(EXEEXT): $(WEBVIEW_OBJECTS) $(__webview___win32rc)
+       $(CXX) -o $@ $(WEBVIEW_OBJECTS)    -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(SAMPLES_RPATH_FLAG) $(LDFLAGS)  $(__WXLIB_WEBVIEW_p)  $(__WXLIB_STC_p)  $(__WXLIB_ADV_p) $(PLUGIN_ADV_EXTRALIBS) $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  -lwxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE) $(LIBS)
+       
+       $(__webview___mac_setfilecmd)
+       $(__webview___os2_emxbindcmd)
+
+@COND_PLATFORM_MACOSX_1@webview.app/Contents/PkgInfo: webview$(EXEEXT) $(top_srcdir)/src/osx/carbon/Info.plist.in $(top_srcdir)/src/osx/carbon/wxmac.icns
+@COND_PLATFORM_MACOSX_1@       mkdir -p webview.app/Contents
+@COND_PLATFORM_MACOSX_1@       mkdir -p webview.app/Contents/MacOS
+@COND_PLATFORM_MACOSX_1@       mkdir -p webview.app/Contents/Resources
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       sed -e "s/IDENTIFIER/`echo $(srcdir) | sed -e 's,\.\./,,g' | sed -e 's,/,.,g'`/" \
+@COND_PLATFORM_MACOSX_1@       -e "s/EXECUTABLE/webview/" \
+@COND_PLATFORM_MACOSX_1@       -e "s/VERSION/$(WX_VERSION)/" \
+@COND_PLATFORM_MACOSX_1@       $(top_srcdir)/src/osx/carbon/Info.plist.in >webview.app/Contents/Info.plist
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       echo -n "APPL????" >webview.app/Contents/PkgInfo
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       ln -f webview$(EXEEXT) webview.app/Contents/MacOS/webview
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       
+@COND_PLATFORM_MACOSX_1@       cp -f $(top_srcdir)/src/osx/carbon/wxmac.icns webview.app/Contents/Resources/wxmac.icns
+
+@COND_PLATFORM_MACOSX_1@webview_bundle: $(____webview_BUNDLE_TGT_REF_DEP)
+
+webview_webview.o: $(srcdir)/webview.cpp
+       $(CXXC) -c -o $@ $(WEBVIEW_CXXFLAGS) $(srcdir)/webview.cpp
+
+webview_sample_rc.o: $(srcdir)/../sample.rc
+       $(WINDRES) -i$< -o$@    --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_2) $(__DEBUG_DEFINE_p_2)  $(__EXCEPTIONS_DEFINE_p_2) $(__RTTI_DEFINE_p_2) $(__THREAD_DEFINE_p_2)   --include-dir $(srcdir) $(__DLLFLAG_p_2) --include-dir $(srcdir)/../../samples $(__RCDEFDIR_p_1) --include-dir $(top_srcdir)/include
+
+
+# Include dependency info, if present:
+@IF_GNU_MAKE@-include ./.deps/*.d
+
+.PHONY: all install uninstall clean distclean webview_bundle
diff --git a/samples/webview/makefile.bcc b/samples/webview/makefile.bcc
new file mode 100644 (file)
index 0000000..1f59e68
--- /dev/null
@@ -0,0 +1,254 @@
+# =========================================================================\r
+#     This makefile was generated by\r
+#     Bakefile 0.2.9 (http://www.bakefile.org)\r
+#     Do not modify, all changes will be overwritten!\r
+# =========================================================================\r
+\r
+.autodepend\r
+\r
+!ifndef BCCDIR\r
+!ifndef MAKEDIR\r
+!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4\r
+!endif\r
+BCCDIR = $(MAKEDIR)\..\r
+!endif\r
+\r
+!include ../../build/msw/config.bcc\r
+\r
+# -------------------------------------------------------------------------\r
+# Do not modify the rest of this file!\r
+# -------------------------------------------------------------------------\r
+\r
+### Variables: ###\r
+\r
+WX_RELEASE_NODOT = 29\r
+COMPILER_PREFIX = bcc\r
+OBJS = \\r
+       $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\r
+LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)\r
+SETUPHDIR = \\r
+       $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)\r
+WEBVIEW_CXXFLAGS = $(__RUNTIME_LIBS_7) -I$(BCCDIR)\include $(__DEBUGINFO) \\r
+       $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_6) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \\r
+       $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \\r
+       $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \\r
+       $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \\r
+       $(____CAIRO_INCLUDEDIR_FILENAMES_p) -I. $(__DLLFLAG_p) -I.\..\..\samples \\r
+       -DNOPCH $(CPPFLAGS) $(CXXFLAGS)\r
+WEBVIEW_OBJECTS =  \\r
+       $(OBJS)\webview_webview.obj\r
+\r
+### Conditionally set variables: ###\r
+\r
+!if "$(USE_GUI)" == "0"\r
+PORTNAME = base\r
+!endif\r
+!if "$(USE_GUI)" == "1"\r
+PORTNAME = msw\r
+!endif\r
+!if "$(BUILD)" == "debug"\r
+WXDEBUGFLAG = d\r
+!endif\r
+!if "$(UNICODE)" == "1"\r
+WXUNICODEFLAG = u\r
+!endif\r
+!if "$(WXUNIV)" == "1"\r
+WXUNIVNAME = univ\r
+!endif\r
+!if "$(SHARED)" == "1"\r
+WXDLLFLAG = dll\r
+!endif\r
+!if "$(SHARED)" == "0"\r
+LIBTYPE_SUFFIX = lib\r
+!endif\r
+!if "$(SHARED)" == "1"\r
+LIBTYPE_SUFFIX = dll\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
+EXTRALIBS_FOR_BASE = \r
+!endif\r
+!if "$(MONOLITHIC)" == "1"\r
+EXTRALIBS_FOR_BASE =  \r
+!endif\r
+!if "$(BUILD)" == "debug"\r
+__OPTIMIZEFLAG_2 = -Od\r
+!endif\r
+!if "$(BUILD)" == "release"\r
+__OPTIMIZEFLAG_2 = -O2\r
+!endif\r
+!if "$(USE_THREADS)" == "0"\r
+__THREADSFLAG_5 = \r
+!endif\r
+!if "$(USE_THREADS)" == "1"\r
+__THREADSFLAG_5 = mt\r
+!endif\r
+!if "$(USE_THREADS)" == "0"\r
+__THREADSFLAG_6 = \r
+!endif\r
+!if "$(USE_THREADS)" == "1"\r
+__THREADSFLAG_6 = -tWM\r
+!endif\r
+!if "$(RUNTIME_LIBS)" == "dynamic"\r
+__RUNTIME_LIBS_7 = -tWR\r
+!endif\r
+!if "$(RUNTIME_LIBS)" == "static"\r
+__RUNTIME_LIBS_7 = \r
+!endif\r
+!if "$(RUNTIME_LIBS)" == "dynamic"\r
+__RUNTIME_LIBS_8 = i\r
+!endif\r
+!if "$(RUNTIME_LIBS)" == "static"\r
+__RUNTIME_LIBS_8 = \r
+!endif\r
+!if "$(WXUNIV)" == "1"\r
+__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__\r
+!endif\r
+!if "$(WXUNIV)" == "1"\r
+__WXUNIV_DEFINE_p_1 = -d__WXUNIVERSAL__\r
+!endif\r
+!if "$(DEBUG_FLAG)" == "0"\r
+__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0\r
+!endif\r
+!if "$(DEBUG_FLAG)" == "0"\r
+__DEBUG_DEFINE_p_1 = -dwxDEBUG_LEVEL=0\r
+!endif\r
+!if "$(BUILD)" == "release"\r
+__NDEBUG_DEFINE_p = -DNDEBUG\r
+!endif\r
+!if "$(BUILD)" == "release"\r
+__NDEBUG_DEFINE_p_1 = -dNDEBUG\r
+!endif\r
+!if "$(USE_EXCEPTIONS)" == "0"\r
+__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS\r
+!endif\r
+!if "$(USE_EXCEPTIONS)" == "0"\r
+__EXCEPTIONS_DEFINE_p_1 = -dwxNO_EXCEPTIONS\r
+!endif\r
+!if "$(USE_RTTI)" == "0"\r
+__RTTI_DEFINE_p = -DwxNO_RTTI\r
+!endif\r
+!if "$(USE_RTTI)" == "0"\r
+__RTTI_DEFINE_p_1 = -dwxNO_RTTI\r
+!endif\r
+!if "$(USE_THREADS)" == "0"\r
+__THREAD_DEFINE_p = -DwxNO_THREADS\r
+!endif\r
+!if "$(USE_THREADS)" == "0"\r
+__THREAD_DEFINE_p_1 = -dwxNO_THREADS\r
+!endif\r
+!if "$(UNICODE)" == "0"\r
+__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0\r
+!endif\r
+!if "$(UNICODE)" == "1"\r
+__UNICODE_DEFINE_p = -D_UNICODE\r
+!endif\r
+!if "$(UNICODE)" == "0"\r
+__UNICODE_DEFINE_p_1 = -dwxUSE_UNICODE=0\r
+!endif\r
+!if "$(UNICODE)" == "1"\r
+__UNICODE_DEFINE_p_1 = -d_UNICODE\r
+!endif\r
+!if "$(MSLU)" == "1"\r
+__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1\r
+!endif\r
+!if "$(MSLU)" == "1"\r
+__MSLU_DEFINE_p_1 = -dwxUSE_UNICODE_MSLU=1\r
+!endif\r
+!if "$(USE_CAIRO)" == "1"\r
+____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo\r
+!endif\r
+!if "$(USE_CAIRO)" == "1"\r
+____CAIRO_INCLUDEDIR_FILENAMES_1_p = -i$(CAIRO_ROOT)\include\cairo\r
+!endif\r
+!if "$(SHARED)" == "1"\r
+__DLLFLAG_p = -DWXUSINGDLL\r
+!endif\r
+!if "$(SHARED)" == "1"\r
+__DLLFLAG_p_1 = -dWXUSINGDLL\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
+__WXLIB_WEBVIEW_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
+__WXLIB_STC_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
+__WXLIB_ADV_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
+__WXLIB_CORE_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "0"\r
+__WXLIB_BASE_p = \\r
+       wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib\r
+!endif\r
+!if "$(MONOLITHIC)" == "1"\r
+__WXLIB_MONO_p = \\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib\r
+!endif\r
+!if "$(USE_GUI)" == "1"\r
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib\r
+!endif\r
+!if "$(USE_GUI)" == "1"\r
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib\r
+!endif\r
+!if "$(USE_GUI)" == "1"\r
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib\r
+!endif\r
+!if "$(MSLU)" == "1"\r
+__UNICOWS_LIB_p = unicows.lib\r
+!endif\r
+!if "$(USE_CAIRO)" == "1"\r
+__CAIRO_LIB_p = cairo.lib\r
+!endif\r
+!if "$(USE_CAIRO)" == "1"\r
+____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib\r
+!endif\r
+!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"\r
+__DEBUGINFO = -v\r
+!endif\r
+!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"\r
+__DEBUGINFO = -v-\r
+!endif\r
+!if "$(DEBUG_INFO)" == "0"\r
+__DEBUGINFO = -v-\r
+!endif\r
+!if "$(DEBUG_INFO)" == "1"\r
+__DEBUGINFO = -v\r
+!endif\r
+\r
+\r
+all: $(OBJS)\r
+$(OBJS):\r
+       -if not exist $(OBJS) mkdir $(OBJS)\r
+\r
+### Targets: ###\r
+\r
+all: $(OBJS)\webview.exe\r
+\r
+clean: \r
+       -if exist $(OBJS)\*.obj del $(OBJS)\*.obj\r
+       -if exist $(OBJS)\*.res del $(OBJS)\*.res\r
+       -if exist $(OBJS)\*.csm del $(OBJS)\*.csm\r
+       -if exist $(OBJS)\webview.exe del $(OBJS)\webview.exe\r
+       -if exist $(OBJS)\webview.tds del $(OBJS)\webview.tds\r
+       -if exist $(OBJS)\webview.ilc del $(OBJS)\webview.ilc\r
+       -if exist $(OBJS)\webview.ild del $(OBJS)\webview.ild\r
+       -if exist $(OBJS)\webview.ilf del $(OBJS)\webview.ilf\r
+       -if exist $(OBJS)\webview.ils del $(OBJS)\webview.ils\r
+\r
+$(OBJS)\webview.exe: $(WEBVIEW_OBJECTS)  $(OBJS)\webview_sample.res\r
+       ilink32 -Tpe -q  -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO)  -L$(LIBDIRNAME) -aa $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @&&|\r
+       c0w32.obj $(WEBVIEW_OBJECTS),$@,, $(__WXLIB_WEBVIEW_p)  $(__WXLIB_STC_p)  $(__WXLIB_ADV_p)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  wxscintilla$(WXDEBUGFLAG).lib $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,, $(OBJS)\webview_sample.res\r
+|\r
+\r
+$(OBJS)\webview_webview.obj: .\webview.cpp\r
+       $(CXX) -q -c -P -o$@ $(WEBVIEW_CXXFLAGS) .\webview.cpp\r
+\r
+$(OBJS)\webview_sample.res: .\..\sample.rc\r
+       brcc32 -32 -r -fo$@ -i$(BCCDIR)\include    -d__WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) -i$(SETUPHDIR) -i.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) -i. $(__DLLFLAG_p_1) -i.\..\..\samples -dNOPCH .\..\sample.rc\r
+\r
diff --git a/samples/webview/makefile.gcc b/samples/webview/makefile.gcc
new file mode 100644 (file)
index 0000000..25220f5
--- /dev/null
@@ -0,0 +1,248 @@
+# =========================================================================\r
+#     This makefile was generated by\r
+#     Bakefile 0.2.9 (http://www.bakefile.org)\r
+#     Do not modify, all changes will be overwritten!\r
+# =========================================================================\r
+\r
+include ../../build/msw/config.gcc\r
+\r
+# -------------------------------------------------------------------------\r
+# Do not modify the rest of this file!\r
+# -------------------------------------------------------------------------\r
+\r
+### Variables: ###\r
+\r
+CPPDEPS = -MT$@ -MF$@.d -MD -MP\r
+WX_RELEASE_NODOT = 29\r
+COMPILER_PREFIX = gcc\r
+OBJS = \\r
+       $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\r
+LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)\r
+SETUPHDIR = \\r
+       $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)\r
+WEBVIEW_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \\r
+       $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \\r
+       $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \\r
+       $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \\r
+       $(__MSLU_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\include \\r
+       $(____CAIRO_INCLUDEDIR_FILENAMES_p) -W -Wall -I. $(__DLLFLAG_p) \\r
+       -I.\..\..\samples -DNOPCH $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \\r
+       -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)\r
+WEBVIEW_OBJECTS =  \\r
+       $(OBJS)\webview_webview.o \\r
+       $(OBJS)\webview_sample_rc.o\r
+\r
+### Conditionally set variables: ###\r
+\r
+ifeq ($(GCC_VERSION),2.95)\r
+GCCFLAGS = -fvtable-thunks\r
+endif\r
+ifeq ($(USE_GUI),0)\r
+PORTNAME = base\r
+endif\r
+ifeq ($(USE_GUI),1)\r
+PORTNAME = msw\r
+endif\r
+ifeq ($(BUILD),debug)\r
+WXDEBUGFLAG = d\r
+endif\r
+ifeq ($(UNICODE),1)\r
+WXUNICODEFLAG = u\r
+endif\r
+ifeq ($(WXUNIV),1)\r
+WXUNIVNAME = univ\r
+endif\r
+ifeq ($(SHARED),1)\r
+WXDLLFLAG = dll\r
+endif\r
+ifeq ($(SHARED),0)\r
+LIBTYPE_SUFFIX = lib\r
+endif\r
+ifeq ($(SHARED),1)\r
+LIBTYPE_SUFFIX = dll\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
+EXTRALIBS_FOR_BASE = \r
+endif\r
+ifeq ($(MONOLITHIC),1)\r
+EXTRALIBS_FOR_BASE =  \r
+endif\r
+ifeq ($(BUILD),debug)\r
+__OPTIMIZEFLAG_2 = -O0\r
+endif\r
+ifeq ($(BUILD),release)\r
+__OPTIMIZEFLAG_2 = -O2\r
+endif\r
+ifeq ($(USE_RTTI),0)\r
+__RTTIFLAG_5 = -fno-rtti\r
+endif\r
+ifeq ($(USE_RTTI),1)\r
+__RTTIFLAG_5 = \r
+endif\r
+ifeq ($(USE_EXCEPTIONS),0)\r
+__EXCEPTIONSFLAG_6 = -fno-exceptions\r
+endif\r
+ifeq ($(USE_EXCEPTIONS),1)\r
+__EXCEPTIONSFLAG_6 = \r
+endif\r
+ifeq ($(WXUNIV),1)\r
+__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__\r
+endif\r
+ifeq ($(WXUNIV),1)\r
+__WXUNIV_DEFINE_p_1 = --define __WXUNIVERSAL__\r
+endif\r
+ifeq ($(DEBUG_FLAG),0)\r
+__DEBUG_DEFINE_p = -DwxDEBUG_LEVEL=0\r
+endif\r
+ifeq ($(DEBUG_FLAG),0)\r
+__DEBUG_DEFINE_p_1 = --define wxDEBUG_LEVEL=0\r
+endif\r
+ifeq ($(BUILD),release)\r
+__NDEBUG_DEFINE_p = -DNDEBUG\r
+endif\r
+ifeq ($(BUILD),release)\r
+__NDEBUG_DEFINE_p_1 = --define NDEBUG\r
+endif\r
+ifeq ($(USE_EXCEPTIONS),0)\r
+__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS\r
+endif\r
+ifeq ($(USE_EXCEPTIONS),0)\r
+__EXCEPTIONS_DEFINE_p_1 = --define wxNO_EXCEPTIONS\r
+endif\r
+ifeq ($(USE_RTTI),0)\r
+__RTTI_DEFINE_p = -DwxNO_RTTI\r
+endif\r
+ifeq ($(USE_RTTI),0)\r
+__RTTI_DEFINE_p_1 = --define wxNO_RTTI\r
+endif\r
+ifeq ($(USE_THREADS),0)\r
+__THREAD_DEFINE_p = -DwxNO_THREADS\r
+endif\r
+ifeq ($(USE_THREADS),0)\r
+__THREAD_DEFINE_p_1 = --define wxNO_THREADS\r
+endif\r
+ifeq ($(UNICODE),0)\r
+__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0\r
+endif\r
+ifeq ($(UNICODE),1)\r
+__UNICODE_DEFINE_p = -D_UNICODE\r
+endif\r
+ifeq ($(UNICODE),0)\r
+__UNICODE_DEFINE_p_1 = --define wxUSE_UNICODE=0\r
+endif\r
+ifeq ($(UNICODE),1)\r
+__UNICODE_DEFINE_p_1 = --define _UNICODE\r
+endif\r
+ifeq ($(MSLU),1)\r
+__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1\r
+endif\r
+ifeq ($(MSLU),1)\r
+__MSLU_DEFINE_p_1 = --define wxUSE_UNICODE_MSLU=1\r
+endif\r
+ifeq ($(USE_CAIRO),1)\r
+____CAIRO_INCLUDEDIR_FILENAMES_p = -I$(CAIRO_ROOT)\include\cairo\r
+endif\r
+ifeq ($(USE_CAIRO),1)\r
+__CAIRO_INCLUDEDIR_p = --include-dir $(CAIRO_ROOT)/include/cairo\r
+endif\r
+ifeq ($(SHARED),1)\r
+__DLLFLAG_p = -DWXUSINGDLL\r
+endif\r
+ifeq ($(SHARED),1)\r
+__DLLFLAG_p_1 = --define WXUSINGDLL\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
+__WXLIB_WEBVIEW_p = \\r
+       -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
+__WXLIB_STC_p = \\r
+       -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
+__WXLIB_ADV_p = \\r
+       -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
+__WXLIB_CORE_p = \\r
+       -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core\r
+endif\r
+ifeq ($(MONOLITHIC),0)\r
+__WXLIB_BASE_p = \\r
+       -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)\r
+endif\r
+ifeq ($(MONOLITHIC),1)\r
+__WXLIB_MONO_p = \\r
+       -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)\r
+endif\r
+ifeq ($(USE_GUI),1)\r
+__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)\r
+endif\r
+ifeq ($(USE_GUI),1)\r
+__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)\r
+endif\r
+ifeq ($(USE_GUI),1)\r
+__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)\r
+endif\r
+ifeq ($(MSLU),1)\r
+__UNICOWS_LIB_p = -lunicows\r
+endif\r
+ifeq ($(USE_CAIRO),1)\r
+__CAIRO_LIB_p = -lcairo\r
+endif\r
+ifeq ($(USE_CAIRO),1)\r
+____CAIRO_LIBDIR_FILENAMES_p = -L$(CAIRO_ROOT)\lib\r
+endif\r
+ifeq ($(BUILD),debug)\r
+ifeq ($(DEBUG_INFO),default)\r
+__DEBUGINFO = -g\r
+endif\r
+endif\r
+ifeq ($(BUILD),release)\r
+ifeq ($(DEBUG_INFO),default)\r
+__DEBUGINFO = \r
+endif\r
+endif\r
+ifeq ($(DEBUG_INFO),0)\r
+__DEBUGINFO = \r
+endif\r
+ifeq ($(DEBUG_INFO),1)\r
+__DEBUGINFO = -g\r
+endif\r
+ifeq ($(USE_THREADS),0)\r
+__THREADSFLAG = \r
+endif\r
+ifeq ($(USE_THREADS),1)\r
+__THREADSFLAG = -mthreads\r
+endif\r
+\r
+\r
+all: $(OBJS)\r
+$(OBJS):\r
+       -if not exist $(OBJS) mkdir $(OBJS)\r
+\r
+### Targets: ###\r
+\r
+all: $(OBJS)\webview.exe\r
+\r
+clean: \r
+       -if exist $(OBJS)\*.o del $(OBJS)\*.o\r
+       -if exist $(OBJS)\*.d del $(OBJS)\*.d\r
+       -if exist $(OBJS)\webview.exe del $(OBJS)\webview.exe\r
+\r
+$(OBJS)\webview.exe: $(WEBVIEW_OBJECTS) $(OBJS)\webview_sample_rc.o\r
+       $(CXX) -o $@ $(WEBVIEW_OBJECTS)  $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)  $(__WXLIB_WEBVIEW_p)  $(__WXLIB_STC_p)  $(__WXLIB_ADV_p)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  -lwxscintilla$(WXDEBUGFLAG) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet\r
+\r
+$(OBJS)\webview_webview.o: ./webview.cpp\r
+       $(CXX) -c -o $@ $(WEBVIEW_CXXFLAGS) $(CPPDEPS) $<\r
+\r
+$(OBJS)\webview_sample_rc.o: ./../sample.rc\r
+       windres --use-temp-file -i$< -o$@    --define __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) --include-dir $(SETUPHDIR) --include-dir ./../../include $(__CAIRO_INCLUDEDIR_p) --include-dir . $(__DLLFLAG_p_1) --include-dir ./../../samples --define NOPCH\r
+\r
+.PHONY: all clean\r
+\r
+\r
+SHELL := $(COMSPEC)\r
+\r
+# Dependencies tracking:\r
+-include $(OBJS)/*.d\r
diff --git a/samples/webview/makefile.unx b/samples/webview/makefile.unx
new file mode 100644 (file)
index 0000000..7b34ded
--- /dev/null
@@ -0,0 +1,100 @@
+# =========================================================================
+#     This makefile was generated by
+#     Bakefile 0.2.9 (http://www.bakefile.org)
+#     Do not modify, all changes will be overwritten!
+# =========================================================================
+
+
+
+# -------------------------------------------------------------------------
+# These are configurable options:
+# -------------------------------------------------------------------------
+
+# C++ compiler 
+CXX = `$(WX_CONFIG) --cxx`
+
+# Standard flags for C++ 
+CXXFLAGS ?= 
+
+# Standard preprocessor flags (common for CC and CXX) 
+CPPFLAGS ?= 
+
+# Standard linker flags 
+LDFLAGS ?= 
+
+# Location and arguments of wx-config script 
+WX_CONFIG ?= wx-config
+
+# Port of the wx library to build against [gtk1,gtk2,msw,x11,motif,mgl,osx_cocoa,osx_carbon,dfb]
+WX_PORT ?= $(shell $(WX_CONFIG) --query-toolkit)
+
+# Use DLL build of wx library to use? [0,1]
+WX_SHARED ?= $(shell if test -z `$(WX_CONFIG) --query-linkage`; then echo 1; else echo 0; fi)
+
+# Compile Unicode build of wxWidgets? [0,1]
+WX_UNICODE ?= $(shell $(WX_CONFIG) --query-chartype | sed 's/unicode/1/;s/ansi/0/')
+
+# Version of the wx library to build against. 
+WX_VERSION ?= $(shell $(WX_CONFIG) --query-version | sed -e 's/\([0-9]*\)\.\([0-9]*\)/\1\2/')
+
+
+
+# -------------------------------------------------------------------------
+# Do not modify the rest of this file!
+# -------------------------------------------------------------------------
+
+### Variables: ###
+
+CPPDEPS = -MT$@ -MF`echo $@ | sed -e 's,\.o$$,.d,'` -MD -MP
+WX_VERSION_MAJOR = $(shell echo $(WX_VERSION) | cut -c1,1)
+WX_VERSION_MINOR = $(shell echo $(WX_VERSION) | cut -c2,2)
+WX_CONFIG_FLAGS = $(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG) \
+       --toolkit=$(WX_PORT) --version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
+WEBVIEW_CXXFLAGS = -I. `$(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)` $(CPPFLAGS) \
+       $(CXXFLAGS)
+WEBVIEW_OBJECTS =  \
+       webview_webview.o
+
+### Conditionally set variables: ###
+
+ifeq ($(WX_UNICODE),0)
+WX_CONFIG_UNICODE_FLAG = --unicode=no
+endif
+ifeq ($(WX_UNICODE),1)
+WX_CONFIG_UNICODE_FLAG = --unicode=yes
+endif
+ifeq ($(WX_SHARED),0)
+WX_CONFIG_SHARED_FLAG = --static=yes
+endif
+ifeq ($(WX_SHARED),1)
+WX_CONFIG_SHARED_FLAG = --static=no
+endif
+
+
+### Targets: ###
+
+all: test_for_selected_wxbuild webview
+
+install: 
+
+uninstall: 
+
+clean: 
+       rm -f ./*.o
+       rm -f ./*.d
+       rm -f webview
+
+test_for_selected_wxbuild: 
+       @$(WX_CONFIG) $(WX_CONFIG_FLAGS)
+
+webview: $(WEBVIEW_OBJECTS)
+       $(CXX) -o $@ $(WEBVIEW_OBJECTS)   $(LDFLAGS)  `$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs webview,stc,adv,core,base`
+
+webview_webview.o: ./webview.cpp
+       $(CXX) -c -o $@ $(WEBVIEW_CXXFLAGS) $(CPPDEPS) $<
+
+.PHONY: all install uninstall clean
+
+
+# Dependencies tracking:
+-include ./*.d
diff --git a/samples/webview/makefile.vc b/samples/webview/makefile.vc
new file mode 100644 (file)
index 0000000..8370670
--- /dev/null
@@ -0,0 +1,364 @@
+# =========================================================================
+#     This makefile was generated by
+#     Bakefile 0.2.9 (http://www.bakefile.org)
+#     Do not modify, all changes will be overwritten!
+# =========================================================================
+
+!include <../../build/msw/config.vc>
+
+# -------------------------------------------------------------------------
+# Do not modify the rest of this file!
+# -------------------------------------------------------------------------
+
+### Variables: ###
+
+WX_RELEASE_NODOT = 29
+COMPILER_PREFIX = vc
+OBJS = \
+       $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(DIR_SUFFIX_CPU)
+LIBDIRNAME = \
+       .\..\..\lib\$(COMPILER_PREFIX)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
+SETUPHDIR = \
+       $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
+WEBVIEW_CXXFLAGS = /M$(__RUNTIME_LIBS_10)$(__DEBUGRUNTIME_4) /DWIN32 \
+       $(__DEBUGINFO_0) /Fd$(OBJS)\webview.pdb $(____DEBUGRUNTIME_3_p) \
+       $(__OPTIMIZEFLAG_6) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
+       $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) \
+       $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) \
+       $(__MSLU_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\include \
+       $(____CAIRO_INCLUDEDIR_FILENAMES_p) /W4 /I. $(__DLLFLAG_p) /D_WINDOWS \
+       /I.\..\..\samples /DNOPCH $(__RTTIFLAG_11) $(__EXCEPTIONSFLAG_12) \
+       $(CPPFLAGS) $(CXXFLAGS)
+WEBVIEW_OBJECTS =  \
+       $(OBJS)\webview_webview.obj
+WEBVIEW_RESOURCES =  \
+       $(OBJS)\webview_sample.res
+
+### Conditionally set variables: ###
+
+!if "$(USE_GUI)" == "0"
+PORTNAME = base
+!endif
+!if "$(USE_GUI)" == "1"
+PORTNAME = msw
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+WXDEBUGFLAG = d
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "1"
+WXDEBUGFLAG = d
+!endif
+!if "$(UNICODE)" == "1"
+WXUNICODEFLAG = u
+!endif
+!if "$(WXUNIV)" == "1"
+WXUNIVNAME = univ
+!endif
+!if "$(TARGET_CPU)" == "AMD64"
+DIR_SUFFIX_CPU = _amd64
+!endif
+!if "$(TARGET_CPU)" == "IA64"
+DIR_SUFFIX_CPU = _ia64
+!endif
+!if "$(TARGET_CPU)" == "amd64"
+DIR_SUFFIX_CPU = _amd64
+!endif
+!if "$(TARGET_CPU)" == "ia64"
+DIR_SUFFIX_CPU = _ia64
+!endif
+!if "$(SHARED)" == "1"
+WXDLLFLAG = dll
+!endif
+!if "$(SHARED)" == "0"
+LIBTYPE_SUFFIX = lib
+!endif
+!if "$(SHARED)" == "1"
+LIBTYPE_SUFFIX = dll
+!endif
+!if "$(TARGET_CPU)" == "AMD64"
+LINK_TARGET_CPU = /MACHINE:X64
+!endif
+!if "$(TARGET_CPU)" == "IA64"
+LINK_TARGET_CPU = /MACHINE:IA64
+!endif
+!if "$(TARGET_CPU)" == "amd64"
+LINK_TARGET_CPU = /MACHINE:X64
+!endif
+!if "$(TARGET_CPU)" == "ia64"
+LINK_TARGET_CPU = /MACHINE:IA64
+!endif
+!if "$(MONOLITHIC)" == "0"
+EXTRALIBS_FOR_BASE = 
+!endif
+!if "$(MONOLITHIC)" == "1"
+EXTRALIBS_FOR_BASE =  
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_0 = /Zi
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_0 = 
+!endif
+!if "$(DEBUG_INFO)" == "0"
+__DEBUGINFO_0 = 
+!endif
+!if "$(DEBUG_INFO)" == "1"
+__DEBUGINFO_0 = /Zi
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_1 = /DEBUG
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_1 = 
+!endif
+!if "$(DEBUG_INFO)" == "0"
+__DEBUGINFO_1 = 
+!endif
+!if "$(DEBUG_INFO)" == "1"
+__DEBUGINFO_1 = /DEBUG
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
+__DEBUGINFO_2 = 
+!endif
+!if "$(DEBUG_INFO)" == "0"
+__DEBUGINFO_2 = 
+!endif
+!if "$(DEBUG_INFO)" == "1"
+__DEBUGINFO_2 = $(__DEBUGRUNTIME_5)
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+____DEBUGRUNTIME_3_p = /D_DEBUG
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+____DEBUGRUNTIME_3_p = 
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+____DEBUGRUNTIME_3_p = 
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "1"
+____DEBUGRUNTIME_3_p = /D_DEBUG
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+____DEBUGRUNTIME_3_p_1 = /d _DEBUG
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+____DEBUGRUNTIME_3_p_1 = 
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+____DEBUGRUNTIME_3_p_1 = 
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "1"
+____DEBUGRUNTIME_3_p_1 = /d _DEBUG
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+__DEBUGRUNTIME_4 = d
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+__DEBUGRUNTIME_4 = 
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+__DEBUGRUNTIME_4 = 
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "1"
+__DEBUGRUNTIME_4 = d
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+__DEBUGRUNTIME_5 = 
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+__DEBUGRUNTIME_5 = /opt:ref /opt:icf
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+__DEBUGRUNTIME_5 = /opt:ref /opt:icf
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "1"
+__DEBUGRUNTIME_5 = 
+!endif
+!if "$(BUILD)" == "debug"
+__OPTIMIZEFLAG_6 = /Od
+!endif
+!if "$(BUILD)" == "release"
+__OPTIMIZEFLAG_6 = /O2
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREADSFLAG_9 = L
+!endif
+!if "$(USE_THREADS)" == "1"
+__THREADSFLAG_9 = T
+!endif
+!if "$(RUNTIME_LIBS)" == "dynamic"
+__RUNTIME_LIBS_10 = D
+!endif
+!if "$(RUNTIME_LIBS)" == "static"
+__RUNTIME_LIBS_10 = $(__THREADSFLAG_9)
+!endif
+!if "$(USE_RTTI)" == "0"
+__RTTIFLAG_11 = 
+!endif
+!if "$(USE_RTTI)" == "1"
+__RTTIFLAG_11 = /GR
+!endif
+!if "$(USE_EXCEPTIONS)" == "0"
+__EXCEPTIONSFLAG_12 = 
+!endif
+!if "$(USE_EXCEPTIONS)" == "1"
+__EXCEPTIONSFLAG_12 = /EHsc
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
+__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
+__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
+!endif
+!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
+__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
+__NO_VC_CRTDBG_p_1 = /d __NO_VC_CRTDBG__
+!endif
+!if "$(WXUNIV)" == "1"
+__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
+!endif
+!if "$(WXUNIV)" == "1"
+__WXUNIV_DEFINE_p_1 = /d __WXUNIVERSAL__
+!endif
+!if "$(DEBUG_FLAG)" == "0"
+__DEBUG_DEFINE_p = /DwxDEBUG_LEVEL=0
+!endif
+!if "$(DEBUG_FLAG)" == "0"
+__DEBUG_DEFINE_p_1 = /d wxDEBUG_LEVEL=0
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+__NDEBUG_DEFINE_p = /DNDEBUG
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+__NDEBUG_DEFINE_p = /DNDEBUG
+!endif
+!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
+__NDEBUG_DEFINE_p_1 = /d NDEBUG
+!endif
+!if "$(DEBUG_RUNTIME_LIBS)" == "0"
+__NDEBUG_DEFINE_p_1 = /d NDEBUG
+!endif
+!if "$(USE_EXCEPTIONS)" == "0"
+__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
+!endif
+!if "$(USE_EXCEPTIONS)" == "0"
+__EXCEPTIONS_DEFINE_p_1 = /d wxNO_EXCEPTIONS
+!endif
+!if "$(USE_RTTI)" == "0"
+__RTTI_DEFINE_p = /DwxNO_RTTI
+!endif
+!if "$(USE_RTTI)" == "0"
+__RTTI_DEFINE_p_1 = /d wxNO_RTTI
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREAD_DEFINE_p = /DwxNO_THREADS
+!endif
+!if "$(USE_THREADS)" == "0"
+__THREAD_DEFINE_p_1 = /d wxNO_THREADS
+!endif
+!if "$(UNICODE)" == "0"
+__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0
+!endif
+!if "$(UNICODE)" == "1"
+__UNICODE_DEFINE_p = /D_UNICODE
+!endif
+!if "$(UNICODE)" == "0"
+__UNICODE_DEFINE_p_1 = /d wxUSE_UNICODE=0
+!endif
+!if "$(UNICODE)" == "1"
+__UNICODE_DEFINE_p_1 = /d _UNICODE
+!endif
+!if "$(MSLU)" == "1"
+__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1
+!endif
+!if "$(MSLU)" == "1"
+__MSLU_DEFINE_p_1 = /d wxUSE_UNICODE_MSLU=1
+!endif
+!if "$(USE_CAIRO)" == "1"
+____CAIRO_INCLUDEDIR_FILENAMES_p = /I$(CAIRO_ROOT)\include\cairo
+!endif
+!if "$(USE_CAIRO)" == "1"
+____CAIRO_INCLUDEDIR_FILENAMES_1_p = /i $(CAIRO_ROOT)\include\cairo
+!endif
+!if "$(SHARED)" == "1"
+__DLLFLAG_p = /DWXUSINGDLL
+!endif
+!if "$(SHARED)" == "1"
+__DLLFLAG_p_1 = /d WXUSINGDLL
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_WEBVIEW_p = \
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_STC_p = \
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_ADV_p = \
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_CORE_p = \
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
+!endif
+!if "$(MONOLITHIC)" == "0"
+__WXLIB_BASE_p = \
+       wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+!if "$(MONOLITHIC)" == "1"
+__WXLIB_MONO_p = \
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
+!endif
+!if "$(USE_GUI)" == "1"
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
+!endif
+!if "$(MSLU)" == "1"
+__UNICOWS_LIB_p = unicows.lib
+!endif
+!if "$(USE_CAIRO)" == "1"
+__CAIRO_LIB_p = cairo.lib
+!endif
+!if "$(USE_CAIRO)" == "1"
+____CAIRO_LIBDIR_FILENAMES_p = /LIBPATH:$(CAIRO_ROOT)\lib
+!endif
+
+
+all: $(OBJS)
+$(OBJS):
+       -if not exist $(OBJS) mkdir $(OBJS)
+
+### Targets: ###
+
+all: $(OBJS)\webview.exe
+
+clean: 
+       -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
+       -if exist $(OBJS)\*.res del $(OBJS)\*.res
+       -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
+       -if exist $(OBJS)\webview.exe del $(OBJS)\webview.exe
+       -if exist $(OBJS)\webview.ilk del $(OBJS)\webview.ilk
+       -if exist $(OBJS)\webview.pdb del $(OBJS)\webview.pdb
+
+$(OBJS)\webview.exe: $(WEBVIEW_OBJECTS) $(OBJS)\webview_sample.res
+       link /NOLOGO /OUT:$@  $(__DEBUGINFO_1) /pdb:"$(OBJS)\webview.pdb" $(__DEBUGINFO_2)  $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS) @<<
+       $(WEBVIEW_OBJECTS) $(WEBVIEW_RESOURCES)  $(__WXLIB_WEBVIEW_p)  $(__WXLIB_STC_p)  $(__WXLIB_ADV_p)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  wxscintilla$(WXDEBUGFLAG).lib $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib
+<<
+
+$(OBJS)\webview_webview.obj: .\webview.cpp
+       $(CXX) /c /nologo /TP /Fo$@ $(WEBVIEW_CXXFLAGS) .\webview.cpp
+
+$(OBJS)\webview_sample.res: .\..\sample.rc
+       rc /fo$@  /d WIN32 $(____DEBUGRUNTIME_3_p_1) $(__NO_VC_CRTDBG_p_1)  /d __WXMSW__ $(__WXUNIV_DEFINE_p_1) $(__DEBUG_DEFINE_p_1) $(__NDEBUG_DEFINE_p_1) $(__EXCEPTIONS_DEFINE_p_1) $(__RTTI_DEFINE_p_1) $(__THREAD_DEFINE_p_1) $(__UNICODE_DEFINE_p_1) $(__MSLU_DEFINE_p_1) /i $(SETUPHDIR) /i .\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES_1_p) /i . $(__DLLFLAG_p_1) /d _WINDOWS /i .\..\..\samples /d NOPCH .\..\sample.rc
+
diff --git a/samples/webview/makefile.wat b/samples/webview/makefile.wat
new file mode 100644 (file)
index 0000000..b97da59
--- /dev/null
@@ -0,0 +1,283 @@
+# =========================================================================\r
+#     This makefile was generated by\r
+#     Bakefile 0.2.9 (http://www.bakefile.org)\r
+#     Do not modify, all changes will be overwritten!\r
+# =========================================================================\r
+\r
+!include ../../build/msw/config.wat\r
+\r
+# -------------------------------------------------------------------------\r
+# Do not modify the rest of this file!\r
+# -------------------------------------------------------------------------\r
+\r
+# Speed up compilation a bit:\r
+!ifdef __LOADDLL__\r
+!  loaddll wcc      wccd\r
+!  loaddll wccaxp   wccdaxp\r
+!  loaddll wcc386   wccd386\r
+!  loaddll wpp      wppdi86\r
+!  loaddll wppaxp   wppdaxp\r
+!  loaddll wpp386   wppd386\r
+! if $(__VERSION__) >= 1280\r
+!  loaddll wlink    wlinkd\r
+! else\r
+!  loaddll wlink    wlink\r
+! endif\r
+!  loaddll wlib     wlibd\r
+!endif\r
+\r
+# We need these variables in some bakefile-made rules:\r
+WATCOM_CWD = $+ $(%cdrive):$(%cwd) $-\r
+\r
+### Conditionally set variables: ###\r
+\r
+PORTNAME =\r
+!ifeq USE_GUI 0\r
+PORTNAME = base\r
+!endif\r
+!ifeq USE_GUI 1\r
+PORTNAME = msw\r
+!endif\r
+WXDEBUGFLAG =\r
+!ifeq BUILD debug\r
+WXDEBUGFLAG = d\r
+!endif\r
+WXUNICODEFLAG =\r
+!ifeq UNICODE 1\r
+WXUNICODEFLAG = u\r
+!endif\r
+WXUNIVNAME =\r
+!ifeq WXUNIV 1\r
+WXUNIVNAME = univ\r
+!endif\r
+WXDLLFLAG =\r
+!ifeq SHARED 1\r
+WXDLLFLAG = dll\r
+!endif\r
+LIBTYPE_SUFFIX =\r
+!ifeq SHARED 0\r
+LIBTYPE_SUFFIX = lib\r
+!endif\r
+!ifeq SHARED 1\r
+LIBTYPE_SUFFIX = dll\r
+!endif\r
+EXTRALIBS_FOR_BASE =\r
+!ifeq MONOLITHIC 0\r
+EXTRALIBS_FOR_BASE = \r
+!endif\r
+!ifeq MONOLITHIC 1\r
+EXTRALIBS_FOR_BASE =  \r
+!endif\r
+__DEBUGINFO_0 =\r
+!ifeq BUILD debug\r
+!ifeq DEBUG_INFO default\r
+__DEBUGINFO_0 = -d2\r
+!endif\r
+!endif\r
+!ifeq BUILD release\r
+!ifeq DEBUG_INFO default\r
+__DEBUGINFO_0 = -d0\r
+!endif\r
+!endif\r
+!ifeq DEBUG_INFO 0\r
+__DEBUGINFO_0 = -d0\r
+!endif\r
+!ifeq DEBUG_INFO 1\r
+__DEBUGINFO_0 = -d2\r
+!endif\r
+__DEBUGINFO_1 =\r
+!ifeq BUILD debug\r
+!ifeq DEBUG_INFO default\r
+__DEBUGINFO_1 = debug all\r
+!endif\r
+!endif\r
+!ifeq BUILD release\r
+!ifeq DEBUG_INFO default\r
+__DEBUGINFO_1 = \r
+!endif\r
+!endif\r
+!ifeq DEBUG_INFO 0\r
+__DEBUGINFO_1 = \r
+!endif\r
+!ifeq DEBUG_INFO 1\r
+__DEBUGINFO_1 = debug all\r
+!endif\r
+__OPTIMIZEFLAG_2 =\r
+!ifeq BUILD debug\r
+__OPTIMIZEFLAG_2 = -od\r
+!endif\r
+!ifeq BUILD release\r
+__OPTIMIZEFLAG_2 = -ot -ox\r
+!endif\r
+__THREADSFLAG_5 =\r
+!ifeq USE_THREADS 0\r
+__THREADSFLAG_5 = \r
+!endif\r
+!ifeq USE_THREADS 1\r
+__THREADSFLAG_5 = -bm\r
+!endif\r
+__RUNTIME_LIBS_6 =\r
+!ifeq RUNTIME_LIBS dynamic\r
+__RUNTIME_LIBS_6 = -br\r
+!endif\r
+!ifeq RUNTIME_LIBS static\r
+__RUNTIME_LIBS_6 = \r
+!endif\r
+__RTTIFLAG_7 =\r
+!ifeq USE_RTTI 0\r
+__RTTIFLAG_7 = \r
+!endif\r
+!ifeq USE_RTTI 1\r
+__RTTIFLAG_7 = -xr\r
+!endif\r
+__EXCEPTIONSFLAG_8 =\r
+!ifeq USE_EXCEPTIONS 0\r
+__EXCEPTIONSFLAG_8 = \r
+!endif\r
+!ifeq USE_EXCEPTIONS 1\r
+__EXCEPTIONSFLAG_8 = -xs\r
+!endif\r
+__WXLIB_WEBVIEW_p =\r
+!ifeq MONOLITHIC 0\r
+__WXLIB_WEBVIEW_p = &\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview.lib\r
+!endif\r
+__WXLIB_STC_p =\r
+!ifeq MONOLITHIC 0\r
+__WXLIB_STC_p = &\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc.lib\r
+!endif\r
+__WXLIB_ADV_p =\r
+!ifeq MONOLITHIC 0\r
+__WXLIB_ADV_p = &\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv.lib\r
+!endif\r
+__WXLIB_CORE_p =\r
+!ifeq MONOLITHIC 0\r
+__WXLIB_CORE_p = &\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib\r
+!endif\r
+__WXLIB_BASE_p =\r
+!ifeq MONOLITHIC 0\r
+__WXLIB_BASE_p = &\r
+       wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib\r
+!endif\r
+__WXLIB_MONO_p =\r
+!ifeq MONOLITHIC 1\r
+__WXLIB_MONO_p = &\r
+       wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib\r
+!endif\r
+__LIB_TIFF_p =\r
+!ifeq USE_GUI 1\r
+__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib\r
+!endif\r
+__LIB_JPEG_p =\r
+!ifeq USE_GUI 1\r
+__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib\r
+!endif\r
+__LIB_PNG_p =\r
+!ifeq USE_GUI 1\r
+__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib\r
+!endif\r
+__CAIRO_LIB_p =\r
+!ifeq USE_CAIRO 1\r
+__CAIRO_LIB_p = cairo.lib\r
+!endif\r
+____CAIRO_LIBDIR_FILENAMES_p =\r
+!ifeq USE_CAIRO 1\r
+____CAIRO_LIBDIR_FILENAMES_p = libpath $(CAIRO_ROOT)\lib\r
+!endif\r
+__WXUNIV_DEFINE_p =\r
+!ifeq WXUNIV 1\r
+__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__\r
+!endif\r
+__DEBUG_DEFINE_p =\r
+!ifeq DEBUG_FLAG 0\r
+__DEBUG_DEFINE_p = -dwxDEBUG_LEVEL=0\r
+!endif\r
+__NDEBUG_DEFINE_p =\r
+!ifeq BUILD release\r
+__NDEBUG_DEFINE_p = -dNDEBUG\r
+!endif\r
+__EXCEPTIONS_DEFINE_p =\r
+!ifeq USE_EXCEPTIONS 0\r
+__EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS\r
+!endif\r
+__RTTI_DEFINE_p =\r
+!ifeq USE_RTTI 0\r
+__RTTI_DEFINE_p = -dwxNO_RTTI\r
+!endif\r
+__THREAD_DEFINE_p =\r
+!ifeq USE_THREADS 0\r
+__THREAD_DEFINE_p = -dwxNO_THREADS\r
+!endif\r
+__UNICODE_DEFINE_p =\r
+!ifeq UNICODE 0\r
+__UNICODE_DEFINE_p = -dwxUSE_UNICODE=0\r
+!endif\r
+!ifeq UNICODE 1\r
+__UNICODE_DEFINE_p = -d_UNICODE\r
+!endif\r
+____CAIRO_INCLUDEDIR_FILENAMES =\r
+!ifeq USE_CAIRO 1\r
+____CAIRO_INCLUDEDIR_FILENAMES = -i=$(CAIRO_ROOT)\include\cairo\r
+!endif\r
+__DLLFLAG_p =\r
+!ifeq SHARED 1\r
+__DLLFLAG_p = -dWXUSINGDLL\r
+!endif\r
+\r
+### Variables: ###\r
+\r
+WX_RELEASE_NODOT = 29\r
+COMPILER_PREFIX = wat\r
+OBJS = &\r
+       $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)\r
+LIBDIRNAME = .\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)\r
+SETUPHDIR = &\r
+       $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)\r
+WEBVIEW_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_5) &\r
+       $(__RUNTIME_LIBS_6) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &\r
+       $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) &\r
+       $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) -i=$(SETUPHDIR) &\r
+       -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -wx -wcd=549 -wcd=656 &\r
+       -wcd=657 -wcd=667 -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH &\r
+       $(__RTTIFLAG_7) $(__EXCEPTIONSFLAG_8) $(CPPFLAGS) $(CXXFLAGS)\r
+WEBVIEW_OBJECTS =  &\r
+       $(OBJS)\webview_webview.obj\r
+\r
+\r
+all : $(OBJS)\r
+$(OBJS) :\r
+       -if not exist $(OBJS) mkdir $(OBJS)\r
+\r
+### Targets: ###\r
+\r
+all : .SYMBOLIC $(OBJS)\webview.exe\r
+\r
+clean : .SYMBOLIC \r
+       -if exist $(OBJS)\*.obj del $(OBJS)\*.obj\r
+       -if exist $(OBJS)\*.res del $(OBJS)\*.res\r
+       -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc\r
+       -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk\r
+       -if exist $(OBJS)\*.pch del $(OBJS)\*.pch\r
+       -if exist $(OBJS)\webview.exe del $(OBJS)\webview.exe\r
+\r
+$(OBJS)\webview.exe :  $(WEBVIEW_OBJECTS) $(OBJS)\webview_sample.res\r
+       @%create $(OBJS)\webview.lbc\r
+       @%append $(OBJS)\webview.lbc option quiet\r
+       @%append $(OBJS)\webview.lbc name $^@\r
+       @%append $(OBJS)\webview.lbc option caseexact\r
+       @%append $(OBJS)\webview.lbc  $(__DEBUGINFO_1)  libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16' $(____CAIRO_LIBDIR_FILENAMES_p) $(LDFLAGS)\r
+       @for %i in ($(WEBVIEW_OBJECTS)) do @%append $(OBJS)\webview.lbc file %i\r
+       @for %i in ( $(__WXLIB_WEBVIEW_p)  $(__WXLIB_STC_p)  $(__WXLIB_ADV_p)  $(__WXLIB_CORE_p)  $(__WXLIB_BASE_p)  wxscintilla$(WXDEBUGFLAG).lib $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p)  wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE)  $(__CAIRO_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib) do @%append $(OBJS)\webview.lbc library %i\r
+       @%append $(OBJS)\webview.lbc option resource=$(OBJS)\webview_sample.res\r
+       @for %i in () do @%append $(OBJS)\webview.lbc option stack=%i\r
+       wlink @$(OBJS)\webview.lbc\r
+\r
+$(OBJS)\webview_webview.obj :  .AUTODEPEND .\webview.cpp\r
+       $(CXX) -bt=nt -zq -fo=$^@ $(WEBVIEW_CXXFLAGS) $<\r
+\r
+$(OBJS)\webview_sample.res :  .AUTODEPEND .\..\sample.rc\r
+       wrc -q -ad -bt=nt -r -fo=$^@    -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__NDEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p)  -i=$(SETUPHDIR) -i=.\..\..\include $(____CAIRO_INCLUDEDIR_FILENAMES) -i=. $(__DLLFLAG_p) -i=.\..\..\samples -dNOPCH $<\r
+\r
diff --git a/samples/webview/refresh.xpm b/samples/webview/refresh.xpm
new file mode 100644 (file)
index 0000000..e897f26
--- /dev/null
@@ -0,0 +1,234 @@
+/* XPM */\r
+static const char * refresh_xpm[] = {\r
+"24 24 207 2",\r
+"      c None",\r
+".     c #3162A2",\r
+"+     c #507BB3",\r
+"@     c #6A90C0",\r
+"#     c #7296C4",\r
+"$     c #7397C4",\r
+"%     c #7094C2",\r
+"&     c #648BBD",\r
+"*     c #507CB3",\r
+"=     c #3061A2",\r
+"-     c #8EACD1",\r
+";     c #B3CBE4",\r
+">     c #B7CEE6",\r
+",     c #B8CEE6",\r
+"'     c #B5CDE5",\r
+")     c #B4CBE5",\r
+"!     c #B0C9E3",\r
+"~     c #AEC6E1",\r
+"{     c #9FBBDB",\r
+"]     c #648DBE",\r
+"^     c #2F60A2",\r
+"/     c #3262A4",\r
+"(     c #3364A3",\r
+"_     c #3C6BA8",\r
+":     c #A7C0DD",\r
+"<     c #C1D6EA",\r
+"[     c #BAD0E7",\r
+"}     c #B6CDE5",\r
+"|     c #B6CCE6",\r
+"1     c #B5CDE6",\r
+"2     c #B3CBE5",\r
+"3     c #AFC8E3",\r
+"4     c #AAC5E2",\r
+"5     c #ABC6E2",\r
+"6     c #A0BCDB",\r
+"7     c #4975AF",\r
+"8     c #3666A5",\r
+"9     c #89ACD3",\r
+"0     c #2C5EA0",\r
+"a     c #82A3CB",\r
+"b     c #B5CCE4",\r
+"c     c #7095C3",\r
+"d     c #658CBC",\r
+"e     c #678EBE",\r
+"f     c #7196C2",\r
+"g     c #84A4CC",\r
+"h     c #A9C3E0",\r
+"i     c #B8CFE7",\r
+"j     c #ACC6E3",\r
+"k     c #A0BEDE",\r
+"l     c #9CBCDD",\r
+"m     c #9EBDDE",\r
+"n     c #6C93C1",\r
+"o     c #7B9FCA",\r
+"p     c #ABC7E3",\r
+"q     c #2B5DA0",\r
+"r     c #4976AE",\r
+"s     c #8EADD0",\r
+"t     c #4975AE",\r
+"u     c #3667A6",\r
+"v     c #3666A6",\r
+"w     c #4170AB",\r
+"x     c #5B83B6",\r
+"y     c #9BB9DA",\r
+"z     c #97B9DC",\r
+"A     c #7EA7D3",\r
+"B     c #7CA5D2",\r
+"C     c #88AED6",\r
+"D     c #8AAFD6",\r
+"E     c #A4C1E0",\r
+"F     c #406DAB",\r
+"G     c #4F7BB2",\r
+"H     c #4A77B3",\r
+"I     c #4C79B4",\r
+"J     c #2E5EA2",\r
+"K     c #6F95C3",\r
+"L     c #95B6D9",\r
+"M     c #7FA8D3",\r
+"N     c #76A1D0",\r
+"O     c #709DCE",\r
+"P     c #2B5DA1",\r
+"Q     c #3667A5",\r
+"R     c #4D7AB4",\r
+"S     c #648DC3",\r
+"T     c #4A78B3",\r
+"U     c #3262A2",\r
+"V     c #2C5FA0",\r
+"W     c #6B91C0",\r
+"X     c #97B8DB",\r
+"Y     c #74A0CF",\r
+"Z     c #709ECE",\r
+"`     c #ACC7E3",\r
+" .    c #2D5EA0",\r
+"..    c #3767A6",\r
+"+.    c #5985BD",\r
+"@.    c #78A3D0",\r
+"#.    c #6C9BCC",\r
+"$.    c #AEC9E5",\r
+"%.    c #3263A3",\r
+"&.    c #3768A7",\r
+"*.    c #9BB8DA",\r
+"=.    c #9CB9DA",\r
+"-.    c #9CBADA",\r
+";.    c #9FBBDC",\r
+">.    c #A8C1DF",\r
+",.    c #2D5FA0",\r
+"'.    c #22569B",\r
+").    c #23579C",\r
+"!.    c #21569A",\r
+"~.    c #21559B",\r
+"{.    c #275A9E",\r
+"].    c #3364A4",\r
+"^.    c #24589C",\r
+"/.    c #24579C",\r
+"(.    c #416FAB",\r
+"_.    c #C0D3E8",\r
+":.    c #B8CCE4",\r
+"<.    c #B5CBE3",\r
+"[.    c #AFC7E1",\r
+"}.    c #B0C8E2",\r
+"|.    c #88A9CF",\r
+"1.    c #4471AC",\r
+"2.    c #B9D1E8",\r
+"3.    c #94B6DA",\r
+"4.    c #95B7DB",\r
+"5.    c #A3C1DF",\r
+"6.    c #A4BEDC",\r
+"7.    c #2D60A0",\r
+"8.    c #BBD1E9",\r
+"9.    c #BCD1E8",\r
+"0.    c #416EA9",\r
+"a.    c #3868A7",\r
+"b.    c #BAD1E9",\r
+"c.    c #96B7DB",\r
+"d.    c #98B9DC",\r
+"e.    c #A2C0DF",\r
+"f.    c #AAC4DF",\r
+"g.    c #5F88BA",\r
+"h.    c #80A8D7",\r
+"i.    c #CDDCEC",\r
+"j.    c #7A9FC8",\r
+"k.    c #4273B1",\r
+"l.    c #3465A4",\r
+"m.    c #4371AC",\r
+"n.    c #B9D1E9",\r
+"o.    c #B4CCE5",\r
+"p.    c #9DBCDD",\r
+"q.    c #8EB2D8",\r
+"r.    c #91B3D9",\r
+"s.    c #719AC8",\r
+"t.    c #4171AC",\r
+"u.    c #3A6AA8",\r
+"v.    c #3A75BD",\r
+"w.    c #9CBBDB",\r
+"x.    c #608BC1",\r
+"y.    c #3A6EAD",\r
+"z.    c #4C80BB",\r
+"A.    c #3365A4",\r
+"B.    c #C6DAED",\r
+"C.    c #6F94C1",\r
+"D.    c #8CABD1",\r
+"E.    c #9BBBDD",\r
+"F.    c #6C9ACD",\r
+"G.    c #6596CA",\r
+"H.    c #709DCF",\r
+"I.    c #7AA4D2",\r
+"J.    c #6A96C8",\r
+"K.    c #5885BB",\r
+"L.    c #4F7EB7",\r
+"M.    c #497AB6",\r
+"N.    c #487AB6",\r
+"O.    c #4275B5",\r
+"P.    c #4C7FBB",\r
+"Q.    c #578BC6",\r
+"R.    c #396CAA",\r
+"S.    c #789CC6",\r
+"T.    c #5681B6",\r
+"U.    c #8AAFD7",\r
+"V.    c #77A2D1",\r
+"W.    c #6496CA",\r
+"X.    c #6294C9",\r
+"Y.    c #6395CA",\r
+"Z.    c #5F92C9",\r
+"`.    c #5C8FC7",\r
+" +    c #598DC6",\r
+".+    c #588DC7",\r
+"++    c #4175B2",\r
+"@+    c #31619F",\r
+"#+    c #6089BB",\r
+"$+    c #77A0CE",\r
+"%+    c #6E9CCD",\r
+"&+    c #6696CA",\r
+"*+    c #6193C9",\r
+"=+    c #5F91C8",\r
+"-+    c #5C90C7",\r
+";+    c #5A8EC6",\r
+">+    c #558AC3",\r
+",+    c #4072AF",\r
+"'+    c #27528A",\r
+")+    c #2A5285",\r
+"!+    c #3C6599",\r
+"~+    c #4B77B0",\r
+"{+    c #4E7DB6",\r
+"]+    c #4C7CB7",\r
+"^+    c #4877B2",\r
+"/+    c #3B69A2",\r
+"(+    c #3361A0",\r
+"                                                ",\r
+"            . + @ # $ % & *                     ",\r
+"          = - ; > , ' ) ! ~ { ] ^       / (     ",\r
+"        _ : < [ } | 1 2 3 4 5 > 6 7   8 9 0     ",\r
+"        a b a c d e f g h i j k l m n o p q     ",\r
+"      r s t u v         w x y z A B C D E q     ",\r
+"      F G H I               J K L M N O 4 P     ",\r
+"      Q R S T U               V W X Y Z `  .    ",\r
+"      ..+.                    t L @.Z #.$.0     ",\r
+"      %.                    &.{ *.=.-.;.>.,.    ",\r
+"        '.).!.~.~.{.].      %.^./.^./.).'.      ",\r
+"      (._.:.<.[.}.|.V                     ].    ",\r
+"      1.2.3.4.5.6.7.                      %.    ",\r
+"      1.8.X l 9.0.                      a.(     ",\r
+"      1.b.c.d.e.f.g.              h.i.j.k.l.    ",\r
+"      m.n.o.p.3.q.r.s.t.u.      v.w.x.y.z.A.    ",\r
+"      m.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.      ",\r
+"      (.S.    T.U.V.W.X.Y.Y.X.Z.`. +.+++        ",\r
+"      ].        @+#+$+%+&+*+=+-+;+>+,+          ",\r
+"                  '+)+!+~+{+]+^+/+(+            ",\r
+"                                                ",\r
+"                                                ",\r
+"                                                ",\r
+"                                                "};\r
diff --git a/samples/webview/stop.xpm b/samples/webview/stop.xpm
new file mode 100644 (file)
index 0000000..27adfed
--- /dev/null
@@ -0,0 +1,331 @@
+/* XPM */\r
+static const char * stop_xpm[] = {\r
+"24 24 304 2",\r
+"      c None",\r
+".     c #920F0F",\r
+"+     c #931212",\r
+"@     c #931111",\r
+"#     c #8F0909",\r
+"$     c #981414",\r
+"%     c #DC6666",\r
+"&     c #F07575",\r
+"*     c #EF7272",\r
+"=     c #EE7171",\r
+"-     c #EE6F6F",\r
+";     c #EE6D6D",\r
+">     c #EE6C6C",\r
+",     c #E46969",\r
+"'     c #980F0F",\r
+")     c #8E0606",\r
+"!     c #EA7B7B",\r
+"~     c #E25858",\r
+"{     c #D84040",\r
+"]     c #D83F3F",\r
+"^     c #D83E3E",\r
+"/     c #D83D3D",\r
+"(     c #D73C3C",\r
+"_     c #D73A3A",\r
+":     c #DD4A4A",\r
+"<     c #EC7272",\r
+"[     c #950909",\r
+"}     c #9A1616",\r
+"|     c #EB7C7C",\r
+"1     c #E15959",\r
+"2     c #D74040",\r
+"3     c #D94444",\r
+"4     c #D94343",\r
+"5     c #D94242",\r
+"6     c #D94141",\r
+"7     c #D93F3F",\r
+"8     c #D73D3D",\r
+"9     c #D73939",\r
+"0     c #DD4747",\r
+"a     c #E96D6D",\r
+"b     c #A21818",\r
+"c     c #9D1717",\r
+"d     c #DC6868",\r
+"e     c #E25959",\r
+"f     c #D94545",\r
+"g     c #D84545",\r
+"h     c #DA4545",\r
+"i     c #D84242",\r
+"j     c #D84141",\r
+"k     c #D63D3D",\r
+"l     c #D73B3B",\r
+"m     c #D63838",\r
+"n     c #DC4747",\r
+"o     c #D95555",\r
+"p     c #9D1414",\r
+"q     c #940909",\r
+"r     c #E15757",\r
+"s     c #DC4848",\r
+"t     c #F64949",\r
+"u     c #D94747",\r
+"v     c #D94646",\r
+"w     c #D73F3F",\r
+"x     c #EA4141",\r
+"y     c #E53D3D",\r
+"z     c #D53A3A",\r
+"A     c #D43838",\r
+"B     c #DB4747",\r
+"C     c #E66161",\r
+"D     c #920606",\r
+"E     c #9D1818",\r
+"F     c #EC7C7C",\r
+"G     c #DF5353",\r
+"H     c #DC4545",\r
+"I     c #F15A5A",\r
+"J     c #EEB2B2",\r
+"K     c #F55757",\r
+"L     c #DB4545",\r
+"M     c #EA4545",\r
+"N     c #F38383",\r
+"O     c #F27979",\r
+"P     c #DC3D3D",\r
+"Q     c #D33838",\r
+"R     c #D13535",\r
+"S     c #D84343",\r
+"T     c #E35C5C",\r
+"U     c #980E0E",\r
+"V     c #BD4949",\r
+"W     c #E25656",\r
+"X     c #D74343",\r
+"Y     c #F44F4F",\r
+"Z     c #EBBFBF",\r
+"`     c #E4EBEB",\r
+" .    c #EBC7C7",\r
+"..    c #F15D5D",\r
+"+.    c #DB4141",\r
+"@.    c #EA4747",\r
+"#.    c #F09C9C",\r
+"$.    c #E4EFEF",\r
+"%.    c #E5DDDD",\r
+"&.    c #FC5858",\r
+"*.    c #D53939",\r
+"=.    c #D13737",\r
+"-.    c #CE3333",\r
+";.    c #B93434",\r
+">.    c #DC4949",\r
+",.    c #E34545",\r
+"'.    c #F48F8F",\r
+").    c #E7E6E6",\r
+"!.    c #E8E9E9",\r
+"~.    c #EDCBCB",\r
+"{.    c #F45A5A",\r
+"].    c #EA4C4C",\r
+"^.    c #F2A3A3",\r
+"/.    c #E9E9E9",\r
+"(.    c #E7E9E9",\r
+"_.    c #F0B0B0",\r
+":.    c #E74848",\r
+"<.    c #CF3636",\r
+"[.    c #CE3535",\r
+"}.    c #D23A3A",\r
+"|.    c #BC4949",\r
+"1.    c #DD4848",\r
+"2.    c #E74444",\r
+"3.    c #F29E9E",\r
+"4.    c #EAE9E9",\r
+"5.    c #EBF0F0",\r
+"6.    c #F0CECE",\r
+"7.    c #F79191",\r
+"8.    c #EAF4F4",\r
+"9.    c #EBECEC",\r
+"0.    c #EFC4C4",\r
+"a.    c #EA4B4B",\r
+"b.    c #D13939",\r
+"c.    c #CF3737",\r
+"d.    c #CD3434",\r
+"e.    c #D13A3A",\r
+"f.    c #B83333",\r
+"g.    c #D73E3E",\r
+"h.    c #E74646",\r
+"i.    c #F59E9E",\r
+"j.    c #EFE8E8",\r
+"k.    c #EEF1F1",\r
+"l.    c #EEF5F5",\r
+"m.    c #F3BABA",\r
+"n.    c #EA5050",\r
+"o.    c #D23B3B",\r
+"p.    c #D03A3A",\r
+"q.    c #CF3939",\r
+"r.    c #CC3535",\r
+"s.    c #CA3131",\r
+"t.    c #B83232",\r
+"u.    c #BD4848",\r
+"v.    c #D83A3A",\r
+"w.    c #F05D5D",\r
+"x.    c #F5BEBE",\r
+"y.    c #F1F2F2",\r
+"z.    c #F2E6E6",\r
+"A.    c #FE7A7A",\r
+"B.    c #CF3434",\r
+"C.    c #C92121",\r
+"D.    c #C61212",\r
+"E.    c #C10707",\r
+"F.    c #C00505",\r
+"G.    c #BE0404",\r
+"H.    c #C30C0C",\r
+"I.    c #B72222",\r
+"J.    c #BC4848",\r
+"K.    c #DC4343",\r
+"L.    c #D73838",\r
+"M.    c #E95A5A",\r
+"N.    c #F8ADAD",\r
+"O.    c #F2F9F9",\r
+"P.    c #F3F3F3",\r
+"Q.    c #F4F2F2",\r
+"R.    c #F3F7F7",\r
+"S.    c #F2D5D5",\r
+"T.    c #F05050",\r
+"U.    c #C30000",\r
+"V.    c #BF0000",\r
+"W.    c #BE0000",\r
+"X.    c #BD0000",\r
+"Y.    c #BB0000",\r
+"Z.    c #C00707",\r
+"`.    c #B71F1F",\r
+" +    c #BC4646",\r
+".+    c #DC4141",\r
+"++    c #D63636",\r
+"@+    c #D63737",\r
+"#+    c #EA5C5C",\r
+"$+    c #F6B9B9",\r
+"%+    c #F4FAFA",\r
+"&+    c #F9C5C5",\r
+"*+    c #FCACAC",\r
+"=+    c #F4F0F0",\r
+"-+    c #F1F6F6",\r
+";+    c #EB5F5F",\r
+">+    c #C00101",\r
+",+    c #B90000",\r
+"'+    c #BF0707",\r
+")+    c #B61D1D",\r
+"!+    c #BC4545",\r
+"~+    c #DA3E3E",\r
+"{+    c #D73535",\r
+"]+    c #D63434",\r
+"^+    c #EA6363",\r
+"/+    c #F5BFBF",\r
+"(+    c #F1F1F1",\r
+"_+    c #F5F6F6",\r
+":+    c #FAC9C9",\r
+"<+    c #DF3C3C",\r
+"[+    c #D21B1B",\r
+"}+    c #FBADAD",\r
+"|+    c #F5F4F4",\r
+"1+    c #F2F2F2",\r
+"2+    c #F1D7D7",\r
+"3+    c #F07373",\r
+"4+    c #B80000",\r
+"5+    c #BD0707",\r
+"6+    c #B61C1C",\r
+"7+    c #B53B3B",\r
+"8+    c #E75D5D",\r
+"9+    c #D63333",\r
+"0+    c #D53333",\r
+"a+    c #D42F2F",\r
+"b+    c #F58686",\r
+"c+    c #F3D4D4",\r
+"d+    c #F2F3F3",\r
+"e+    c #F6D3D3",\r
+"f+    c #E44343",\r
+"g+    c #C40000",\r
+"h+    c #C20000",\r
+"i+    c #D82C2C",\r
+"j+    c #F7B7B7",\r
+"k+    c #F0E9E9",\r
+"l+    c #FA8F8F",\r
+"m+    c #BE0A0A",\r
+"n+    c #B70000",\r
+"o+    c #B60000",\r
+"p+    c #C20C0C",\r
+"q+    c #B41919",\r
+"r+    c #8B0101",\r
+"s+    c #C44848",\r
+"t+    c #EC5F5F",\r
+"u+    c #D52A2A",\r
+"v+    c #D22424",\r
+"w+    c #CE1C1C",\r
+"x+    c #E96969",\r
+"y+    c #FBC4C4",\r
+"z+    c #E44949",\r
+"A+    c #C40101",\r
+"B+    c #C10000",\r
+"C+    c #D53131",\r
+"D+    c #FBBEBE",\r
+"E+    c #F09292",\r
+"F+    c #C00E0E",\r
+"G+    c #B50000",\r
+"H+    c #C71212",\r
+"I+    c #980707",\r
+"J+    c #890101",\r
+"K+    c #B52828",\r
+"L+    c #E63D3D",\r
+"M+    c #C90202",\r
+"N+    c #C70000",\r
+"O+    c #C80505",\r
+"P+    c #D32424",\r
+"Q+    c #C61B1B",\r
+"R+    c #C11111",\r
+"S+    c #C81313",\r
+"T+    c #8C0101",\r
+"U+    c #880000",\r
+"V+    c #BE2E2E",\r
+"W+    c #DC2D2D",\r
+"X+    c #C50000",\r
+"Y+    c #BC0000",\r
+"Z+    c #C30D0D",\r
+"`+    c #CE2424",\r
+" @    c #850000",\r
+".@    c #BE2B2B",\r
+"+@    c #E33434",\r
+"@@    c #C00000",\r
+"#@    c #CC1616",\r
+"$@    c #CB2222",\r
+"%@    c #910404",\r
+"&@    c #790000",\r
+"*@    c #B21D1D",\r
+"=@    c #E03131",\r
+"-@    c #B40000",\r
+";@    c #CD1818",\r
+">@    c #C61F1F",\r
+",@    c #830000",\r
+"'@    c #730000",\r
+")@    c #B92525",\r
+"!@    c #E14444",\r
+"~@    c #E04141",\r
+"{@    c #DF3F3F",\r
+"]@    c #DE3C3C",\r
+"^@    c #DE3A3A",\r
+"/@    c #DE3737",\r
+"(@    c #DD3535",\r
+"_@    c #DD3232",\r
+":@    c #C42121",\r
+"<@    c #7E0000",\r
+"[@    c #720000",\r
+"}@    c #770000",\r
+"              . + + + + + + @ @ #               ",\r
+"            $ % & * * * = - ; > , '             ",\r
+"          ) ! ~ { { { ] ^ / ( _ : < [           ",\r
+"        } | 1 2 3 3 4 5 6 7 ^ 8 9 0 a b         ",\r
+"      c d e 6 f g f h 4 i j 7 k l m n o p       ",\r
+"    q | r 4 f s t u v h i 6 w x y z A B C D     ",\r
+"  E F G w 4 H I J K L f i j M N O P Q R S T U   ",\r
+"  V W / 6 X Y Z `  ...+.j @.#.$.%.&.*.=.-.f ;.  ",\r
+"  V >.7 { i ,.'.).!.~.{.].^./.(._.:.=.<.[.}.;.  ",\r
+"  |.1.^ ] 7 { 2.3.4.5.6.7.8.9.0.a.b.c.[.d.e.f.  ",\r
+"  |.0 ( 8 ^ ] g.h.i.j.k.l.k.m.n.o.p.q.r.s.<.t.  ",\r
+"  u.H v.l ( / / *.w.x.y.y.z.A.B.C.D.E.F.G.H.I.  ",\r
+"  J.K.L.9 _ _ _ M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`.  ",\r
+"   +.+++@+L.@+#+$+O.%+&+*+=+-+S.;+>+X.Y.,+'+)+  ",\r
+"  !+~+{+{+]+^+/+(+_+:+<+[+}+|+1+2+3+Y.,+4+5+6+  ",\r
+"  7+8+9+0+a+b+c+d+e+f+g+h+i+j+P.k+l+m+n+o+p+q+  ",\r
+"  r+s+t+u+v+w+x+y+z+A+h+B+X.C+D+E+F+n+G+H+v+I+  ",\r
+"    J+K+L+M+N+O+P+A+h+B+V.X.Y.Q+R+4+o+S+v+T+    ",\r
+"      U+V+W+N+X+U.h+B+V.X.Y+Y.,+4+o+Z+`+T+      ",\r
+"         @.@+@A+h+@@W.X.Y+Y.,+4+G+#@$@%@        ",\r
+"          &@*@=@V.Y+Y.,+4+o+G+-@;@>@,@          ",\r
+"            '@)@!@~@{@]@^@/@(@_@:@<@            ",\r
+"              [@&@&@&@&@&@&@&@&@}@              ",\r
+"                                                "};\r
diff --git a/samples/webview/webview.bkl b/samples/webview/webview.bkl
new file mode 100644 (file)
index 0000000..e574400
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" ?>\r
+<!-- $Id: widgets.bkl 59311 2009-03-04 11:47:32Z FM $ -->\r
+<makefile>\r
+\r
+    <include file="../../build/bakefiles/common_samples.bkl"/>\r
+\r
+    <exe id="webview" template="wx_sample" template_append="wx_append">\r
+        <sources>\r
+            webview.cpp\r
+        </sources>\r
+        <headers></headers>\r
+        <wx-lib>webview</wx-lib>\r
+        <wx-lib>stc</wx-lib>       \r
+        <wx-lib>adv</wx-lib>\r
+        <wx-lib>core</wx-lib>\r
+        <wx-lib>base</wx-lib>\r
+        <win32-res>../sample.rc</win32-res>\r
+               \r
+               <if cond="OUT_OF_TREE_MAKEFILES=='0'">\r
+            <sys-lib>$(LIB_SCINTILLA)</sys-lib>\r
+        </if>\r
+    </exe>\r
+\r
+</makefile>\r
diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp
new file mode 100644 (file)
index 0000000..17dca1d
--- /dev/null
@@ -0,0 +1,836 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webview.cpp
+// Purpose:     wxWebView sample
+// Author:      Marianne Gagnon
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+#endif
+
+#include "wx/artprov.h"
+#include "wx/notifmsg.h"
+#include "wx/settings.h"
+#include "wx/webview.h"
+#include "wx/webviewarchivehandler.h"
+#include "wx/infobar.h"
+#include "wx/filesys.h"
+#include "wx/fs_arc.h"
+
+#if !defined(__WXMSW__) && !defined(__WXPM__)
+    #include "../sample.xpm"
+#endif
+
+#if wxUSE_STC
+#include "wx/stc/stc.h"
+#else
+#error "wxStyledTextControl is needed by this sample"
+#endif
+
+#if defined(__WXMSW__) || defined(__WXOSX__)
+#include "stop.xpm"
+#include "refresh.xpm"
+#endif
+
+#include "wxlogo.xpm"
+
+
+//We map menu items to their history items
+WX_DECLARE_HASH_MAP(int, wxSharedPtr<wxWebViewHistoryItem>,
+                    wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap);
+
+class WebApp : public wxApp
+{
+public:
+    virtual bool OnInit();
+};
+
+class WebFrame : public wxFrame
+{
+public:
+    WebFrame();
+
+    void OnAnimationTimer(wxTimerEvent& evt);
+    void UpdateState();
+    void OnUrl(wxCommandEvent& evt);
+    void OnBack(wxCommandEvent& evt);
+    void OnForward(wxCommandEvent& evt);
+    void OnStop(wxCommandEvent& evt);
+    void OnReload(wxCommandEvent& evt);
+    void OnClearHistory(wxCommandEvent& evt);
+    void OnEnableHistory(wxCommandEvent& evt);
+    void OnNavigationRequest(wxWebViewEvent& evt);
+    void OnNavigationComplete(wxWebViewEvent& evt);
+    void OnDocumentLoaded(wxWebViewEvent& evt);
+    void OnNewWindow(wxWebViewEvent& evt);
+    void OnTitleChanged(wxWebViewEvent& evt);
+    void OnViewSourceRequest(wxCommandEvent& evt);
+    void OnToolsClicked(wxCommandEvent& evt);
+    void OnSetZoom(wxCommandEvent& evt);
+    void OnError(wxWebViewEvent& evt);
+    void OnPrint(wxCommandEvent& evt);
+    void OnCut(wxCommandEvent& evt);
+    void OnCopy(wxCommandEvent& evt);
+    void OnPaste(wxCommandEvent& evt);
+    void OnUndo(wxCommandEvent& evt);
+    void OnRedo(wxCommandEvent& evt);
+    void OnMode(wxCommandEvent& evt);
+    void OnZoomLayout(wxCommandEvent& evt);
+    void OnHistory(wxCommandEvent& evt);
+    void OnRunScript(wxCommandEvent& evt);
+    void OnClearSelection(wxCommandEvent& evt);
+    void OnDeleteSelection(wxCommandEvent& evt);
+    void OnSelectAll(wxCommandEvent& evt);
+    void OnLoadScheme(wxCommandEvent& evt);
+
+private:
+    wxTextCtrl* m_url;
+    wxWebView* m_browser;
+
+    wxToolBar* m_toolbar;
+    wxToolBarToolBase* m_toolbar_back;
+    wxToolBarToolBase* m_toolbar_forward;
+    wxToolBarToolBase* m_toolbar_stop;
+    wxToolBarToolBase* m_toolbar_reload;
+    wxToolBarToolBase* m_toolbar_tools;
+
+    wxMenu* m_tools_menu;
+    wxMenu* m_tools_history_menu;
+    wxMenuItem* m_tools_layout;
+    wxMenuItem* m_tools_tiny;
+    wxMenuItem* m_tools_small;
+    wxMenuItem* m_tools_medium;
+    wxMenuItem* m_tools_large;
+    wxMenuItem* m_tools_largest;
+    wxMenuItem* m_tools_handle_navigation;
+    wxMenuItem* m_tools_handle_new_window;
+    wxMenuItem* m_tools_enable_history;
+    wxMenuItem* m_edit_cut;
+    wxMenuItem* m_edit_copy;
+    wxMenuItem* m_edit_paste;
+    wxMenuItem* m_edit_undo;
+    wxMenuItem* m_edit_redo;
+    wxMenuItem* m_edit_mode;
+    wxMenuItem* m_selection_clear;
+    wxMenuItem* m_selection_delete;
+
+    wxTimer* m_timer;
+    int m_animation_angle;
+
+    wxInfoBar *m_info;
+    wxStaticText* m_info_text;
+
+    wxMenuHistoryMap m_histMenuItems;
+};
+
+class SourceViewDialog : public wxDialog
+{
+public:
+    SourceViewDialog(wxWindow* parent, wxString source);
+};
+
+IMPLEMENT_APP(WebApp)
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+bool WebApp::OnInit()
+{
+    if ( !wxApp::OnInit() )
+        return false;
+
+    WebFrame *frame = new WebFrame();
+    frame->Show();
+
+    return true;
+}
+
+WebFrame::WebFrame() : wxFrame(NULL, wxID_ANY, "wxWebView Sample")
+{
+    //Required from virtual file system archive support
+    wxFileSystem::AddHandler(new wxArchiveFSHandler);
+
+    // set the frame icon
+    SetIcon(wxICON(sample));
+    SetTitle("wxWebView Sample");
+
+    m_timer = NULL;
+    m_animation_angle = 0;
+
+
+    wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
+
+    // Create the toolbar
+    m_toolbar = CreateToolBar(wxTB_TEXT);
+    m_toolbar->SetToolBitmapSize(wxSize(32, 32));
+
+    wxBitmap back = wxArtProvider::GetBitmap(wxART_GO_BACK , wxART_TOOLBAR);
+    wxBitmap forward = wxArtProvider::GetBitmap(wxART_GO_FORWARD , wxART_TOOLBAR);
+    #ifdef __WXGTK__
+        wxBitmap stop = wxArtProvider::GetBitmap("gtk-stop", wxART_TOOLBAR);
+    #else
+        wxBitmap stop = wxBitmap(stop_xpm);
+    #endif
+    #ifdef __WXGTK__
+        wxBitmap refresh = wxArtProvider::GetBitmap("gtk-refresh", wxART_TOOLBAR);
+    #else
+        wxBitmap refresh = wxBitmap(refresh_xpm);
+    #endif
+
+    m_toolbar_back = m_toolbar->AddTool(wxID_ANY, _("Back"), back);
+    m_toolbar_forward = m_toolbar->AddTool(wxID_ANY, _("Forward"), forward);
+    m_toolbar_stop = m_toolbar->AddTool(wxID_ANY, _("Stop"), stop);
+    m_toolbar_reload = m_toolbar->AddTool(wxID_ANY, _("Reload"),  refresh);
+    m_url = new wxTextCtrl(m_toolbar, wxID_ANY, wxT(""),  wxDefaultPosition, wxSize(400, -1), wxTE_PROCESS_ENTER );
+    m_toolbar->AddControl(m_url, _("URL"));
+    m_toolbar_tools = m_toolbar->AddTool(wxID_ANY, _("Menu"), wxBitmap(wxlogo_xpm));
+
+    m_toolbar->Realize();
+
+    // Create the info panel
+    m_info = new wxInfoBar(this);
+    topsizer->Add(m_info, wxSizerFlags().Expand());
+
+    // Create the webview
+    m_browser = wxWebView::New(this, wxID_ANY, "http://www.wxwidgets.org");
+    topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1));
+
+    //We register the wxfs:// protocol for testing purposes
+    m_browser->RegisterHandler(wxSharedPtr<wxWebViewHandler>(new wxWebViewArchiveHandler("wxfs")));
+
+    SetSizer(topsizer);
+
+    //Set a more sensible size for web browsing
+    SetSize(wxSize(800, 600));
+
+    // Create a log window
+    new wxLogWindow(this, _("Logging"));
+
+    // Create the Tools menu
+    m_tools_menu = new wxMenu();
+    wxMenuItem* print = m_tools_menu->Append(wxID_ANY , _("Print"));
+    wxMenuItem* viewSource = m_tools_menu->Append(wxID_ANY , _("View Source"));
+    m_tools_menu->AppendSeparator();
+    m_tools_layout = m_tools_menu->AppendCheckItem(wxID_ANY, _("Use Layout Zoom"));
+    m_tools_tiny = m_tools_menu->AppendCheckItem(wxID_ANY, _("Tiny"));
+    m_tools_small = m_tools_menu->AppendCheckItem(wxID_ANY, _("Small"));
+    m_tools_medium = m_tools_menu->AppendCheckItem(wxID_ANY, _("Medium"));
+    m_tools_large = m_tools_menu->AppendCheckItem(wxID_ANY, _("Large"));
+    m_tools_largest = m_tools_menu->AppendCheckItem(wxID_ANY, _("Largest"));
+    m_tools_menu->AppendSeparator();
+    m_tools_handle_navigation = m_tools_menu->AppendCheckItem(wxID_ANY, _("Handle Navigation"));
+    m_tools_handle_new_window = m_tools_menu->AppendCheckItem(wxID_ANY, _("Handle New Windows"));
+    m_tools_menu->AppendSeparator();
+
+    //History menu
+    m_tools_history_menu = new wxMenu();
+    wxMenuItem* clearhist =  m_tools_history_menu->Append(wxID_ANY, _("Clear History"));
+    m_tools_enable_history = m_tools_history_menu->AppendCheckItem(wxID_ANY, _("Enable History"));
+    m_tools_history_menu->AppendSeparator();
+
+    m_tools_menu->AppendSubMenu(m_tools_history_menu, "History");
+
+    //Create an editing menu
+    wxMenu* editmenu = new wxMenu();
+    m_edit_cut = editmenu->Append(wxID_ANY, _("Cut"));
+    m_edit_copy = editmenu->Append(wxID_ANY, _("Copy"));
+    m_edit_paste = editmenu->Append(wxID_ANY, _("Paste"));
+    editmenu->AppendSeparator();
+    m_edit_undo = editmenu->Append(wxID_ANY, _("Undo"));
+    m_edit_redo = editmenu->Append(wxID_ANY, _("Redo"));
+    editmenu->AppendSeparator();
+    m_edit_mode = editmenu->AppendCheckItem(wxID_ANY, _("Edit Mode"));
+
+    m_tools_menu->AppendSeparator();
+    m_tools_menu->AppendSubMenu(editmenu, "Edit");
+
+    wxMenuItem* script =  m_tools_menu->Append(wxID_ANY, _("Run Script"));
+
+    //Selection menu
+    wxMenu* selection = new wxMenu();
+    m_selection_clear = selection->Append(wxID_ANY, _("Clear Selection"));
+    m_selection_delete = selection->Append(wxID_ANY, _("Delete Selection"));
+    wxMenuItem* selectall = selection->Append(wxID_ANY, _("Select All"));
+
+    editmenu->AppendSubMenu(selection, "Selection");
+
+    wxMenuItem* loadscheme =  m_tools_menu->Append(wxID_ANY, _("Custom Scheme Example"));
+
+    //By default we want to handle navigation and new windows
+    m_tools_handle_navigation->Check();
+    m_tools_handle_new_window->Check();
+    m_tools_enable_history->Check();
+    if(!m_browser->CanSetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT))
+        m_tools_layout->Enable(false);
+
+
+    // Connect the toolbar events
+    Connect(m_toolbar_back->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
+            wxCommandEventHandler(WebFrame::OnBack), NULL, this );
+    Connect(m_toolbar_forward->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
+            wxCommandEventHandler(WebFrame::OnForward), NULL, this );
+    Connect(m_toolbar_stop->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
+            wxCommandEventHandler(WebFrame::OnStop), NULL, this );
+    Connect(m_toolbar_reload->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
+            wxCommandEventHandler(WebFrame::OnReload),NULL, this );
+    Connect(m_toolbar_tools->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
+            wxCommandEventHandler(WebFrame::OnToolsClicked), NULL, this );
+
+    Connect(m_url->GetId(), wxEVT_COMMAND_TEXT_ENTER,
+            wxCommandEventHandler(WebFrame::OnUrl), NULL, this );
+
+    // Connect the webview events
+    Connect(m_browser->GetId(), wxEVT_COMMAND_WEB_VIEW_NAVIGATING,
+            wxWebViewEventHandler(WebFrame::OnNavigationRequest), NULL, this);
+    Connect(m_browser->GetId(), wxEVT_COMMAND_WEB_VIEW_NAVIGATED,
+            wxWebViewEventHandler(WebFrame::OnNavigationComplete), NULL, this);
+    Connect(m_browser->GetId(), wxEVT_COMMAND_WEB_VIEW_LOADED,
+            wxWebViewEventHandler(WebFrame::OnDocumentLoaded), NULL, this);
+    Connect(m_browser->GetId(), wxEVT_COMMAND_WEB_VIEW_ERROR,
+            wxWebViewEventHandler(WebFrame::OnError), NULL, this);
+    Connect(m_browser->GetId(), wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
+            wxWebViewEventHandler(WebFrame::OnNewWindow), NULL, this);
+    Connect(m_browser->GetId(), wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
+            wxWebViewEventHandler(WebFrame::OnTitleChanged), NULL, this);
+
+    // Connect the menu events
+    Connect(viewSource->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+           wxCommandEventHandler(WebFrame::OnViewSourceRequest),  NULL, this );
+    Connect(print->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnPrint),  NULL, this );
+    Connect(m_tools_layout->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnZoomLayout),  NULL, this );
+    Connect(m_tools_tiny->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnSetZoom),  NULL, this );
+    Connect(m_tools_small->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnSetZoom),  NULL, this );
+    Connect(m_tools_medium->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnSetZoom),  NULL, this );
+    Connect(m_tools_large->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnSetZoom),  NULL, this );
+    Connect(m_tools_largest->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnSetZoom),  NULL, this );
+    Connect(clearhist->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnClearHistory),  NULL, this );
+    Connect(m_tools_enable_history->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnEnableHistory),  NULL, this );
+    Connect(m_edit_cut->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnCut),  NULL, this );
+    Connect(m_edit_copy->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnCopy),  NULL, this );
+    Connect(m_edit_paste->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnPaste),  NULL, this );
+    Connect(m_edit_undo->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnUndo),  NULL, this );
+    Connect(m_edit_redo->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnRedo),  NULL, this );
+    Connect(m_edit_mode->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnMode),  NULL, this );
+    Connect(script->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnRunScript),  NULL, this );
+    Connect(m_selection_clear->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnClearSelection),  NULL, this );
+    Connect(m_selection_delete->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnDeleteSelection),  NULL, this );
+    Connect(selectall->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnSelectAll),  NULL, this );
+    Connect(loadscheme->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+            wxCommandEventHandler(WebFrame::OnLoadScheme),  NULL, this );
+}
+
+void WebFrame::OnAnimationTimer(wxTimerEvent& WXUNUSED(evt))
+{
+    m_animation_angle += 15;
+    if (m_animation_angle > 360) m_animation_angle -= 360;
+
+    wxBitmap image(24, 24);
+    {
+        wxMemoryDC dc;
+        dc.SelectObject(image);
+        dc.SetBackground(wxBrush(wxColour(255,0,255)));
+        dc.Clear();
+
+        if (m_animation_angle >= 0 && m_animation_angle <= 180)
+        {
+            dc.SetBrush(*wxYELLOW_BRUSH);
+            dc.SetPen(*wxYELLOW_PEN);
+            dc.DrawCircle(16 - int(sin(m_animation_angle*0.01745f /* convert to radians */)*14.0f),
+            16 + int(cos(m_animation_angle*0.01745f /* convert to radians */)*14.0f), 3 );
+        }
+
+        dc.DrawBitmap(wxBitmap(wxlogo_xpm), 0, 0, true);
+
+        if (m_animation_angle > 180)
+        {
+            dc.SetBrush(*wxYELLOW_BRUSH);
+            dc.SetPen(*wxYELLOW_PEN);
+            dc.DrawCircle(16 - int(sin(m_animation_angle*0.01745f /* convert to radians */)*14.0f),
+            16 + int(cos(m_animation_angle*0.01745f /* convert to radians */)*14.0f), 3 );
+        }
+    }
+    image.SetMask(new wxMask(image, wxColour(255,0,255)));
+    m_toolbar->SetToolNormalBitmap(m_toolbar_tools->GetId(), image);
+}
+
+/**
+  * Method that retrieves the current state from the web control and updates the GUI
+  * the reflect this current state.
+  */
+void WebFrame::UpdateState()
+{
+    m_toolbar->EnableTool( m_toolbar_back->GetId(), m_browser->CanGoBack() );
+    m_toolbar->EnableTool( m_toolbar_forward->GetId(), m_browser->CanGoForward() );
+
+    if (m_browser->IsBusy())
+    {
+        if (m_timer == NULL)
+        {
+            m_timer = new wxTimer(this);
+            this->Connect(wxEVT_TIMER, wxTimerEventHandler(WebFrame::OnAnimationTimer), NULL, this);
+        }
+        m_timer->Start(100); // start animation timer
+
+        m_toolbar->EnableTool( m_toolbar_stop->GetId(), true );
+    }
+    else
+    {
+        if (m_timer != NULL) m_timer->Stop(); // stop animation timer
+        m_toolbar->SetToolNormalBitmap(m_toolbar_tools->GetId(), wxBitmap(wxlogo_xpm));
+        m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
+    }
+
+    SetTitle( m_browser->GetCurrentTitle() );
+    m_url->SetValue( m_browser->GetCurrentURL() );
+}
+
+/**
+  * Callback invoked when user entered an URL and pressed enter
+  */
+void WebFrame::OnUrl(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->LoadURL( m_url->GetValue() );
+    UpdateState();
+}
+
+/**
+    * Callback invoked when user pressed the "back" button
+    */
+void WebFrame::OnBack(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->GoBack();
+    UpdateState();
+}
+
+/**
+  * Callback invoked when user pressed the "forward" button
+  */
+void WebFrame::OnForward(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->GoForward();
+    UpdateState();
+}
+
+/**
+  * Callback invoked when user pressed the "stop" button
+  */
+void WebFrame::OnStop(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Stop();
+    UpdateState();
+}
+
+/**
+  * Callback invoked when user pressed the "reload" button
+  */
+void WebFrame::OnReload(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Reload();
+    UpdateState();
+}
+
+void WebFrame::OnClearHistory(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->ClearHistory();
+    UpdateState();
+}
+
+void WebFrame::OnEnableHistory(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->EnableHistory(m_tools_enable_history->IsChecked());
+    UpdateState();
+}
+
+void WebFrame::OnCut(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Cut();
+}
+
+void WebFrame::OnCopy(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Copy();
+}
+
+void WebFrame::OnPaste(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Paste();
+}
+
+void WebFrame::OnUndo(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Undo();
+}
+
+void WebFrame::OnRedo(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Redo();
+}
+
+void WebFrame::OnMode(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->SetEditable(m_edit_mode->IsChecked());
+}
+
+void WebFrame::OnLoadScheme(wxCommandEvent& WXUNUSED(evt))
+{
+    wxFileName helpfile("../help/doc.zip");
+    helpfile.MakeAbsolute();
+    wxString path = helpfile.GetFullPath();
+    //Under MSW we need to flip the slashes
+    path.Replace("\\", "/");
+    path = "wxfs:///" + path + ";protocol=zip/doc.htm";
+    m_browser->LoadURL(path);
+}
+
+/**
+  * Callback invoked when there is a request to load a new page (for instance
+  * when the user clicks a link)
+  */
+void WebFrame::OnNavigationRequest(wxWebViewEvent& evt)
+{
+    if(m_info->IsShown())
+    {
+        m_info->Dismiss();
+    }
+
+    wxLogMessage("%s", "Navigation request to '" + evt.GetURL() + "' (target='" +
+    evt.GetTarget() + "')");
+
+    wxASSERT(m_browser->IsBusy());
+
+    //If we don't want to handle navigation then veto the event and navigation
+    //will not take place, we also need to stop the loading animation
+    if(!m_tools_handle_navigation->IsChecked())
+    {
+        evt.Veto();
+        if (m_timer != NULL) m_timer->Stop(); // stop animation timer
+        m_toolbar->SetToolNormalBitmap(m_toolbar_tools->GetId(), wxBitmap(wxlogo_xpm));
+        m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
+    }
+    else
+    {
+        UpdateState();
+    }
+}
+
+/**
+  * Callback invoked when a navigation request was accepted
+  */
+void WebFrame::OnNavigationComplete(wxWebViewEvent& evt)
+{
+    wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'");
+    UpdateState();
+}
+
+/**
+  * Callback invoked when a page is finished loading
+  */
+void WebFrame::OnDocumentLoaded(wxWebViewEvent& evt)
+{
+    //Only notify if the document is the main frame, not a subframe
+    if(evt.GetURL() == m_browser->GetCurrentURL())
+    {
+        wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'");
+    }
+    UpdateState();
+}
+
+/**
+  * On new window, we veto to stop extra windows appearing
+  */
+void WebFrame::OnNewWindow(wxWebViewEvent& evt)
+{
+    wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'");
+
+    //If we handle new window events then just load them in this window as we
+    //are a single window browser
+    if(m_tools_handle_new_window->IsChecked())
+        m_browser->LoadURL(evt.GetURL());
+
+    UpdateState();
+}
+
+void WebFrame::OnTitleChanged(wxWebViewEvent& evt)
+{
+    wxLogMessage("%s", "Title changed; title='" + evt.GetString() + "'");
+    UpdateState();
+}
+
+/**
+  * Invoked when user selects the "View Source" menu item
+  */
+void WebFrame::OnViewSourceRequest(wxCommandEvent& WXUNUSED(evt))
+{
+    SourceViewDialog dlg(this, m_browser->GetPageSource());
+    dlg.ShowModal();
+}
+
+/**
+  * Invoked when user selects the "Menu" item
+  */
+void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt))
+{
+    if(m_browser->GetCurrentURL() == "")
+        return;
+
+    m_tools_tiny->Check(false);
+    m_tools_small->Check(false);
+    m_tools_medium->Check(false);
+    m_tools_large->Check(false);
+    m_tools_largest->Check(false);
+
+    wxWebViewZoom zoom = m_browser->GetZoom();
+    switch (zoom)
+    {
+    case wxWEB_VIEW_ZOOM_TINY:
+        m_tools_tiny->Check();
+        break;
+    case wxWEB_VIEW_ZOOM_SMALL:
+        m_tools_small->Check();
+        break;
+    case wxWEB_VIEW_ZOOM_MEDIUM:
+        m_tools_medium->Check();
+        break;
+    case wxWEB_VIEW_ZOOM_LARGE:
+        m_tools_large->Check();
+        break;
+    case wxWEB_VIEW_ZOOM_LARGEST:
+        m_tools_largest->Check();
+        break;
+    }
+
+    m_edit_cut->Enable(m_browser->CanCut());
+    m_edit_copy->Enable(m_browser->CanCopy());
+    m_edit_paste->Enable(m_browser->CanPaste());
+
+    m_edit_undo->Enable(m_browser->CanUndo());
+    m_edit_redo->Enable(m_browser->CanRedo());
+
+    m_selection_clear->Enable(m_browser->HasSelection());
+    m_selection_delete->Enable(m_browser->HasSelection());
+
+    //Firstly we clear the existing menu items, then we add the current ones
+    wxMenuHistoryMap::const_iterator it;
+    for( it = m_histMenuItems.begin(); it != m_histMenuItems.end(); ++it )
+    {
+        m_tools_history_menu->Destroy(it->first);
+    }
+    m_histMenuItems.clear();
+
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > back = m_browser->GetBackwardHistory();
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > forward = m_browser->GetForwardHistory();
+
+    wxMenuItem* item;
+
+    unsigned int i;
+    for(i = 0; i < back.size(); i++)
+    {
+        item = m_tools_history_menu->AppendRadioItem(wxID_ANY, back[i]->GetTitle());
+        m_histMenuItems[item->GetId()] = back[i];
+        Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED,
+                wxCommandEventHandler(WebFrame::OnHistory), NULL, this );
+    }
+
+    item = m_tools_history_menu->AppendRadioItem(wxID_ANY, m_browser->GetCurrentTitle());
+    item->Check();
+
+    //No need to connect the current item
+    m_histMenuItems[item->GetId()] = wxSharedPtr<wxWebViewHistoryItem>(new wxWebViewHistoryItem(m_browser->GetCurrentURL(), m_browser->GetCurrentTitle()));
+
+    for(i = 0; i < forward.size(); i++)
+    {
+        item = m_tools_history_menu->AppendRadioItem(wxID_ANY, forward[i]->GetTitle());
+        m_histMenuItems[item->GetId()] = forward[i];
+        Connect(item->GetId(), wxEVT_COMMAND_TOOL_CLICKED,
+                wxCommandEventHandler(WebFrame::OnHistory), NULL, this );
+    }
+
+    wxPoint position = ScreenToClient( wxGetMousePosition() );
+    PopupMenu(m_tools_menu, position.x, position.y);
+}
+
+/**
+  * Invoked when user selects the zoom size in the menu
+  */
+void WebFrame::OnSetZoom(wxCommandEvent& evt)
+{
+    if (evt.GetId() == m_tools_tiny->GetId())
+    {
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_TINY);
+    }
+    else if (evt.GetId() == m_tools_small->GetId())
+    {
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_SMALL);
+    }
+    else if (evt.GetId() == m_tools_medium->GetId())
+    {
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_MEDIUM);
+    }
+    else if (evt.GetId() == m_tools_large->GetId())
+    {
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_LARGE);
+    }
+    else if (evt.GetId() == m_tools_largest->GetId())
+    {
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_LARGEST);
+    }
+    else
+    {
+        wxFAIL;
+    }
+}
+
+void WebFrame::OnZoomLayout(wxCommandEvent& WXUNUSED(evt))
+{
+    if(m_tools_layout->IsChecked())
+        m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT);
+    else
+        m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_TEXT);
+}
+
+void WebFrame::OnHistory(wxCommandEvent& evt)
+{
+    m_browser->LoadHistoryItem(m_histMenuItems[evt.GetId()]);
+}
+
+void WebFrame::OnRunScript(wxCommandEvent& WXUNUSED(evt))
+{
+    wxTextEntryDialog dialog(this, "Enter JavaScript to run.", wxGetTextFromUserPromptStr, "", wxOK|wxCANCEL|wxCENTRE|wxTE_MULTILINE);
+    if(dialog.ShowModal() == wxID_OK)
+    {
+        m_browser->RunScript(dialog.GetValue());
+    }
+}
+
+void WebFrame::OnClearSelection(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->ClearSelection();
+}
+
+void WebFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->DeleteSelection();
+}
+
+void WebFrame::OnSelectAll(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->SelectAll();
+}
+
+/**
+  * Callback invoked when a loading error occurs
+  */
+void WebFrame::OnError(wxWebViewEvent& evt)
+{
+    wxString errorCategory;
+    switch (evt.GetInt())
+    {
+    case  wxWEB_NAV_ERR_CONNECTION:
+        errorCategory = "wxWEB_NAV_ERR_CONNECTION";
+        break;
+
+    case wxWEB_NAV_ERR_CERTIFICATE:
+        errorCategory = "wxWEB_NAV_ERR_CERTIFICATE";
+        break;
+
+    case wxWEB_NAV_ERR_AUTH:
+        errorCategory = "wxWEB_NAV_ERR_AUTH";
+        break;
+
+    case wxWEB_NAV_ERR_SECURITY:
+        errorCategory = "wxWEB_NAV_ERR_SECURITY";
+        break;
+
+    case wxWEB_NAV_ERR_NOT_FOUND:
+        errorCategory = "wxWEB_NAV_ERR_NOT_FOUND";
+        break;
+
+    case wxWEB_NAV_ERR_REQUEST:
+        errorCategory = "wxWEB_NAV_ERR_REQUEST";
+        break;
+
+    case wxWEB_NAV_ERR_USER_CANCELLED:
+        errorCategory = "wxWEB_NAV_ERR_USER_CANCELLED";
+        break;
+
+    case wxWEB_NAV_ERR_OTHER:
+        errorCategory = "wxWEB_NAV_ERR_OTHER";
+        break;
+    }
+
+    wxLogMessage("Error; url='" + evt.GetURL() + "', error='" + errorCategory + "' (" + evt.GetString() + ")");
+
+    //Show the info bar with an error
+    m_info->ShowMessage(_("An error occurred loading ") + evt.GetURL() + "\n" +
+    "'" + errorCategory + "' (" + evt.GetString() + ")", wxICON_ERROR);
+
+    UpdateState();
+}
+
+/**
+  * Invoked when user selects "Print" from the menu
+  */
+void WebFrame::OnPrint(wxCommandEvent& WXUNUSED(evt))
+{
+    m_browser->Print();
+}
+
+SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) :
+                  wxDialog(parent, wxID_ANY, "Source Code",
+                           wxDefaultPosition, wxSize(700,500),
+                           wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
+{
+    wxStyledTextCtrl* text = new wxStyledTextCtrl(this, wxID_ANY);
+    text->SetMarginWidth(1, 30);
+    text->SetMarginType(1, wxSTC_MARGIN_NUMBER);
+    text->SetText(source);
+
+    text->StyleClearAll();
+    text->SetLexer(wxSTC_LEX_HTML);
+    text->StyleSetForeground(wxSTC_H_DOUBLESTRING, wxColour(255,0,0));
+    text->StyleSetForeground(wxSTC_H_SINGLESTRING, wxColour(255,0,0));
+    text->StyleSetForeground(wxSTC_H_ENTITY, wxColour(255,0,0));
+    text->StyleSetForeground(wxSTC_H_TAG, wxColour(0,150,0));
+    text->StyleSetForeground(wxSTC_H_TAGUNKNOWN, wxColour(0,150,0));
+    text->StyleSetForeground(wxSTC_H_ATTRIBUTE, wxColour(0,0,150));
+    text->StyleSetForeground(wxSTC_H_ATTRIBUTEUNKNOWN, wxColour(0,0,150));
+    text->StyleSetForeground(wxSTC_H_COMMENT, wxColour(150,150,150));
+
+    wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
+    sizer->Add(text, 1, wxEXPAND);
+    SetSizer(sizer);
+}
diff --git a/samples/webview/webview.dsp b/samples/webview/webview.dsp
new file mode 100644 (file)
index 0000000..e92f177
--- /dev/null
@@ -0,0 +1,264 @@
+# Microsoft Developer Studio Project File - Name="webview" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Application" 0x0101\r
+\r
+CFG=webview - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "webview.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "webview.mak" CFG="webview - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "webview - Win32 DLL Universal Release" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 DLL Universal Debug" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 DLL Release" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 DLL Debug" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 Universal Release" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 Universal Debug" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 Release" (based on "Win32 (x86) Application")\r
+!MESSAGE "webview - Win32 Debug" (based on "Win32 (x86) Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP AllowPerConfigDependencies 0\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+MTL=midl.exe\r
+RSC=rc.exe\r
+\r
+!IF  "$(CFG)" == "webview - Win32 DLL Universal Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivudll"\r
+# PROP BASE Intermediate_Dir "vc_mswunivudll\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivudll"\r
+# PROP Intermediate_Dir "vc_mswunivudll\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmswuniv29u_webview.lib wxmswuniv29u_stc.lib wxmswuniv29u_adv.lib wxmswuniv29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivudll\webview.exe" /debug /pdb:"vc_mswunivudll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29u_webview.lib wxmswuniv29u_stc.lib wxmswuniv29u_adv.lib wxmswuniv29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivudll\webview.exe" /debug /pdb:"vc_mswunivudll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 DLL Universal Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivuddll"\r
+# PROP BASE Intermediate_Dir "vc_mswunivuddll\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivuddll"\r
+# PROP Intermediate_Dir "vc_mswunivuddll\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmswuniv29ud_webview.lib wxmswuniv29ud_stc.lib wxmswuniv29ud_adv.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivuddll\webview.exe" /debug /pdb:"vc_mswunivuddll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29ud_webview.lib wxmswuniv29ud_stc.lib wxmswuniv29ud_adv.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivuddll\webview.exe" /debug /pdb:"vc_mswunivuddll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 DLL Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswudll"\r
+# PROP BASE Intermediate_Dir "vc_mswudll\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswudll"\r
+# PROP Intermediate_Dir "vc_mswudll\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswudll\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmsw29u_webview.lib wxmsw29u_stc.lib wxmsw29u_adv.lib wxmsw29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswudll\webview.exe" /debug /pdb:"vc_mswudll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmsw29u_webview.lib wxmsw29u_stc.lib wxmsw29u_adv.lib wxmsw29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswudll\webview.exe" /debug /pdb:"vc_mswudll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 DLL Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswuddll"\r
+# PROP BASE Intermediate_Dir "vc_mswuddll\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswuddll"\r
+# PROP Intermediate_Dir "vc_mswuddll\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmsw29ud_webview.lib wxmsw29ud_stc.lib wxmsw29ud_adv.lib wxmsw29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswuddll\webview.exe" /debug /pdb:"vc_mswuddll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+# ADD LINK32 wxmsw29ud_webview.lib wxmsw29ud_stc.lib wxmsw29ud_adv.lib wxmsw29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswuddll\webview.exe" /debug /pdb:"vc_mswuddll\webview.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 Universal Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivu"\r
+# PROP BASE Intermediate_Dir "vc_mswunivu\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivu"\r
+# PROP Intermediate_Dir "vc_mswunivu\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmswuniv29u_webview.lib wxmswuniv29u_stc.lib wxmswuniv29u_adv.lib wxmswuniv29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivu\webview.exe" /debug /pdb:"vc_mswunivu\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29u_webview.lib wxmswuniv29u_stc.lib wxmswuniv29u_adv.lib wxmswuniv29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivu\webview.exe" /debug /pdb:"vc_mswunivu\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 Universal Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswunivud"\r
+# PROP BASE Intermediate_Dir "vc_mswunivud\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswunivud"\r
+# PROP Intermediate_Dir "vc_mswunivud\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmswuniv29ud_webview.lib wxmswuniv29ud_stc.lib wxmswuniv29ud_adv.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivud\webview.exe" /debug /pdb:"vc_mswunivud\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmswuniv29ud_webview.lib wxmswuniv29ud_stc.lib wxmswuniv29ud_adv.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswunivud\webview.exe" /debug /pdb:"vc_mswunivud\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswu"\r
+# PROP BASE Intermediate_Dir "vc_mswu\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswu"\r
+# PROP Intermediate_Dir "vc_mswu\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswu\webview.pdb /opt:ref /opt:icf /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "NDEBUG" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "NDEBUG" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmsw29u_webview.lib wxmsw29u_stc.lib wxmsw29u_adv.lib wxmsw29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswu\webview.exe" /debug /pdb:"vc_mswu\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmsw29u_webview.lib wxmsw29u_stc.lib wxmsw29u_adv.lib wxmsw29u_core.lib wxbase29u.lib wxscintilla.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswu\webview.exe" /debug /pdb:"vc_mswu\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+\r
+!ELSEIF  "$(CFG)" == "webview - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "vc_mswud"\r
+# PROP BASE Intermediate_Dir "vc_mswud\webview"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "vc_mswud"\r
+# PROP Intermediate_Dir "vc_mswud\webview"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswud\webview.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /I ".\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
+# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\samples" /d NOPCH\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 wxmsw29ud_webview.lib wxmsw29ud_stc.lib wxmsw29ud_adv.lib wxmsw29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswud\webview.exe" /debug /pdb:"vc_mswud\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+# ADD LINK32 wxmsw29ud_webview.lib wxmsw29ud_stc.lib wxmsw29ud_adv.lib wxmsw29ud_core.lib wxbase29ud.lib wxscintillad.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib /nologo /machine:i386 /out:"vc_mswud\webview.exe" /debug /pdb:"vc_mswud\webview.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:windows\r
+\r
+!ENDIF\r
+\r
+# Begin Target\r
+\r
+# Name "webview - Win32 DLL Universal Release"\r
+# Name "webview - Win32 DLL Universal Debug"\r
+# Name "webview - Win32 DLL Release"\r
+# Name "webview - Win32 DLL Debug"\r
+# Name "webview - Win32 Universal Release"\r
+# Name "webview - Win32 Universal Debug"\r
+# Name "webview - Win32 Release"\r
+# Name "webview - Win32 Debug"\r
+# Begin Group "Source Files"\r
+\r
+# PROP Default_Filter ""\r
+# Begin Source File\r
+\r
+SOURCE=.\..\sample.rc\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\webview.cpp\r
+# End Source File\r
+# End Group\r
+# End Target\r
+# End Project\r
+\r
diff --git a/samples/webview/webview_vc7.vcproj b/samples/webview/webview_vc7.vcproj
new file mode 100644 (file)
index 0000000..a88efe8
--- /dev/null
@@ -0,0 +1,561 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<!--\r
+\r
+  This project was generated by\r
+  Bakefile 0.2.9 (http://www.bakefile.org)\r
+  Do not modify, all changes will be overwritten!\r
+\r
+-->\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="7.10"\r
+       Name="webview"\r
+       ProjectGUID="{5AE6DA7C-2316-5AC1-824F-0093385C19A9}">\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"/>\r
+       </Platforms>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="vc_mswud"\r
+                       IntermediateDirectory="vc_mswud\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="TRUE"\r
+                               ExceptionHandling="TRUE"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="TRUE"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswud\webview\"\r
+                               ProgramDataBaseFileName="vc_mswud\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29ud_webview.lib  wxmsw29ud_stc.lib  wxmsw29ud_adv.lib  wxmsw29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswud\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswud\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="vc_mswu"\r
+                       IntermediateDirectory="vc_mswu\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="TRUE"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswu\webview\"\r
+                               ProgramDataBaseFileName="vc_mswu\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29u_webview.lib  wxmsw29u_stc.lib  wxmsw29u_adv.lib  wxmsw29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswu\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswu\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Universal Debug|Win32"\r
+                       OutputDirectory="vc_mswunivud"\r
+                       IntermediateDirectory="vc_mswunivud\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="TRUE"\r
+                               ExceptionHandling="TRUE"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="TRUE"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswunivud\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivud\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29ud_webview.lib  wxmswuniv29ud_stc.lib  wxmswuniv29ud_adv.lib  wxmswuniv29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivud\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswunivud\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Universal Release|Win32"\r
+                       OutputDirectory="vc_mswunivu"\r
+                       IntermediateDirectory="vc_mswunivu\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="TRUE"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswunivu\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivu\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29u_webview.lib  wxmswuniv29u_stc.lib  wxmswuniv29u_adv.lib  wxmswuniv29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivu\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswunivu\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Debug|Win32"\r
+                       OutputDirectory="vc_mswuddll"\r
+                       IntermediateDirectory="vc_mswuddll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="TRUE"\r
+                               ExceptionHandling="TRUE"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="TRUE"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswuddll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswuddll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29ud_webview.lib  wxmsw29ud_stc.lib  wxmsw29ud_adv.lib  wxmsw29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswuddll\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswuddll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Release|Win32"\r
+                       OutputDirectory="vc_mswudll"\r
+                       IntermediateDirectory="vc_mswudll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="TRUE"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswudll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswudll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29u_webview.lib  wxmsw29u_stc.lib  wxmsw29u_adv.lib  wxmsw29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswudll\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswudll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Universal Debug|Win32"\r
+                       OutputDirectory="vc_mswunivuddll"\r
+                       IntermediateDirectory="vc_mswunivuddll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="TRUE"\r
+                               ExceptionHandling="TRUE"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="TRUE"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswunivuddll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivuddll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29ud_webview.lib  wxmswuniv29ud_stc.lib  wxmswuniv29ud_adv.lib  wxmswuniv29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivuddll\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswunivuddll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Universal Release|Win32"\r
+                       OutputDirectory="vc_mswunivudll"\r
+                       IntermediateDirectory="vc_mswunivudll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="FALSE"\r
+                       CharacterSet="1">\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="TRUE"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="TRUE"\r
+                               ObjectFile="vc_mswunivudll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivudll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="TRUE"\r
+                               Detect64BitPortabilityProblems="TRUE"\r
+                               DebugInformationFormat="3"/>\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"/>\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29u_webview.lib  wxmswuniv29u_stc.lib  wxmswuniv29u_adv.lib  wxmswuniv29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivudll\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="TRUE"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateDebugInformation="TRUE"\r
+                               ProgramDatabaseFile="vc_mswunivudll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"/>\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"/>\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"/>\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"/>\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"/>\r
+                       <Tool\r
+                               Name="VCManagedWrapperGeneratorTool"/>\r
+                       <Tool\r
+                               Name="VCAuxiliaryManagedWrapperGeneratorTool"/>\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+               \r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">\r
+                       <File\r
+                               RelativePath=".\webview.cpp">\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">\r
+                       <File\r
+                               RelativePath="..\sample.rc">\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+               \r
+       </Globals>\r
+</VisualStudioProject>\r
+\r
diff --git a/samples/webview/webview_vc8.vcproj b/samples/webview/webview_vc8.vcproj
new file mode 100644 (file)
index 0000000..081e0bd
--- /dev/null
@@ -0,0 +1,826 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<!--\r
+\r
+  This project was generated by\r
+  Bakefile 0.2.9 (http://www.bakefile.org)\r
+  Do not modify, all changes will be overwritten!\r
+\r
+-->\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="webview"\r
+       ProjectGUID="{8511275A-E88B-598A-B16B-091E4E6790C3}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+               \r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="vc_mswud"\r
+                       IntermediateDirectory="vc_mswud\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="true"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswud\webview\"\r
+                               ProgramDataBaseFileName="vc_mswud\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29ud_webview.lib  wxmsw29ud_stc.lib  wxmsw29ud_adv.lib  wxmsw29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswud\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswud\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswud\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="vc_mswu"\r
+                       IntermediateDirectory="vc_mswu\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswu\webview\"\r
+                               ProgramDataBaseFileName="vc_mswu\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29u_webview.lib  wxmsw29u_stc.lib  wxmsw29u_adv.lib  wxmsw29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswu\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswu\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswu\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Universal Debug|Win32"\r
+                       OutputDirectory="vc_mswunivud"\r
+                       IntermediateDirectory="vc_mswunivud\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="true"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivud\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivud\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29ud_webview.lib  wxmswuniv29ud_stc.lib  wxmswuniv29ud_adv.lib  wxmswuniv29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivud\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivud\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivud\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Universal Release|Win32"\r
+                       OutputDirectory="vc_mswunivu"\r
+                       IntermediateDirectory="vc_mswunivu\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivu\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivu\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29u_webview.lib  wxmswuniv29u_stc.lib  wxmswuniv29u_adv.lib  wxmswuniv29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivu\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivu\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivu\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Debug|Win32"\r
+                       OutputDirectory="vc_mswuddll"\r
+                       IntermediateDirectory="vc_mswuddll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="true"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswuddll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswuddll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29ud_webview.lib  wxmsw29ud_stc.lib  wxmsw29ud_adv.lib  wxmsw29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswuddll\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswuddll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswuddll\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Release|Win32"\r
+                       OutputDirectory="vc_mswudll"\r
+                       IntermediateDirectory="vc_mswudll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswudll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswudll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29u_webview.lib  wxmsw29u_stc.lib  wxmsw29u_adv.lib  wxmsw29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswudll\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswudll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswudll\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Universal Debug|Win32"\r
+                       OutputDirectory="vc_mswunivuddll"\r
+                       IntermediateDirectory="vc_mswunivuddll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               MinimalRebuild="true"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivuddll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivuddll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29ud_webview.lib  wxmswuniv29ud_stc.lib  wxmswuniv29ud_adv.lib  wxmswuniv29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivuddll\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivuddll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivuddll\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Universal Release|Win32"\r
+                       OutputDirectory="vc_mswunivudll"\r
+                       IntermediateDirectory="vc_mswunivudll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivudll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivudll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29u_webview.lib  wxmswuniv29u_stc.lib  wxmswuniv29u_adv.lib  wxmswuniv29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivudll\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivudll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivudll\webview_vc8.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+               \r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\webview.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\sample.rc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+               \r
+       </Globals>\r
+</VisualStudioProject>\r
+\r
diff --git a/samples/webview/webview_vc9.vcproj b/samples/webview/webview_vc9.vcproj
new file mode 100644 (file)
index 0000000..079342b
--- /dev/null
@@ -0,0 +1,798 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<!--\r
+\r
+  This project was generated by\r
+  Bakefile 0.2.9 (http://www.bakefile.org)\r
+  Do not modify, all changes will be overwritten!\r
+\r
+-->\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9.00"\r
+       Name="webview"\r
+       ProjectGUID="{47EFE0E4-1BE1-5DA7-8D91-072E5F2808B6}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+               \r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="vc_mswud"\r
+                       IntermediateDirectory="vc_mswud\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswud\webview\"\r
+                               ProgramDataBaseFileName="vc_mswud\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29ud_webview.lib  wxmsw29ud_stc.lib  wxmsw29ud_adv.lib  wxmsw29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswud\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswud\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswud\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="vc_mswu"\r
+                       IntermediateDirectory="vc_mswu\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswu\webview\"\r
+                               ProgramDataBaseFileName="vc_mswu\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29u_webview.lib  wxmsw29u_stc.lib  wxmsw29u_adv.lib  wxmsw29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswu\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswu\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswu\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Universal Debug|Win32"\r
+                       OutputDirectory="vc_mswunivud"\r
+                       IntermediateDirectory="vc_mswunivud\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivud\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivud\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29ud_webview.lib  wxmswuniv29ud_stc.lib  wxmswuniv29ud_adv.lib  wxmswuniv29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivud\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivud\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivud\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Universal Release|Win32"\r
+                       OutputDirectory="vc_mswunivu"\r
+                       IntermediateDirectory="vc_mswunivu\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivu\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivu\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29u_webview.lib  wxmswuniv29u_stc.lib  wxmswuniv29u_adv.lib  wxmswuniv29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivu\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivu\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivu\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Debug|Win32"\r
+                       OutputDirectory="vc_mswuddll"\r
+                       IntermediateDirectory="vc_mswuddll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswuddll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswuddll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29ud_webview.lib  wxmsw29ud_stc.lib  wxmsw29ud_adv.lib  wxmsw29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswuddll\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswuddll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswuddll\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Release|Win32"\r
+                       OutputDirectory="vc_mswudll"\r
+                       IntermediateDirectory="vc_mswudll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswudll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswudll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmsw29u_webview.lib  wxmsw29u_stc.lib  wxmsw29u_adv.lib  wxmsw29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswudll\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswudll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswudll\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Universal Debug|Win32"\r
+                       OutputDirectory="vc_mswunivuddll"\r
+                       IntermediateDirectory="vc_mswunivuddll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="true"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivuddll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivuddll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29ud_webview.lib  wxmswuniv29ud_stc.lib  wxmswuniv29ud_adv.lib  wxmswuniv29ud_core.lib  wxbase29ud.lib  wxscintillad.lib  wxtiffd.lib wxjpegd.lib wxpngd.lib  wxzlibd.lib wxregexud.lib wxexpatd.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivuddll\webview.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivuddll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivuddll\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="DLL Universal Release|Win32"\r
+                       OutputDirectory="vc_mswunivudll"\r
+                       IntermediateDirectory="vc_mswunivudll\webview"\r
+                       ConfigurationType="1"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/MP"\r
+                               Optimization="2"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                               PreprocessorDefinitions="WIN32;__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               ExceptionHandling="1"\r
+                               RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="true"\r
+                               ObjectFile="vc_mswunivudll\webview\"\r
+                               ProgramDataBaseFileName="vc_mswunivudll\webview.pdb"\r
+                               WarningLevel="4"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
+                               Culture="1033"\r
+                               AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;.;.\..\..\samples"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions=""\r
+                               AdditionalDependencies="wxmswuniv29u_webview.lib  wxmswuniv29u_stc.lib  wxmswuniv29u_adv.lib  wxmswuniv29u_core.lib  wxbase29u.lib  wxscintilla.lib  wxtiff.lib wxjpeg.lib wxpng.lib  wxzlib.lib wxregexu.lib wxexpat.lib    kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib wininet.lib"\r
+                               OutputFile="vc_mswunivudll\webview.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
+                               GenerateManifest="true"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="vc_mswunivudll\webview.pdb"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                               OutputFile="vc_mswunivudll\webview_vc9.bsc"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+               \r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\webview.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\sample.rc"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+               \r
+       </Globals>\r
+</VisualStudioProject>\r
+\r
diff --git a/samples/webview/wxlogo.xpm b/samples/webview/wxlogo.xpm
new file mode 100644 (file)
index 0000000..efaeb5d
--- /dev/null
@@ -0,0 +1,84 @@
+/* XPM */\r
+static const char * wxlogo_xpm[] = {\r
+"24 24 57 1",\r
+"      c None",\r
+".     c #000006",\r
+"+     c #00003F",\r
+"@     c #00003C",\r
+"#     c #000034",\r
+"$     c #000000",\r
+"%     c #00000E",\r
+"&     c #000085",\r
+"*     c #000079",\r
+"=     c #000081",\r
+"-     c #000070",\r
+";     c #00000D",\r
+">     c #8686CB",\r
+",     c #FFFFFF",\r
+"'     c #000078",\r
+")     c #000080",\r
+"!     c #00006F",\r
+"~     c #7F7FC7",\r
+"{     c #00007F",\r
+"]     c #000083",\r
+"^     c #000088",\r
+"/     c #000076",\r
+"(     c #000047",\r
+"_     c #000040",\r
+":     c #EDED00",\r
+"<     c #FFFF00",\r
+"[     c #202000",\r
+"}     c #0E0000",\r
+"|     c #7F0000",\r
+"1     c #770000",\r
+"2     c #7E0000",\r
+"3     c #E0E000",\r
+"4     c #FFFF88",\r
+"5     c #FFFF3F",\r
+"6     c #1E1E00",\r
+"7     c #1F0000",\r
+"8     c #FF0000",\r
+"9     c #FFFF80",\r
+"0     c #1E0000",\r
+"a     c #FF8686",\r
+"b     c #00000F",\r
+"c     c #000082",\r
+"d     c #FFFF7F",\r
+"e     c #FF7F7F",\r
+"f     c #000007",\r
+"g     c #000044",\r
+"h     c #00003E",\r
+"i     c #00001F",\r
+"j     c #DE0000",\r
+"k     c #E00000",\r
+"l     c #C30000",\r
+"m     c #DEDE00",\r
+"n     c #DD0000",\r
+"o     c #DDDD00",\r
+"p     c #EAEA00",\r
+"q     c #780000",\r
+"r     c #680000",\r
+"                        ",\r
+"                        ",\r
+"                        ",\r
+"                        ",\r
+"      .+@@@@@@@#$       ",\r
+"      %&*======-$       ",\r
+"      ;>,')))))!$       ",\r
+"      ;~,')){]^/        ",\r
+"      ;~,'))=(%;$$$$$$$$",\r
+"      ;~,'))=_:<<<<<<<<[",\r
+"}|1112;~,'))=_345<<<<<<6",\r
+"788888;>,'))=_3,9<<<<<<6",\r
+"0a,888b&*===c_3,d<<<<<<6",\r
+"0e,888fg__h@@i3,d<<<<<<6",\r
+"0e,888jkkl$  $m,d<<<<<<6",\r
+"0e,888888n$  $o,9<<<<<<6",\r
+"0e,888888n$  $o45<<<<<<6",\r
+"0a,888888n$  $p<<<<<<<<[",\r
+"788888888k$   $$$$$$$$$$",\r
+"}|qqqqqqqr$             ",\r
+"                        ",\r
+"                        ",\r
+"                        ",\r
+"                        "};\r
index 53a076d3c4ce3a11cf604eea4582821a5684a288..fc43f2c17b2ce75238a0935f1e9bd0e72aef2fcc 100644 (file)
 
 #define wxUSE_STC 0
 
+#define wxUSE_WEBVIEW 0
+
+#define wxUSE_WEBVIEW_WEBKIT 0
+
+#define wxUSE_WEBVIEW_IE     0
+
 
 
 #ifdef _MSC_VER
diff --git a/src/common/webview.cpp b/src/common/webview.cpp
new file mode 100644 (file)
index 0000000..63f5f2b
--- /dev/null
@@ -0,0 +1,115 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webview.cpp
+// Purpose:     Common interface and events for web view component
+// Author:      Marianne Gagnon
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if wxUSE_WEBVIEW
+
+#if defined(__BORLANDC__)
+    #pragma hdrstop
+#endif
+
+#include "wx/webview.h"
+
+#include "wx/osx/webview_webkit.h"
+#include "wx/gtk/webview_webkit.h"
+#include "wx/msw/webview_ie.h"
+
+// DLL options compatibility check:
+#include "wx/app.h"
+WX_CHECK_BUILD_OPTIONS("wxWEBVIEW")
+
+extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[] = "wxWebView";
+extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewDefaultURLStr[] = "about:blank";
+
+wxIMPLEMENT_ABSTRACT_CLASS(wxWebView, wxControl);
+wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewEvent, wxCommandEvent);
+
+wxDEFINE_EVENT( wxEVT_COMMAND_WEB_VIEW_NAVIGATING, wxWebViewEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_WEB_VIEW_NAVIGATED, wxWebViewEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_WEB_VIEW_LOADED, wxWebViewEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_WEB_VIEW_ERROR, wxWebViewEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, wxWebViewEvent );
+wxDEFINE_EVENT( wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, wxWebViewEvent );
+
+// static
+wxWebView* wxWebView::New(wxWebViewBackend backend)
+{
+    switch (backend)
+    {
+        #if defined(wxUSE_WEBVIEW_WEBKIT) && \
+           (defined(__WXGTK__) || defined(__WXOSX__))
+        case wxWEB_VIEW_BACKEND_WEBKIT:
+            return new wxWebViewWebKit();
+        #endif
+
+        #if wxUSE_WEBVIEW_IE
+        case wxWEB_VIEW_BACKEND_IE:
+            return new wxWebViewIE();
+        #endif
+
+        case wxWEB_VIEW_BACKEND_DEFAULT:
+
+            #if defined(wxUSE_WEBVIEW_WEBKIT) && \
+               (defined(__WXGTK__) || defined(__WXOSX__))
+            return new wxWebViewWebKit();
+            #endif
+
+            #if wxUSE_WEBVIEW_IE
+            return new wxWebViewIE();
+            #endif
+
+        // fall-through intended
+        default:
+            return NULL;
+    }
+}
+
+// static
+wxWebView* wxWebView::New(wxWindow* parent,
+       wxWindowID id,
+       const wxString& url,
+       const wxPoint& pos,
+       const wxSize& size,
+       wxWebViewBackend backend,
+       long style,
+       const wxString& name)
+{
+    switch (backend)
+    {
+        #if defined(wxUSE_WEBVIEW_WEBKIT) && \
+           (defined(__WXGTK__) || defined(__WXOSX__))
+        case wxWEB_VIEW_BACKEND_WEBKIT:
+            return new wxWebViewWebKit(parent, id, url, pos, size, style, name);
+        #endif
+
+        #if wxUSE_WEBVIEW_IE
+        case wxWEB_VIEW_BACKEND_IE:
+            return new wxWebViewIE(parent, id, url, pos, size, style, name);
+        #endif
+
+        case wxWEB_VIEW_BACKEND_DEFAULT:
+
+            #if defined(wxUSE_WEBVIEW_WEBKIT) && \
+               (defined(__WXGTK__) || defined(__WXOSX__))
+            return new wxWebViewWebKit(parent, id, url, pos, size, style, name);
+            #endif
+
+            #if wxUSE_WEBVIEW_IE
+            return new wxWebViewIE(parent, id, url, pos, size, style, name);
+            #endif
+
+        // fall-through intended
+        default:
+            return NULL;
+    }
+}
+
+#endif // wxUSE_WEBVIEW
diff --git a/src/common/webviewarchivehandler.cpp b/src/common/webviewarchivehandler.cpp
new file mode 100644 (file)
index 0000000..10f15df
--- /dev/null
@@ -0,0 +1,113 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        webviewfilehandler.cpp
+// Purpose:     Custom webview handler to allow archive browsing
+// Author:      Steven Lamerton
+// Id:          $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if wxUSE_WEBVIEW
+
+#if defined(__BORLANDC__)
+    #pragma hdrstop
+#endif
+
+#include "wx/webviewarchivehandler.h"
+#include "wx/filesys.h"
+
+//Taken from wx/filesys.cpp
+static wxString EscapeFileNameCharsInURL(const char *in)
+{
+    wxString s;
+
+    for ( const unsigned char *p = (const unsigned char*)in; *p; ++p )
+    {
+        const unsigned char c = *p;
+
+        if ( c == '/' || c == '-' || c == '.' || c == '_' || c == '~' ||
+             (c >= '0' && c <= '9') ||
+             (c >= 'a' && c <= 'z') ||
+             (c >= 'A' && c <= 'Z') )
+        {
+            s << c;
+        }
+        else
+        {
+            s << wxString::Format("%%%02x", c);
+        }
+    }
+
+    return s;
+}
+
+wxWebViewArchiveHandler::wxWebViewArchiveHandler(const wxString& scheme) :
+                         wxWebViewHandler(scheme)
+{
+    m_fileSystem = new wxFileSystem();
+}
+
+wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri)
+{
+    //If there is a fragment at the end of the path then we need to strip it
+    //off as not all backends do this for us
+    wxString path = uri;
+    size_t hashloc = uri.find('#');
+    if(hashloc != wxString::npos)
+    {
+        path = uri.substr(0, hashloc);
+    }
+
+    //We iterate through the string to see if there is a protocol description
+    size_t start = wxString::npos;
+    for(size_t i = 0; i < path.length(); i++)
+    {
+        if(path[i] == ';' && path.substr(i, 10) == ";protocol=")
+        {
+            start = i;
+            break;
+        }
+    }
+
+    //We do not have a protocol string so we just pass the path withouth the 
+    if(start == wxString::npos)
+    {
+        size_t doubleslash = path.find("//");
+        //The path is incorrectly formed without // after the scheme
+        if(doubleslash == wxString::npos)
+            return NULL;
+
+        wxString fspath = "file:" + 
+                          EscapeFileNameCharsInURL(path.substr(doubleslash + 2));
+        return m_fileSystem->OpenFile(fspath);
+    }
+    //Otherwise we need to extract the protocol
+    else
+    {
+        size_t end = path.find('/', start);
+        //For the path to be valid there must to a path after the protocol
+        if(end == wxString::npos)
+        {
+            return NULL;
+        }
+        wxString mainpath = path.substr(0, start);
+        wxString archivepath = path.substr(end);
+        wxString protstring = path.substr(start, end - start);
+        wxString protocol = protstring.substr(10);
+        //We can now construct the correct path
+        size_t doubleslash = path.find("//");
+        //The path is incorrectly formed without // after the first protocol
+        if(doubleslash == wxString::npos)
+            return NULL;
+
+        wxString fspath = "file:" + 
+                          EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2))
+                          + "#" + protocol +":" + archivepath;
+        return m_fileSystem->OpenFile(fspath);
+    }
+}
+
+#endif // wxUSE_WEBVIEW
diff --git a/src/gtk/webview_webkit.cpp b/src/gtk/webview_webkit.cpp
new file mode 100644 (file)
index 0000000..03cb786
--- /dev/null
@@ -0,0 +1,933 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/gtk/webview_webkit.cpp
+// Purpose:     GTK WebKit backend for web view component
+// Author:      Marianne Gagnon, Robert Roebling
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, 1998 Robert Roebling
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if wxUSE_WEBVIEW_WEBKIT
+
+#include "wx/stockitem.h"
+#include "wx/gtk/webview_webkit.h"
+#include "wx/gtk/control.h"
+#include "wx/gtk/private.h"
+#include "wx/filesys.h"
+#include "wx/base64.h"
+#include "webkit/webkit.h"
+
+// ----------------------------------------------------------------------------
+// GTK callbacks
+// ----------------------------------------------------------------------------
+
+extern "C"
+{
+
+static void
+wxgtk_webview_webkit_load_status(GtkWidget* widget, 
+                                 GParamSpec*,
+                                 wxWebViewWebKit *webKitCtrl)
+{
+    if (!webKitCtrl->m_ready) return;
+
+    wxString url = webKitCtrl->GetCurrentURL();
+
+    WebKitLoadStatus status;
+    g_object_get(G_OBJECT(widget), "load-status", &status, NULL);
+
+    wxString target; // TODO: get target (if possible)
+
+    if (status == WEBKIT_LOAD_FINISHED)
+    {
+        WebKitWebBackForwardList* hist = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(widget));
+        WebKitWebHistoryItem* item = webkit_web_back_forward_list_get_current_item(hist);
+        //We have to check if we are actually storing history
+        //If the item isn't added we add it ourselves, it isn't added otherwise
+        //with a custom scheme.
+        if(WEBKIT_IS_WEB_HISTORY_ITEM(item) && webkit_web_history_item_get_uri(item) != url)
+        {
+            WebKitWebHistoryItem* newitem = webkit_web_history_item_new_with_data(url, webKitCtrl->GetCurrentTitle());
+            webkit_web_back_forward_list_add_item(hist, newitem);
+        }
+
+        webKitCtrl->m_busy = false;
+        wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_LOADED,
+                             webKitCtrl->GetId(),
+                             url, target);
+
+        if (webKitCtrl && webKitCtrl->GetEventHandler())
+            webKitCtrl->GetEventHandler()->ProcessEvent(event);
+    }
+    else if (status ==  WEBKIT_LOAD_COMMITTED)
+    {
+        webKitCtrl->m_busy = true;
+        wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATED,
+                             webKitCtrl->GetId(),
+                             url, target);
+
+        if (webKitCtrl && webKitCtrl->GetEventHandler())
+            webKitCtrl->GetEventHandler()->ProcessEvent(event);
+    }
+}
+
+static gboolean
+wxgtk_webview_webkit_navigation(WebKitWebView *,
+                                WebKitWebFrame *frame,
+                                WebKitNetworkRequest *request,
+                                WebKitWebNavigationAction *,
+                                WebKitWebPolicyDecision *policy_decision,
+                                wxWebViewWebKit *webKitCtrl)
+{
+    if(webKitCtrl->m_guard)
+    {
+        webKitCtrl->m_guard = false;
+        //We set this to make sure that we don't try to load the page again from 
+        //the resource request callback
+        webKitCtrl->m_vfsurl = webkit_network_request_get_uri(request);
+        webkit_web_policy_decision_use(policy_decision);
+        return FALSE;
+    }
+
+    webKitCtrl->m_busy = true;
+
+    const gchar* uri = webkit_network_request_get_uri(request);
+
+    wxString target = webkit_web_frame_get_name (frame);
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATING,
+                         webKitCtrl->GetId(),
+                         wxString( uri, wxConvUTF8 ),
+                         target);
+
+    if (webKitCtrl && webKitCtrl->GetEventHandler())
+        webKitCtrl->GetEventHandler()->ProcessEvent(event);
+
+    if (!event.IsAllowed())
+    {
+        webKitCtrl->m_busy = false;
+        webkit_web_policy_decision_ignore(policy_decision);
+        return TRUE;
+    }
+    else
+    {
+        wxString wxuri = uri;
+        wxSharedPtr<wxWebViewHandler> handler;
+        wxVector<wxSharedPtr<wxWebViewHandler> > hanlders = webKitCtrl->GetHandlers();
+        //We are not vetoed so see if we match one of the additional handlers
+        for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = hanlders.begin();
+            it != hanlders.end(); ++it)
+        {
+            if(wxuri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
+            {
+                handler = (*it);
+            }
+        }
+        //If we found a handler we can then use it to load the file directly 
+        //ourselves
+        if(handler)
+        {
+            webKitCtrl->m_guard = true;
+            wxFSFile* file = handler->GetFile(wxuri);
+            if(file)
+            {
+                webKitCtrl->SetPage(*file->GetStream(), wxuri);
+            }
+            //We need to throw some sort of error here if file is NULL
+            webkit_web_policy_decision_ignore(policy_decision);
+            return TRUE;
+        }
+        return FALSE;
+    }
+}
+
+static gboolean
+wxgtk_webview_webkit_error(WebKitWebView*,
+                           WebKitWebFrame*,
+                           gchar *uri,
+                           gpointer web_error,
+                           wxWebViewWebKit* webKitWindow)
+{
+    webKitWindow->m_busy = false;
+    wxWebViewNavigationError type = wxWEB_NAV_ERR_OTHER;
+
+    GError* error = (GError*)web_error;
+    wxString description(error->message, wxConvUTF8);
+
+    if (strcmp(g_quark_to_string(error->domain), "soup_http_error_quark") == 0)
+    {
+        switch (error->code)
+        {
+            case SOUP_STATUS_CANCELLED:
+                type = wxWEB_NAV_ERR_USER_CANCELLED;
+                break;
+
+            case SOUP_STATUS_CANT_RESOLVE:
+            case SOUP_STATUS_NOT_FOUND:
+                type = wxWEB_NAV_ERR_NOT_FOUND;
+                break;
+
+            case SOUP_STATUS_CANT_RESOLVE_PROXY:
+            case SOUP_STATUS_CANT_CONNECT:
+            case SOUP_STATUS_CANT_CONNECT_PROXY:
+            case SOUP_STATUS_SSL_FAILED:
+            case SOUP_STATUS_IO_ERROR:
+                type = wxWEB_NAV_ERR_CONNECTION;
+                break;
+
+            case SOUP_STATUS_MALFORMED:
+            //case SOUP_STATUS_TOO_MANY_REDIRECTS:
+                type = wxWEB_NAV_ERR_REQUEST;
+                break;
+
+            //case SOUP_STATUS_NO_CONTENT:
+            //case SOUP_STATUS_RESET_CONTENT:
+
+            case SOUP_STATUS_BAD_REQUEST:
+                type = wxWEB_NAV_ERR_REQUEST;
+                break;
+
+            case SOUP_STATUS_UNAUTHORIZED:
+            case SOUP_STATUS_FORBIDDEN:
+                type = wxWEB_NAV_ERR_AUTH;
+                break;
+
+            case SOUP_STATUS_METHOD_NOT_ALLOWED:
+            case SOUP_STATUS_NOT_ACCEPTABLE:
+                type = wxWEB_NAV_ERR_SECURITY;
+                break;
+
+            case SOUP_STATUS_PROXY_AUTHENTICATION_REQUIRED:
+                type = wxWEB_NAV_ERR_AUTH;
+                break;
+
+            case SOUP_STATUS_REQUEST_TIMEOUT:
+                type = wxWEB_NAV_ERR_CONNECTION;
+                break;
+
+            //case SOUP_STATUS_PAYMENT_REQUIRED:
+            case SOUP_STATUS_REQUEST_ENTITY_TOO_LARGE:
+            case SOUP_STATUS_REQUEST_URI_TOO_LONG:
+            case SOUP_STATUS_UNSUPPORTED_MEDIA_TYPE:
+                type = wxWEB_NAV_ERR_REQUEST;
+                break;
+
+            case SOUP_STATUS_BAD_GATEWAY:
+            case SOUP_STATUS_SERVICE_UNAVAILABLE:
+            case SOUP_STATUS_GATEWAY_TIMEOUT:
+                type = wxWEB_NAV_ERR_CONNECTION;
+                break;
+
+            case SOUP_STATUS_HTTP_VERSION_NOT_SUPPORTED:
+                type = wxWEB_NAV_ERR_REQUEST;
+                break;
+            //case SOUP_STATUS_INSUFFICIENT_STORAGE:
+            //case SOUP_STATUS_NOT_EXTENDED:
+        }
+    }
+    else if (strcmp(g_quark_to_string(error->domain),
+                    "webkit-network-error-quark") == 0)
+    {
+        switch (error->code)
+        {
+            //WEBKIT_NETWORK_ERROR_FAILED:
+            //WEBKIT_NETWORK_ERROR_TRANSPORT:
+
+            case WEBKIT_NETWORK_ERROR_UNKNOWN_PROTOCOL:
+                type = wxWEB_NAV_ERR_REQUEST;
+                break;
+
+            case WEBKIT_NETWORK_ERROR_CANCELLED:
+                type = wxWEB_NAV_ERR_USER_CANCELLED;
+                break;
+
+            case WEBKIT_NETWORK_ERROR_FILE_DOES_NOT_EXIST:
+                type = wxWEB_NAV_ERR_NOT_FOUND;
+                break;
+        }
+    }
+    else if (strcmp(g_quark_to_string(error->domain),
+                    "webkit-policy-error-quark") == 0)
+    {
+        switch (error->code)
+        {
+            //case WEBKIT_POLICY_ERROR_FAILED:
+            //case WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE:
+            //case WEBKIT_POLICY_ERROR_CANNOT_SHOW_URL:
+            //case WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE:
+            case WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT:
+                type = wxWEB_NAV_ERR_SECURITY;
+                break;
+        }
+    }
+    /*
+    webkit_plugin_error_quark
+    else
+    {
+        printf("Error domain %s\n", g_quark_to_string(error->domain));
+    }
+    */
+
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_ERROR,
+                         webKitWindow->GetId(),
+                         uri, "");
+    event.SetString(description);
+    event.SetInt(type);
+
+    if (webKitWindow && webKitWindow->GetEventHandler())
+    {
+        webKitWindow->GetEventHandler()->ProcessEvent(event);
+    }
+
+    return FALSE;
+}
+
+static gboolean
+wxgtk_webview_webkit_new_window(WebKitWebView*,
+                                WebKitWebFrame *frame,
+                                WebKitNetworkRequest *request,
+                                WebKitWebNavigationAction*,
+                                WebKitWebPolicyDecision *policy_decision,
+                                wxWebViewWebKit *webKitCtrl)
+{
+    const gchar* uri = webkit_network_request_get_uri(request);
+
+    wxString target = webkit_web_frame_get_name (frame);
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
+                                       webKitCtrl->GetId(),
+                                       wxString( uri, wxConvUTF8 ),
+                                       target);
+
+    if (webKitCtrl && webKitCtrl->GetEventHandler())
+        webKitCtrl->GetEventHandler()->ProcessEvent(event);
+
+    //We always want the user to handle this themselves
+    webkit_web_policy_decision_ignore(policy_decision);
+    return TRUE;
+}
+
+static void
+wxgtk_webview_webkit_title_changed(WebKitWebView*,
+                                   WebKitWebFrame*,
+                                   gchar *title,
+                                   wxWebViewWebKit *webKitCtrl)
+{
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
+                         webKitCtrl->GetId(),
+                         webKitCtrl->GetCurrentURL(),
+                         "");
+    event.SetString(wxString(title, wxConvUTF8));
+
+    if (webKitCtrl && webKitCtrl->GetEventHandler())
+        webKitCtrl->GetEventHandler()->ProcessEvent(event);
+
+}
+
+static void
+wxgtk_webview_webkit_resource_req(WebKitWebView *,
+                                  WebKitWebFrame *,
+                                  WebKitWebResource *,
+                                  WebKitNetworkRequest *request,
+                                  WebKitNetworkResponse *,
+                                  wxWebViewWebKit *webKitCtrl)
+{
+    wxString uri = webkit_network_request_get_uri(request);
+    
+    wxSharedPtr<wxWebViewHandler> handler;
+    wxVector<wxSharedPtr<wxWebViewHandler> > hanlders = webKitCtrl->GetHandlers();
+    
+    //We are not vetoed so see if we match one of the additional handlers
+    for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = hanlders.begin();
+        it != hanlders.end(); ++it)
+    {
+        if(uri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
+        {
+            handler = (*it);
+        }
+    }
+    //If we found a handler we can then use it to load the file directly 
+    //ourselves
+    if(handler)
+    {
+        //If it is requsting the page itself then return as we have already
+        //loaded it from the archive
+        if(webKitCtrl->m_vfsurl == uri)
+            return;
+
+        wxFSFile* file = handler->GetFile(uri);
+        if(file)
+        {
+            //We load the data into a data url to save it being written out again
+            size_t size = file->GetStream()->GetLength();
+            char *buffer = new char[size];
+            file->GetStream()->Read(buffer, size);
+            wxString data = wxBase64Encode(buffer, size);
+            delete[] buffer;
+            wxString mime = file->GetMimeType();
+            wxString path = "data:" + mime + ";base64," + data;
+            //Then we can redirect the call
+            webkit_network_request_set_uri(request, path);
+        }
+        
+    }
+}
+
+} // extern "C"
+
+//-----------------------------------------------------------------------------
+// wxWebViewWebKit
+//-----------------------------------------------------------------------------
+
+wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView);
+
+bool wxWebViewWebKit::Create(wxWindow *parent,
+                      wxWindowID id,
+                      const wxString &url,
+                      const wxPoint& pos,
+                      const wxSize& size,
+                      long style,
+                      const wxString& name)
+{
+    m_ready = false;
+    m_busy = false;
+    m_guard = false;
+
+    if (!PreCreation( parent, pos, size ) ||
+        !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
+    {
+        wxFAIL_MSG( wxT("wxWebViewWebKit creation failed") );
+        return false;
+    }
+
+    GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+    web_view = webkit_web_view_new ();
+    g_object_ref(web_view); // TODO: check memory management
+
+    m_widget = scrolled_window;
+    g_object_ref(m_widget); // TODO: check memory management
+
+    /* Place the WebKitWebView in the GtkScrolledWindow */
+    gtk_container_add (GTK_CONTAINER (scrolled_window), web_view);
+    gtk_widget_show(m_widget);
+    gtk_widget_show(web_view);
+
+    g_signal_connect_after(web_view, "notify::load-status",
+                           G_CALLBACK(wxgtk_webview_webkit_load_status),
+                           this);
+    g_signal_connect_after(web_view, "navigation-policy-decision-requested",
+                           G_CALLBACK(wxgtk_webview_webkit_navigation),
+                           this);
+    g_signal_connect_after(web_view, "load-error", 
+                           G_CALLBACK(wxgtk_webview_webkit_error),
+                           this);
+
+    g_signal_connect_after(web_view, "new-window-policy-decision-requested",
+                           G_CALLBACK(wxgtk_webview_webkit_new_window), this);
+
+    g_signal_connect_after(web_view, "title-changed",
+                           G_CALLBACK(wxgtk_webview_webkit_title_changed), this);
+
+    g_signal_connect_after(web_view, "resource-request-starting",
+                           G_CALLBACK(wxgtk_webview_webkit_resource_req), this);
+
+    m_parent->DoAddChild( this );
+
+    PostCreation(size);
+
+    /* Open a webpage */
+    webkit_web_view_load_uri (WEBKIT_WEB_VIEW (web_view), url);
+
+    //Get the initial history limit so we can enable and disable it later
+    WebKitWebBackForwardList* history;
+    history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
+    m_historyLimit = webkit_web_back_forward_list_get_limit(history);
+
+    m_ready = true;
+
+    return true;
+}
+
+bool wxWebViewWebKit::Enable( bool enable )
+{
+    if (!wxControl::Enable(enable))
+        return false;
+
+    gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
+
+    //if (enable)
+    //    GTKFixSensitivity();
+
+    return true;
+}
+
+GdkWindow*
+wxWebViewWebKit::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
+{
+    GdkWindow* window = gtk_widget_get_parent_window(m_widget);
+    return window;
+}
+
+void wxWebViewWebKit::ZoomIn()
+{
+    webkit_web_view_zoom_in (WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::ZoomOut()
+{
+    webkit_web_view_zoom_out (WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::SetWebkitZoom(float level)
+{
+    webkit_web_view_set_zoom_level (WEBKIT_WEB_VIEW(web_view), level);
+}
+
+float wxWebViewWebKit::GetWebkitZoom() const
+{
+    return webkit_web_view_get_zoom_level (WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Stop()
+{
+     webkit_web_view_stop_loading (WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Reload(wxWebViewReloadFlags flags)
+{
+    if (flags & wxWEB_VIEW_RELOAD_NO_CACHE)
+    {
+        webkit_web_view_reload_bypass_cache (WEBKIT_WEB_VIEW(web_view));
+    }
+    else
+    {
+        webkit_web_view_reload (WEBKIT_WEB_VIEW(web_view));
+    }
+}
+
+void wxWebViewWebKit::LoadURL(const wxString& url)
+{
+    webkit_web_view_load_uri(WEBKIT_WEB_VIEW(web_view), wxGTK_CONV(url));
+}
+
+
+void wxWebViewWebKit::GoBack()
+{
+    webkit_web_view_go_back (WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::GoForward()
+{
+    webkit_web_view_go_forward (WEBKIT_WEB_VIEW(web_view));
+}
+
+
+bool wxWebViewWebKit::CanGoBack() const
+{
+    return webkit_web_view_can_go_back (WEBKIT_WEB_VIEW(web_view));
+}
+
+
+bool wxWebViewWebKit::CanGoForward() const
+{
+    return webkit_web_view_can_go_forward (WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::ClearHistory()
+{
+    WebKitWebBackForwardList* history;
+    history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
+    webkit_web_back_forward_list_clear(history);
+}
+
+void wxWebViewWebKit::EnableHistory(bool enable)
+{
+    WebKitWebBackForwardList* history;
+    history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
+    if(enable)
+    {
+        webkit_web_back_forward_list_set_limit(history, m_historyLimit);
+    }
+    else
+    {
+        webkit_web_back_forward_list_set_limit(history, 0);
+    }
+}
+
+wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
+{
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist; 
+    WebKitWebBackForwardList* history;
+    history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
+    GList* list = webkit_web_back_forward_list_get_back_list_with_limit(history, 
+                                                                        m_historyLimit);
+    //We need to iterate in reverse to get the order we desire
+    for(int i = g_list_length(list) - 1; i >= 0 ; i--)
+    {
+        WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i);
+        wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(
+                                   webkit_web_history_item_get_uri(gtkitem),
+                                   webkit_web_history_item_get_title(gtkitem));
+        wxitem->m_histItem = gtkitem;
+        wxSharedPtr<wxWebViewHistoryItem> item(wxitem);
+        backhist.push_back(item);
+    }
+    return backhist;
+}
+
+wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetForwardHistory()
+{
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist; 
+    WebKitWebBackForwardList* history;
+    history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
+    GList* list = webkit_web_back_forward_list_get_forward_list_with_limit(history, 
+                                                                           m_historyLimit);
+    for(guint i = 0; i < g_list_length(list); i++)
+    {
+        WebKitWebHistoryItem* gtkitem = (WebKitWebHistoryItem*)g_list_nth_data(list, i);
+        wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(
+                                   webkit_web_history_item_get_uri(gtkitem),
+                                   webkit_web_history_item_get_title(gtkitem));
+        wxitem->m_histItem = gtkitem;
+        wxSharedPtr<wxWebViewHistoryItem> item(wxitem);
+        forwardhist.push_back(item);
+    }
+    return forwardhist;
+}
+
+void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
+{
+    WebKitWebHistoryItem* gtkitem = item->m_histItem;
+    if(gtkitem)
+    {
+        WebKitWebBackForwardList* history;
+        history = webkit_web_view_get_back_forward_list(WEBKIT_WEB_VIEW(web_view));
+        webkit_web_view_go_to_back_forward_item(WEBKIT_WEB_VIEW(web_view), 
+                                                WEBKIT_WEB_HISTORY_ITEM(gtkitem));
+    }
+}
+
+bool wxWebViewWebKit::CanCut() const
+{
+    return webkit_web_view_can_cut_clipboard(WEBKIT_WEB_VIEW(web_view));
+}
+
+bool wxWebViewWebKit::CanCopy() const
+{
+    return webkit_web_view_can_copy_clipboard(WEBKIT_WEB_VIEW(web_view));
+}
+
+bool wxWebViewWebKit::CanPaste() const
+{
+    return webkit_web_view_can_paste_clipboard(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Cut()
+{
+    webkit_web_view_cut_clipboard(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Copy()
+{
+    webkit_web_view_copy_clipboard(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Paste()
+{
+    webkit_web_view_paste_clipboard(WEBKIT_WEB_VIEW(web_view));
+}
+
+bool wxWebViewWebKit::CanUndo() const
+{
+    return webkit_web_view_can_undo(WEBKIT_WEB_VIEW(web_view));
+}
+
+bool wxWebViewWebKit::CanRedo() const
+{
+    return webkit_web_view_can_redo(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Undo()
+{
+    webkit_web_view_undo(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::Redo()
+{
+    webkit_web_view_redo(WEBKIT_WEB_VIEW(web_view));
+}
+
+wxString wxWebViewWebKit::GetCurrentURL() const
+{
+    // FIXME: check which encoding the web kit control uses instead of
+    // assuming UTF8 (here and elsewhere too)
+    return wxString::FromUTF8(webkit_web_view_get_uri(
+                                WEBKIT_WEB_VIEW(web_view)));
+}
+
+
+wxString wxWebViewWebKit::GetCurrentTitle() const
+{
+    return wxString::FromUTF8(webkit_web_view_get_title(
+                                WEBKIT_WEB_VIEW(web_view)));
+}
+
+
+wxString wxWebViewWebKit::GetPageSource() const
+{
+    WebKitWebFrame* frame = webkit_web_view_get_main_frame(
+        WEBKIT_WEB_VIEW(web_view));
+    WebKitWebDataSource* src = webkit_web_frame_get_data_source (frame);
+
+    // TODO: check encoding with
+    // const gchar*
+    // webkit_web_data_source_get_encoding(WebKitWebDataSource *data_source);
+    return wxString(webkit_web_data_source_get_data (src)->str, wxConvUTF8);
+}
+
+
+wxWebViewZoom wxWebViewWebKit::GetZoom() const
+{
+    float zoom = GetWebkitZoom();
+
+    // arbitrary way to map float zoom to our common zoom enum
+    if (zoom <= 0.65)
+    {
+        return wxWEB_VIEW_ZOOM_TINY;
+    }
+    else if (zoom > 0.65 && zoom <= 0.90)
+    {
+        return wxWEB_VIEW_ZOOM_SMALL;
+    }
+    else if (zoom > 0.90 && zoom <= 1.15)
+    {
+        return wxWEB_VIEW_ZOOM_MEDIUM;
+    }
+    else if (zoom > 1.15 && zoom <= 1.45)
+    {
+        return wxWEB_VIEW_ZOOM_LARGE;
+    }
+    else if (zoom > 1.45)
+    {
+        return wxWEB_VIEW_ZOOM_LARGEST;
+    }
+
+    // to shut up compilers, this can never be reached logically
+    wxASSERT(false);
+    return wxWEB_VIEW_ZOOM_MEDIUM;
+}
+
+
+void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom)
+{
+    // arbitrary way to map our common zoom enum to float zoom
+    switch (zoom)
+    {
+        case wxWEB_VIEW_ZOOM_TINY:
+            SetWebkitZoom(0.6f);
+            break;
+
+        case wxWEB_VIEW_ZOOM_SMALL:
+            SetWebkitZoom(0.8f);
+            break;
+
+        case wxWEB_VIEW_ZOOM_MEDIUM:
+            SetWebkitZoom(1.0f);
+            break;
+
+        case wxWEB_VIEW_ZOOM_LARGE:
+            SetWebkitZoom(1.3);
+            break;
+
+        case wxWEB_VIEW_ZOOM_LARGEST:
+            SetWebkitZoom(1.6);
+            break;
+
+        default:
+            wxASSERT(false);
+    }
+}
+
+void wxWebViewWebKit::SetZoomType(wxWebViewZoomType type)
+{
+    webkit_web_view_set_full_content_zoom(WEBKIT_WEB_VIEW(web_view),
+                                          (type == wxWEB_VIEW_ZOOM_TYPE_LAYOUT ?
+                                          TRUE : FALSE));
+}
+
+wxWebViewZoomType wxWebViewWebKit::GetZoomType() const
+{
+    gboolean fczoom = webkit_web_view_get_full_content_zoom(
+            WEBKIT_WEB_VIEW(web_view));
+
+    if (fczoom) return wxWEB_VIEW_ZOOM_TYPE_LAYOUT;
+    else        return wxWEB_VIEW_ZOOM_TYPE_TEXT;
+}
+
+bool wxWebViewWebKit::CanSetZoomType(wxWebViewZoomType) const
+{
+    // this port supports all zoom types
+    return true;
+}
+
+void wxWebViewWebKit::SetPage(const wxString& html, const wxString& baseUri)
+{
+    webkit_web_view_load_string (WEBKIT_WEB_VIEW(web_view),
+                                 html.mb_str(wxConvUTF8),
+                                 "text/html",
+                                 "UTF-8",
+                                 baseUri.mb_str(wxConvUTF8));
+}
+
+void wxWebViewWebKit::Print()
+{
+    WebKitWebFrame* frame = webkit_web_view_get_main_frame(
+            WEBKIT_WEB_VIEW(web_view));
+    webkit_web_frame_print (frame);
+
+    // GtkPrintOperationResult  webkit_web_frame_print_full
+    //      (WebKitWebFrame *frame,
+    //       GtkPrintOperation *operation,
+    //       GtkPrintOperationAction action,
+    //       GError **error);
+
+}
+
+
+bool wxWebViewWebKit::IsBusy() const
+{
+    return m_busy;
+
+    // This code looks nice but returns true after a page was cancelled
+    /*
+    WebKitLoadStatus status = webkit_web_view_get_load_status
+            (WEBKIT_WEB_VIEW(web_view));
+
+
+#if WEBKIT_CHECK_VERSION(1,1,16)
+    // WEBKIT_LOAD_FAILED is new in webkit 1.1.16
+    if (status == WEBKIT_LOAD_FAILED)
+    {
+        return false;
+    }
+#endif
+    if (status == WEBKIT_LOAD_FINISHED)
+    {
+        return false;
+    }
+
+    return true;
+     */
+}
+
+void wxWebViewWebKit::SetEditable(bool enable)
+{
+    webkit_web_view_set_editable(WEBKIT_WEB_VIEW(web_view), enable);
+}
+
+bool wxWebViewWebKit::IsEditable() const
+{
+    return webkit_web_view_get_editable(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::DeleteSelection()
+{
+    webkit_web_view_delete_selection(WEBKIT_WEB_VIEW(web_view));
+}
+
+bool wxWebViewWebKit::HasSelection() const
+{
+    return webkit_web_view_has_selection(WEBKIT_WEB_VIEW(web_view));
+}
+
+void wxWebViewWebKit::SelectAll()
+{
+    webkit_web_view_select_all(WEBKIT_WEB_VIEW(web_view));
+}
+
+wxString wxWebViewWebKit::GetSelectedText() const
+{
+    WebKitDOMDocument* doc; 
+    WebKitDOMDOMWindow* win;
+    WebKitDOMDOMSelection* sel;
+    WebKitDOMRange* range;
+
+    doc = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(web_view));
+    win = webkit_dom_document_get_default_view(WEBKIT_DOM_DOCUMENT(doc));
+    sel = webkit_dom_dom_window_get_selection(WEBKIT_DOM_DOM_WINDOW(win));
+    range = webkit_dom_dom_selection_get_range_at(WEBKIT_DOM_DOM_SELECTION(sel), 
+                                                  0, NULL);
+    return wxString(webkit_dom_range_get_text(WEBKIT_DOM_RANGE(range)), 
+                    wxConvUTF8);
+}
+
+wxString wxWebViewWebKit::GetSelectedSource() const
+{
+    WebKitDOMDocument* doc; 
+    WebKitDOMDOMWindow* win;
+    WebKitDOMDOMSelection* sel;
+    WebKitDOMRange* range;
+    WebKitDOMElement* div;
+    WebKitDOMDocumentFragment* clone;
+    WebKitDOMHTMLElement* html;
+
+    doc = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(web_view));
+    win = webkit_dom_document_get_default_view(WEBKIT_DOM_DOCUMENT(doc));
+    sel = webkit_dom_dom_window_get_selection(WEBKIT_DOM_DOM_WINDOW(win));
+    range = webkit_dom_dom_selection_get_range_at(WEBKIT_DOM_DOM_SELECTION(sel), 
+                                                  0, NULL);
+    div = webkit_dom_document_create_element(WEBKIT_DOM_DOCUMENT(doc), "div", NULL);
+
+    clone = webkit_dom_range_clone_contents(WEBKIT_DOM_RANGE(range), NULL);
+    webkit_dom_node_append_child(&div->parent_instance, &clone->parent_instance, NULL);
+    html = (WebKitDOMHTMLElement*)div;
+
+    return wxString(webkit_dom_html_element_get_inner_html(WEBKIT_DOM_HTML_ELEMENT(html)), 
+                    wxConvUTF8);
+}
+
+void wxWebViewWebKit::ClearSelection()
+{
+    WebKitDOMDocument* doc; 
+    WebKitDOMDOMWindow* win;
+    WebKitDOMDOMSelection* sel;
+
+    doc = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(web_view));
+    win = webkit_dom_document_get_default_view(WEBKIT_DOM_DOCUMENT(doc));
+    sel = webkit_dom_dom_window_get_selection(WEBKIT_DOM_DOM_WINDOW(win));
+    webkit_dom_dom_selection_remove_all_ranges(WEBKIT_DOM_DOM_SELECTION(sel));
+
+}
+
+wxString wxWebViewWebKit::GetPageText() const
+{
+    WebKitDOMDocument* doc; 
+    WebKitDOMHTMLElement* body;
+
+    doc = webkit_web_view_get_dom_document(WEBKIT_WEB_VIEW(web_view));
+    body = webkit_dom_document_get_body(WEBKIT_DOM_DOCUMENT(doc));
+    return wxString(webkit_dom_html_element_get_inner_text(WEBKIT_DOM_HTML_ELEMENT(body)), 
+                    wxConvUTF8);
+}
+
+void wxWebViewWebKit::RunScript(const wxString& javascript)
+{
+    webkit_web_view_execute_script(WEBKIT_WEB_VIEW(web_view), 
+                                   javascript.mb_str(wxConvUTF8));
+}
+
+void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
+{
+    m_handlerList.push_back(handler);
+}
+
+// static
+wxVisualAttributes
+wxWebViewWebKit::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+     return GetDefaultAttributesFromGTKWidget(webkit_web_view_new);
+}
+
+
+#endif // wxHAVE_WEB_BACKEND_GTK_WEBKIT
diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp
new file mode 100644 (file)
index 0000000..92edb4e
--- /dev/null
@@ -0,0 +1,1137 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/msw/webview_ie.cpp
+// Purpose:     wxMSW wxWebViewIE class implementation for web view component
+// Author:      Marianne Gagnon
+// Id:          $Id$
+// Copyright:   (c) 2010 Marianne Gagnon, 2011 Steven Lamerton
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#if defined(__BORLANDC__)
+    #pragma hdrstop
+#endif
+
+#include "wx/msw/webview_ie.h"
+
+#if wxUSE_WEBVIEW_IE
+
+#include <olectl.h>
+#include <oleidl.h>
+#include <exdispid.h>
+#include <exdisp.h>
+#include <mshtml.h>
+#include "wx/msw/registry.h"
+#include "wx/msw/missing.h"
+#include "wx/filesys.h"
+
+wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewIE, wxWebView);
+
+//We link to urlmon as it is required for CoInternetGetSession
+#pragma comment(lib, "urlmon")
+
+BEGIN_EVENT_TABLE(wxWebViewIE, wxControl)
+    EVT_ACTIVEX(wxID_ANY, wxWebViewIE::onActiveXEvent)
+    EVT_ERASE_BACKGROUND(wxWebViewIE::onEraseBg)
+END_EVENT_TABLE()
+
+bool wxWebViewIE::Create(wxWindow* parent,
+           wxWindowID id,
+           const wxString& url,
+           const wxPoint& pos,
+           const wxSize& size,
+           long style,
+           const wxString& name)
+{
+    if (!wxControl::Create(parent, id, pos, size, style,
+                           wxDefaultValidator, name))
+    {
+        return false;
+    }
+
+    m_webBrowser = NULL;
+    m_isBusy = false;
+    m_historyLoadingFromList = false;
+    m_historyEnabled = true;
+    m_historyPosition = -1;
+    m_zoomType = wxWEB_VIEW_ZOOM_TYPE_TEXT;
+
+    if (::CoCreateInstance(CLSID_WebBrowser, NULL,
+                           CLSCTX_INPROC_SERVER, // CLSCTX_INPROC,
+                           IID_IWebBrowser2 , (void**)&m_webBrowser) != 0)
+    {
+        wxLogError("Failed to initialize IE, CoCreateInstance returned an error");
+        return false;
+    }
+
+    m_ie.SetDispatchPtr(m_webBrowser); // wxAutomationObject will release itself
+
+    m_webBrowser->put_RegisterAsBrowser(VARIANT_TRUE);
+    m_webBrowser->put_RegisterAsDropTarget(VARIANT_TRUE);
+
+    m_container = new wxActiveXContainer(this, IID_IWebBrowser2, m_webBrowser);
+
+    SetBackgroundStyle(wxBG_STYLE_PAINT);
+    SetDoubleBuffered(true);
+    LoadURL(url);
+    return true;
+}
+
+
+void wxWebViewIE::LoadURL(const wxString& url)
+{
+    m_ie.CallMethod("Navigate", (BSTR) url.wc_str(), NULL, NULL, NULL, NULL);
+}
+
+void wxWebViewIE::SetPage(const wxString& html, const wxString& baseUrl)
+{
+    BSTR bstr = SysAllocString(html.wc_str());
+
+    // Creates a new one-dimensional array
+    SAFEARRAY *psaStrings = SafeArrayCreateVector(VT_VARIANT, 0, 1);
+    if (psaStrings != NULL)
+    {
+        VARIANT *param;
+
+        HRESULT hr = SafeArrayAccessData(psaStrings, (LPVOID*)&param);
+        param->vt = VT_BSTR;
+        param->bstrVal = bstr;
+        hr = SafeArrayUnaccessData(psaStrings);
+
+        IHTMLDocument2* document = GetDocument();
+        document->write(psaStrings);
+        document->Release();
+
+        // SafeArrayDestroy calls SysFreeString for each BSTR
+        SafeArrayDestroy(psaStrings);
+
+        //We send the events when we are done to mimic webkit
+        //Navigated event
+        wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATED,
+                             GetId(), baseUrl, "");
+        event.SetEventObject(this);
+        HandleWindowEvent(event);
+
+        //Document complete event
+        event.SetEventType(wxEVT_COMMAND_WEB_VIEW_LOADED);
+        event.SetEventObject(this);
+        HandleWindowEvent(event);
+    }
+    else
+    {
+        wxLogError("wxWebViewIE::SetPage() : psaStrings is NULL");
+    }
+
+}
+
+wxString wxWebViewIE::GetPageSource() const
+{
+    IHTMLDocument2* document = GetDocument();
+    IHTMLElement *bodyTag = NULL;
+    IHTMLElement *htmlTag = NULL;
+    wxString source;
+    HRESULT hr = document->get_body(&bodyTag);
+    if(SUCCEEDED(hr))
+    {
+        hr = bodyTag->get_parentElement(&htmlTag);
+        if(SUCCEEDED(hr))
+        {
+            BSTR bstr;
+            htmlTag->get_outerHTML(&bstr);
+            source = wxString(bstr);
+            htmlTag->Release();
+        }
+        bodyTag->Release();
+    }
+
+    document->Release();
+    return source;
+}
+
+wxWebViewZoom wxWebViewIE::GetZoom() const
+{
+    if(m_zoomType == wxWEB_VIEW_ZOOM_TYPE_LAYOUT)
+        return GetIEOpticalZoom();
+    else if(m_zoomType == wxWEB_VIEW_ZOOM_TYPE_TEXT)
+        return GetIETextZoom();
+    else
+        wxFAIL;
+
+    //Dummy return to stop compiler warnings
+    return wxWEB_VIEW_ZOOM_MEDIUM;
+
+}
+
+void wxWebViewIE::SetZoom(wxWebViewZoom zoom)
+{
+    if(m_zoomType == wxWEB_VIEW_ZOOM_TYPE_LAYOUT)
+        SetIEOpticalZoom(zoom);
+    else if(m_zoomType == wxWEB_VIEW_ZOOM_TYPE_TEXT)
+        SetIETextZoom(zoom);
+    else
+        wxFAIL;
+}
+
+void wxWebViewIE::SetIETextZoom(wxWebViewZoom level)
+{
+    //We do not use OLECMDID_OPTICAL_GETZOOMRANGE as the docs say the range
+    //is 0 to 4 so the check is unnecessary, these match exactly with the
+    //enum values
+    VARIANT zoomVariant;
+    VariantInit (&zoomVariant);
+    V_VT(&zoomVariant) = VT_I4;
+    V_I4(&zoomVariant) = level;
+
+    HRESULT result = m_webBrowser->ExecWB(OLECMDID_ZOOM,
+                                          OLECMDEXECOPT_DONTPROMPTUSER,
+                                          &zoomVariant, NULL);
+    wxASSERT(result == S_OK);
+}
+
+wxWebViewZoom wxWebViewIE::GetIETextZoom() const
+{
+    VARIANT zoomVariant;
+    VariantInit (&zoomVariant);
+    V_VT(&zoomVariant) = VT_I4;
+
+    HRESULT result = m_webBrowser->ExecWB(OLECMDID_ZOOM,
+                                          OLECMDEXECOPT_DONTPROMPTUSER,
+                                          NULL, &zoomVariant);
+    wxASSERT(result == S_OK);
+
+    //We can safely cast here as we know that the range matches our enum
+    return static_cast<wxWebViewZoom>(V_I4(&zoomVariant));
+}
+
+void wxWebViewIE::SetIEOpticalZoom(wxWebViewZoom level)
+{
+    //We do not use OLECMDID_OPTICAL_GETZOOMRANGE as the docs say the range
+    //is 10 to 1000 so the check is unnecessary
+    VARIANT zoomVariant;
+    VariantInit (&zoomVariant);
+    V_VT(&zoomVariant) = VT_I4;
+
+    //We make a somewhat arbitray map here, taken from values used by webkit
+    switch(level)
+    {
+        case wxWEB_VIEW_ZOOM_TINY:
+            V_I4(&zoomVariant) = 60;
+            break;
+        case wxWEB_VIEW_ZOOM_SMALL:
+            V_I4(&zoomVariant) = 80;
+            break;
+        case wxWEB_VIEW_ZOOM_MEDIUM:
+            V_I4(&zoomVariant) = 100;
+            break;
+        case wxWEB_VIEW_ZOOM_LARGE:
+            V_I4(&zoomVariant) = 130;
+            break;
+        case wxWEB_VIEW_ZOOM_LARGEST:
+            V_I4(&zoomVariant) = 160;
+            break;
+        default:
+            wxFAIL;
+    }
+
+    HRESULT result = m_webBrowser->ExecWB((OLECMDID)OLECMDID_OPTICAL_ZOOM,
+                                          OLECMDEXECOPT_DODEFAULT,
+                                          &zoomVariant,
+                                          NULL);
+    wxASSERT(result == S_OK);
+}
+
+wxWebViewZoom wxWebViewIE::GetIEOpticalZoom() const
+{
+    VARIANT zoomVariant;
+    VariantInit (&zoomVariant);
+    V_VT(&zoomVariant) = VT_I4;
+
+    HRESULT result = m_webBrowser->ExecWB((OLECMDID)OLECMDID_OPTICAL_ZOOM,
+                                          OLECMDEXECOPT_DODEFAULT, NULL,
+                                          &zoomVariant);
+    wxASSERT(result == S_OK);
+
+    const int zoom = V_I4(&zoomVariant);
+
+    //We make a somewhat arbitray map here, taken from values used by webkit
+    if (zoom <= 65)
+    {
+        return wxWEB_VIEW_ZOOM_TINY;
+    }
+    else if (zoom > 65 && zoom <= 90)
+    {
+        return wxWEB_VIEW_ZOOM_SMALL;
+    }
+    else if (zoom > 90 && zoom <= 115)
+    {
+        return wxWEB_VIEW_ZOOM_MEDIUM;
+    }
+    else if (zoom > 115 && zoom <= 145)
+    {
+        return wxWEB_VIEW_ZOOM_LARGE;
+    }
+    else /*if (zoom > 145) */ //Using else removes a compiler warning
+    {
+        return wxWEB_VIEW_ZOOM_LARGEST;
+    }
+}
+
+void wxWebViewIE::SetZoomType(wxWebViewZoomType type)
+{
+    m_zoomType = type;
+}
+
+wxWebViewZoomType wxWebViewIE::GetZoomType() const
+{
+    return m_zoomType;
+}
+
+bool wxWebViewIE::CanSetZoomType(wxWebViewZoomType type) const
+{
+    //IE 6 and below only support text zoom, so check the registry to see what
+    //version we actually have
+    wxRegKey key(wxRegKey::HKLM, "Software\\Microsoft\\Internet Explorer");
+    wxString value;
+    key.QueryValue("Version", value);
+
+    long version = wxAtoi(value.Left(1));
+    if(version <= 6 && type == wxWEB_VIEW_ZOOM_TYPE_LAYOUT)
+        return false;
+    else
+        return true;
+}
+
+void wxWebViewIE::Print()
+{
+    m_webBrowser->ExecWB(OLECMDID_PRINTPREVIEW,
+                         OLECMDEXECOPT_DODEFAULT, NULL, NULL);
+}
+
+bool wxWebViewIE::CanGoBack() const
+{
+    if(m_historyEnabled)
+        return m_historyPosition > 0;
+    else
+        return false;
+}
+
+bool wxWebViewIE::CanGoForward() const
+{
+    if(m_historyEnabled)
+        return m_historyPosition != static_cast<int>(m_historyList.size()) - 1;
+    else
+        return false;
+}
+
+void wxWebViewIE::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
+{
+    int pos = -1;
+    for(unsigned int i = 0; i < m_historyList.size(); i++)
+    {
+        //We compare the actual pointers to find the correct item
+        if(m_historyList[i].get() == item.get())
+            pos = i;
+    }
+    wxASSERT_MSG(pos != static_cast<int>(m_historyList.size()),
+                 "invalid history item");
+    m_historyLoadingFromList = true;
+    LoadURL(item->GetUrl());
+    m_historyPosition = pos;
+}
+
+wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewIE::GetBackwardHistory()
+{
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
+    //As we don't have std::copy or an iterator constructor in the wxwidgets
+    //native vector we construct it by hand
+    for(int i = 0; i < m_historyPosition; i++)
+    {
+        backhist.push_back(m_historyList[i]);
+    }
+    return backhist;
+}
+
+wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewIE::GetForwardHistory()
+{
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
+    //As we don't have std::copy or an iterator constructor in the wxwidgets
+    //native vector we construct it by hand
+    for(int i = m_historyPosition + 1; i < static_cast<int>(m_historyList.size()); i++)
+    {
+        forwardhist.push_back(m_historyList[i]);
+    }
+    return forwardhist;
+}
+
+void wxWebViewIE::GoBack()
+{
+    LoadHistoryItem(m_historyList[m_historyPosition - 1]);
+}
+
+void wxWebViewIE::GoForward()
+{
+    LoadHistoryItem(m_historyList[m_historyPosition + 1]);
+}
+
+void wxWebViewIE::Stop()
+{
+    m_ie.CallMethod("Stop");
+}
+
+void wxWebViewIE::ClearHistory()
+{
+    m_historyList.clear();
+    m_historyPosition = -1;
+}
+
+void wxWebViewIE::EnableHistory(bool enable)
+{
+    m_historyEnabled = enable;
+    m_historyList.clear();
+    m_historyPosition = -1;
+}
+
+void wxWebViewIE::Reload(wxWebViewReloadFlags flags)
+{
+    VARIANTARG level;
+    VariantInit(&level);
+    V_VT(&level) = VT_I2;
+
+    switch(flags)
+    {
+        case wxWEB_VIEW_RELOAD_DEFAULT:
+            V_I2(&level) = REFRESH_NORMAL;
+            break;
+        case wxWEB_VIEW_RELOAD_NO_CACHE:
+            V_I2(&level) = REFRESH_COMPLETELY;
+            break;
+        default:
+            wxFAIL_MSG("Unexpected reload type");
+    }
+
+    m_webBrowser->Refresh2(&level);
+}
+
+bool wxWebViewIE::IsOfflineMode()
+{
+    wxVariant out = m_ie.GetProperty("Offline");
+
+    wxASSERT(out.GetType() == "bool");
+
+    return out.GetBool();
+}
+
+void wxWebViewIE::SetOfflineMode(bool offline)
+{
+    // FIXME: the wxWidgets docs do not really document what the return
+    //        parameter of PutProperty is
+    const bool success = m_ie.PutProperty("Offline", (offline ?
+                                                      VARIANT_TRUE :
+                                                      VARIANT_FALSE));
+    wxASSERT(success);
+}
+
+bool wxWebViewIE::IsBusy() const
+{ 
+    if (m_isBusy) return true;
+
+    wxVariant out = m_ie.GetProperty("Busy");
+
+    wxASSERT(out.GetType() == "bool");
+
+    return out.GetBool();
+}
+
+wxString wxWebViewIE::GetCurrentURL() const
+{
+    wxVariant out = m_ie.GetProperty("LocationURL");
+
+    wxASSERT(out.GetType() == "string");
+    return out.GetString();
+}
+
+wxString wxWebViewIE::GetCurrentTitle() const
+{
+    IHTMLDocument2* document = GetDocument();
+    BSTR title;
+
+    document->get_nameProp(&title);
+    document->Release();
+    return wxString(title);
+}
+
+bool wxWebViewIE::CanCut() const
+{
+    return CanExecCommand("Cut");
+}
+
+bool wxWebViewIE::CanCopy() const
+{
+    return CanExecCommand("Copy");
+}
+bool wxWebViewIE::CanPaste() const
+{
+    return CanExecCommand("Paste");
+}
+
+void wxWebViewIE::Cut()
+{
+    ExecCommand("Cut");
+}
+
+void wxWebViewIE::Copy()
+{
+    ExecCommand("Copy");
+}
+
+void wxWebViewIE::Paste()
+{
+    ExecCommand("Paste");
+}
+
+bool wxWebViewIE::CanUndo() const
+{
+    return CanExecCommand("Undo");
+}
+bool wxWebViewIE::CanRedo() const
+{
+    return CanExecCommand("Redo");
+}
+
+void wxWebViewIE::Undo()
+{
+    ExecCommand("Undo");
+}
+
+void wxWebViewIE::Redo()
+{
+    ExecCommand("Redo");
+}
+
+void wxWebViewIE::SetEditable(bool enable)
+{
+    IHTMLDocument2* document = GetDocument();
+    if( enable )
+        document->put_designMode(SysAllocString(L"On"));
+    else
+        document->put_designMode(SysAllocString(L"Off"));
+
+    document->Release();
+}
+
+bool wxWebViewIE::IsEditable() const
+{
+    IHTMLDocument2* document = GetDocument();
+    BSTR mode;
+    document->get_designMode(&mode);
+    document->Release();
+    if(wxString(mode) == "On")
+        return true;
+    else
+        return false;
+}
+
+void wxWebViewIE::SelectAll()
+{
+    ExecCommand("SelectAll");
+}
+
+bool wxWebViewIE::HasSelection() const
+{
+    IHTMLDocument2* document = GetDocument();
+    IHTMLSelectionObject* selection;
+    wxString sel;
+    HRESULT hr = document->get_selection(&selection);
+    if(SUCCEEDED(hr))
+    {
+        BSTR type;
+        selection->get_type(&type);
+        sel = wxString(type);
+        selection->Release();
+    }
+    document->Release();
+    return sel != "None";
+}
+
+void wxWebViewIE::DeleteSelection()
+{
+    ExecCommand("Delete");
+}
+
+wxString wxWebViewIE::GetSelectedText() const
+{
+    IHTMLDocument2* document = GetDocument();
+    IHTMLSelectionObject* selection;
+    wxString selected;
+    HRESULT hr = document->get_selection(&selection);
+    if(SUCCEEDED(hr))
+    {
+        IDispatch* disrange;
+        hr = selection->createRange(&disrange);
+        if(SUCCEEDED(hr))
+        {
+            IHTMLTxtRange* range;
+            hr = disrange->QueryInterface(IID_IHTMLTxtRange, (void**)&range);
+            if(SUCCEEDED(hr))
+            {
+                BSTR text;
+                range->get_text(&text);
+                selected = wxString(text);
+                range->Release();
+            }
+            disrange->Release();
+        }
+        selection->Release();
+    }
+    document->Release();
+    return selected;
+}
+
+wxString wxWebViewIE::GetSelectedSource() const
+{
+    IHTMLDocument2* document = GetDocument();
+    IHTMLSelectionObject* selection;
+    wxString selected;
+    HRESULT hr = document->get_selection(&selection);
+    if(SUCCEEDED(hr))
+    {
+        IDispatch* disrange;
+        hr = selection->createRange(&disrange);
+        if(SUCCEEDED(hr))
+        {
+            IHTMLTxtRange* range;
+            hr = disrange->QueryInterface(IID_IHTMLTxtRange, (void**)&range);
+            if(SUCCEEDED(hr))
+            {
+                BSTR text;
+                range->get_htmlText(&text);
+                selected = wxString(text);
+                range->Release();
+            }
+            disrange->Release();
+        }
+        selection->Release();
+    }
+    document->Release();
+    return selected;
+}
+
+void wxWebViewIE::ClearSelection()
+{
+    IHTMLDocument2* document = GetDocument();
+    IHTMLSelectionObject* selection;
+    wxString selected;
+    HRESULT hr = document->get_selection(&selection);
+    if(SUCCEEDED(hr))
+    {
+        selection->empty();
+        selection->Release();
+    }
+    document->Release();
+}
+
+wxString wxWebViewIE::GetPageText() const
+{
+    IHTMLDocument2* document = GetDocument();
+    wxString text;
+    IHTMLElement* body;
+    HRESULT hr = document->get_body(&body);
+    if(SUCCEEDED(hr))
+    {
+        BSTR out;
+        body->get_innerText(&out);
+        text = wxString(out);
+        body->Release();
+    }
+    document->Release();
+    return text;
+}
+
+void wxWebViewIE::RunScript(const wxString& javascript)
+{
+    IHTMLDocument2* document = GetDocument();
+    IHTMLWindow2* window;
+    wxString language = "javascript";
+    HRESULT hr = document->get_parentWindow(&window);
+    if(SUCCEEDED(hr))
+    {
+        VARIANT level;
+        VariantInit(&level);
+        V_VT(&level) = VT_EMPTY;
+        window->execScript(SysAllocString(javascript), SysAllocString(language), &level);
+    }
+    document->Release();
+}
+
+void wxWebViewIE::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
+{
+    ClassFactory* cf = new ClassFactory(handler);
+    IInternetSession* session;
+    if(FAILED(CoInternetGetSession(0, &session, 0)))
+    {
+        wxFAIL_MSG("Could not retrive internet session");
+    }
+
+    HRESULT hr = session->RegisterNameSpace(cf, CLSID_FileProtocol, handler->GetName(), 0, NULL, 0);
+    if(FAILED(hr))
+    {
+        wxFAIL_MSG("Could not register protocol");
+    }
+}
+
+bool wxWebViewIE::CanExecCommand(wxString command) const
+{
+    IHTMLDocument2* document = GetDocument();
+    VARIANT_BOOL enabled;
+
+    document->queryCommandEnabled(SysAllocString(command.wc_str()), &enabled);
+    document->Release();
+
+    return (enabled == VARIANT_TRUE);
+}
+
+void wxWebViewIE::ExecCommand(wxString command)
+{
+    IHTMLDocument2* document = GetDocument();
+    document->execCommand(SysAllocString(command.wc_str()), VARIANT_FALSE, VARIANT(), NULL);
+    document->Release();
+}
+
+IHTMLDocument2* wxWebViewIE::GetDocument() const
+{
+    wxVariant variant = m_ie.GetProperty("Document");
+    IHTMLDocument2* document = (IHTMLDocument2*)variant.GetVoidPtr();
+
+    wxASSERT(document);
+
+    return document;
+}
+
+void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt)
+{
+    if (m_webBrowser == NULL) return;
+
+    switch (evt.GetDispatchId())
+    {
+        case DISPID_BEFORENAVIGATE2:
+        {
+            m_isBusy = true;
+
+            wxString url = evt[1].GetString();
+            wxString target = evt[3].GetString();
+
+            wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATING,
+                                 GetId(), url, target);
+            event.SetEventObject(this);
+            HandleWindowEvent(event);
+
+            if (!event.IsAllowed())
+            {
+                wxActiveXEventNativeMSW* nativeParams =
+                    evt.GetNativeParameters();
+                *V_BOOLREF(&nativeParams->pDispParams->rgvarg[0]) = VARIANT_TRUE;
+            }
+
+            // at this point, either the navigation event has been cancelled
+            // and we're not busy, either it was accepted and IWebBrowser2's
+            // Busy property will be true; so we don't need our override
+            // flag anymore.
+            m_isBusy = false;
+
+            break;
+        }
+
+        case DISPID_NAVIGATECOMPLETE2:
+        {
+            wxString url = evt[1].GetString();
+            // TODO: set target parameter if possible
+            wxString target = wxEmptyString;
+            wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATED,
+                                 GetId(), url, target);
+            event.SetEventObject(this);
+            HandleWindowEvent(event);
+            break;
+        }
+
+        case DISPID_PROGRESSCHANGE:
+        {
+            // download progress
+            break;
+        }
+
+        case DISPID_DOCUMENTCOMPLETE:
+        {
+            //Only send a complete even if we are actually finished, this brings
+            //the event in to line with webkit
+            READYSTATE rs;
+            m_webBrowser->get_ReadyState( &rs );
+            if(rs != READYSTATE_COMPLETE)
+                break;
+
+            wxString url = evt[1].GetString();
+
+            //As we are complete we also add to the history list, but not if the
+            //page is not the main page, ie it is a subframe
+            //We also have to check if we are loading a file:// url, if so we 
+            //need to change the comparison as ie passes back a different style
+            //of url
+            if(m_historyEnabled && !m_historyLoadingFromList && 
+              (url == GetCurrentURL() || 
+              (GetCurrentURL().substr(0, 4) == "file" && 
+               wxFileSystem::URLToFileName(GetCurrentURL()).GetFullPath() == url)))
+            {
+                //If we are not at the end of the list, then erase everything
+                //between us and the end before adding the new page
+                if(m_historyPosition != static_cast<int>(m_historyList.size()) - 1)
+                {
+                    m_historyList.erase(m_historyList.begin() + m_historyPosition + 1,
+                                        m_historyList.end());
+                }
+                wxSharedPtr<wxWebViewHistoryItem> item(new wxWebViewHistoryItem(url, GetCurrentTitle()));
+                m_historyList.push_back(item);
+                m_historyPosition++;
+            }
+            //Reset as we are done now
+            m_historyLoadingFromList = false;
+            // TODO: set target parameter if possible
+            wxString target = wxEmptyString;
+            wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_LOADED, GetId(),
+                                 url, target);
+            event.SetEventObject(this);
+            HandleWindowEvent(event);
+            break;
+        }
+
+        case DISPID_STATUSTEXTCHANGE:
+        {
+            break;
+        }
+
+        case DISPID_TITLECHANGE:
+        {
+            wxString title = evt[0].GetString();
+
+            wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
+                                 GetId(), GetCurrentURL(), "");
+            event.SetString(title);
+            event.SetEventObject(this);
+            HandleWindowEvent(event);
+            break;
+        }
+
+        case DISPID_NAVIGATEERROR:
+        {
+            wxWebViewNavigationError errorType = wxWEB_NAV_ERR_OTHER;
+            wxString errorCode = "?";
+            switch (evt[3].GetLong())
+            {
+            case INET_E_INVALID_URL: // (0x800C0002L or -2146697214)
+                errorCode = "INET_E_INVALID_URL";
+                errorType = wxWEB_NAV_ERR_REQUEST;
+                break;
+            case INET_E_NO_SESSION: // (0x800C0003L or -2146697213)
+                errorCode = "INET_E_NO_SESSION";
+                errorType = wxWEB_NAV_ERR_CONNECTION;
+                break;
+            case INET_E_CANNOT_CONNECT: // (0x800C0004L or -2146697212)
+                errorCode = "INET_E_CANNOT_CONNECT";
+                errorType = wxWEB_NAV_ERR_CONNECTION;
+                break;
+            case INET_E_RESOURCE_NOT_FOUND: // (0x800C0005L or -2146697211)
+                errorCode = "INET_E_RESOURCE_NOT_FOUND";
+                errorType = wxWEB_NAV_ERR_NOT_FOUND;
+                break;
+            case INET_E_OBJECT_NOT_FOUND: // (0x800C0006L or -2146697210)
+                errorCode = "INET_E_OBJECT_NOT_FOUND";
+                errorType = wxWEB_NAV_ERR_NOT_FOUND;
+                break;
+            case INET_E_DATA_NOT_AVAILABLE: // (0x800C0007L or -2146697209)
+                errorCode = "INET_E_DATA_NOT_AVAILABLE";
+                errorType = wxWEB_NAV_ERR_NOT_FOUND;
+                break;
+            case INET_E_DOWNLOAD_FAILURE: // (0x800C0008L or -2146697208)
+                errorCode = "INET_E_DOWNLOAD_FAILURE";
+                errorType = wxWEB_NAV_ERR_CONNECTION;
+                break;
+            case INET_E_AUTHENTICATION_REQUIRED: // (0x800C0009L or -2146697207)
+                errorCode = "INET_E_AUTHENTICATION_REQUIRED";
+                errorType = wxWEB_NAV_ERR_AUTH;
+                break;
+            case INET_E_NO_VALID_MEDIA: // (0x800C000AL or -2146697206)
+                errorCode = "INET_E_NO_VALID_MEDIA";
+                errorType = wxWEB_NAV_ERR_REQUEST;
+                break;
+            case INET_E_CONNECTION_TIMEOUT: // (0x800C000BL or -2146697205)
+                errorCode = "INET_E_CONNECTION_TIMEOUT";
+                errorType = wxWEB_NAV_ERR_CONNECTION;
+                break;
+            case INET_E_INVALID_REQUEST: // (0x800C000CL or -2146697204)
+                errorCode = "INET_E_INVALID_REQUEST";
+                errorType = wxWEB_NAV_ERR_REQUEST;
+                break;
+            case INET_E_UNKNOWN_PROTOCOL: // (0x800C000DL or -2146697203)
+                errorCode = "INET_E_UNKNOWN_PROTOCOL";
+                errorType = wxWEB_NAV_ERR_REQUEST;
+                break;
+            case INET_E_SECURITY_PROBLEM: // (0x800C000EL or -2146697202)
+                errorCode = "INET_E_SECURITY_PROBLEM";
+                errorType = wxWEB_NAV_ERR_SECURITY;
+                break;
+            case INET_E_CANNOT_LOAD_DATA: // (0x800C000FL or -2146697201)
+                errorCode = "INET_E_CANNOT_LOAD_DATA";
+                errorType = wxWEB_NAV_ERR_OTHER;
+                break;
+            case INET_E_CANNOT_INSTANTIATE_OBJECT:
+                // CoCreateInstance will return an error code if this happens,
+                // we'll handle this above.
+                return;
+                break;
+            case INET_E_REDIRECT_FAILED: // (0x800C0014L or -2146697196)
+                errorCode = "INET_E_REDIRECT_FAILED";
+                errorType = wxWEB_NAV_ERR_OTHER;
+                break;
+            case INET_E_REDIRECT_TO_DIR: // (0x800C0015L or -2146697195)
+                errorCode = "INET_E_REDIRECT_TO_DIR";
+                errorType = wxWEB_NAV_ERR_REQUEST;
+                break;
+            case INET_E_CANNOT_LOCK_REQUEST: // (0x800C0016L or -2146697194)
+                errorCode = "INET_E_CANNOT_LOCK_REQUEST";
+                errorType = wxWEB_NAV_ERR_OTHER;
+                break;
+            case INET_E_USE_EXTEND_BINDING: // (0x800C0017L or -2146697193)
+                errorCode = "INET_E_USE_EXTEND_BINDING";
+                errorType = wxWEB_NAV_ERR_OTHER;
+                break;
+            case INET_E_TERMINATED_BIND: // (0x800C0018L or -2146697192)
+                errorCode = "INET_E_TERMINATED_BIND";
+                errorType = wxWEB_NAV_ERR_OTHER;
+                break;
+            case INET_E_INVALID_CERTIFICATE: // (0x800C0019L or -2146697191)
+                errorCode = "INET_E_INVALID_CERTIFICATE";
+                errorType = wxWEB_NAV_ERR_CERTIFICATE;
+                break;
+            case INET_E_CODE_DOWNLOAD_DECLINED: // (0x800C0100L or -2146696960)
+                errorCode = "INET_E_CODE_DOWNLOAD_DECLINED";
+                errorType = wxWEB_NAV_ERR_USER_CANCELLED;
+                break;
+            case INET_E_RESULT_DISPATCHED: // (0x800C0200L or -2146696704)
+                // cancel request cancelled...
+                errorCode = "INET_E_RESULT_DISPATCHED";
+                errorType = wxWEB_NAV_ERR_OTHER;
+                break;
+            case INET_E_CANNOT_REPLACE_SFP_FILE: // (0x800C0300L or -2146696448)
+                errorCode = "INET_E_CANNOT_REPLACE_SFP_FILE";
+                errorType = wxWEB_NAV_ERR_SECURITY;
+                break;
+            case INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY:
+                errorCode = "INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY";
+                errorType = wxWEB_NAV_ERR_SECURITY;
+                break;
+            case INET_E_CODE_INSTALL_SUPPRESSED:
+                errorCode = "INET_E_CODE_INSTALL_SUPPRESSED";
+                errorType = wxWEB_NAV_ERR_SECURITY;
+                break;
+            }
+
+            wxString url = evt[1].GetString();
+            wxString target = evt[2].GetString();
+            wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_ERROR, GetId(),
+                                 url, target);
+            event.SetEventObject(this);
+            event.SetInt(errorType);
+            event.SetString(errorCode);
+            HandleWindowEvent(event);
+            break;
+        }
+        case DISPID_NEWWINDOW3:
+        {
+            wxString url = evt[4].GetString();
+
+            wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
+                                 GetId(), url, wxEmptyString);
+            event.SetEventObject(this);
+            HandleWindowEvent(event);
+
+            //We always cancel this event otherwise an Internet Exporer window
+            //is opened for the url
+            wxActiveXEventNativeMSW* nativeParams = evt.GetNativeParameters();
+            *V_BOOLREF(&nativeParams->pDispParams->rgvarg[3]) = VARIANT_TRUE;
+            break;
+        }
+    }
+
+    evt.Skip();
+}
+
+VirtualProtocol::VirtualProtocol(wxSharedPtr<wxWebViewHandler> handler)
+{
+    m_refCount = 0;
+    m_file = NULL;
+    m_handler = handler;
+}
+
+VirtualProtocol::~VirtualProtocol()
+{
+}
+
+ULONG VirtualProtocol::AddRef()
+{
+    m_refCount++;
+    return m_refCount;
+}
+
+HRESULT VirtualProtocol::QueryInterface(REFIID riid, void **ppvObject)
+{
+    if(riid == IID_IUnknown || riid == IID_IInternetProtocolRoot || 
+       riid == IID_IInternetProtocol)
+    {
+        *ppvObject = (IInternetProtocol*)this;
+        AddRef();
+        return S_OK;
+    }
+    else
+    {
+        *ppvObject = NULL;
+        return E_POINTER;
+    }
+}
+
+ULONG VirtualProtocol::Release()
+{
+    m_refCount--;
+    if (m_refCount > 0)
+    {
+        return m_refCount;
+    }
+    else
+    {
+        delete this;
+        return 0;
+    }
+}
+
+HRESULT VirtualProtocol::Start(LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink,
+                               IInternetBindInfo *pOIBindInfo, DWORD grfPI, 
+                               HANDLE_PTR dwReserved)
+{
+    wxUnusedVar(szUrl);
+    wxUnusedVar(pOIBindInfo);
+    wxUnusedVar(grfPI);
+    wxUnusedVar(dwReserved);
+    m_protocolSink = pOIProtSink;
+    
+    //We get the file itself from the protocol handler
+    m_file = m_handler->GetFile(szUrl);
+
+
+    if(!m_file)
+        return INET_E_RESOURCE_NOT_FOUND;
+
+    //We return the stream length for current and total size as we can always
+    //read the whole file from the stream
+    wxFileOffset length = m_file->GetStream()->GetLength();
+    m_protocolSink->ReportData(BSCF_FIRSTDATANOTIFICATION | 
+                               BSCF_DATAFULLYAVAILABLE |
+                               BSCF_LASTDATANOTIFICATION,
+                               length, length);
+    return S_OK; 
+}
+
+HRESULT VirtualProtocol::Read(void *pv, ULONG cb, ULONG *pcbRead)
+{
+    //If the file is null we return false to indicte it is finished
+    if(!m_file) 
+        return S_FALSE;
+
+    wxStreamError err = m_file->GetStream()->Read(pv, cb).GetLastError();
+    *pcbRead = m_file->GetStream()->LastRead();
+
+    if(err == wxSTREAM_NO_ERROR)
+    {
+        if(*pcbRead < cb)
+        {
+            wxDELETE(m_file);
+            m_protocolSink->ReportResult(S_OK, 0, NULL);
+        }
+        //As we are not eof there is more data
+        return S_OK;
+    }
+    else if(err == wxSTREAM_EOF)
+    {
+        wxDELETE(m_file);
+        m_protocolSink->ReportResult(S_OK, 0, NULL);
+        //We are eof and so finished
+        return S_OK;
+    }
+    else if(err ==  wxSTREAM_READ_ERROR)
+    {
+        wxDELETE(m_file);
+        return INET_E_DOWNLOAD_FAILURE;
+    }
+    else
+    {
+        //Dummy return to surpress a compiler warning
+        wxFAIL;
+        return INET_E_DOWNLOAD_FAILURE;
+    }
+}
+
+HRESULT ClassFactory::CreateInstance(IUnknown* pUnkOuter, REFIID riid,
+                                     void ** ppvObject)
+{
+    if (pUnkOuter) 
+        return CLASS_E_NOAGGREGATION;
+    VirtualProtocol* vp = new VirtualProtocol(m_handler);
+    vp->AddRef();
+    HRESULT hr = vp->QueryInterface(riid, ppvObject);
+    vp->Release();
+    return hr;
+
+} 
+
+STDMETHODIMP ClassFactory::LockServer(BOOL fLock)
+{
+    wxUnusedVar(fLock);
+    return S_OK;
+}
+
+ULONG ClassFactory::AddRef(void)
+{
+    m_refCount++;
+    return m_refCount;
+}
+
+HRESULT ClassFactory::QueryInterface(REFIID riid, void **ppvObject)
+{
+    if ((riid == IID_IUnknown) || (riid == IID_IClassFactory))
+    {
+        *ppvObject = this;
+        AddRef();
+        return S_OK;
+    }
+    else
+    {
+        *ppvObject = NULL;
+        return E_POINTER;
+    }
+
+}
+
+ULONG ClassFactory::Release(void)
+{
+    m_refCount--;
+    if (m_refCount > 0)
+    {
+        return m_refCount;
+    }
+    else
+    {
+        delete this;
+        return 0;
+    }
+
+} 
+
+#endif
diff --git a/src/osx/webview_webkit.mm b/src/osx/webview_webkit.mm
new file mode 100644 (file)
index 0000000..0d0e0e7
--- /dev/null
@@ -0,0 +1,1318 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/osx/webview_webkit.mm
+// Purpose:     wxWebViewWebKit - embeddable web kit control,
+//                             OS X implementation of web view component
+// Author:      Jethro Grassie / Kevin Ollivier / Marianne Gagnon
+// Modified by:
+// Created:     2004-4-16
+// RCS-ID:      $Id$
+// Copyright:   (c) Jethro Grassie / Kevin Ollivier / Marianne Gagnon
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// http://developer.apple.com/mac/library/documentation/Cocoa/Reference/WebKit/Classes/WebView_Class/Reference/Reference.html
+
+#include "wx/osx/webview_webkit.h"
+
+#if wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \
+                         ||  defined(__WXOSX_CARBON__))
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+#endif
+
+#include "wx/osx/private.h"
+#include "wx/cocoa/string.h"
+#include "wx/hashmap.h"
+#include "wx/filesys.h"
+
+#include <WebKit/WebKit.h>
+#include <WebKit/HIWebView.h>
+#include <WebKit/CarbonUtils.h>
+
+#include <Foundation/NSURLError.h>
+
+#define DEBUG_WEBKIT_SIZING 0
+
+// ----------------------------------------------------------------------------
+// macros
+// ----------------------------------------------------------------------------
+
+wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewWebKit, wxWebView);
+
+BEGIN_EVENT_TABLE(wxWebViewWebKit, wxControl)
+#if defined(__WXMAC__) && wxOSX_USE_CARBON
+    EVT_SIZE(wxWebViewWebKit::OnSize)
+#endif
+END_EVENT_TABLE()
+
+#if defined(__WXOSX__) && wxOSX_USE_CARBON
+
+// ----------------------------------------------------------------------------
+// Carbon Events handlers
+// ----------------------------------------------------------------------------
+
+// prototype for function in src/osx/carbon/nonownedwnd.cpp
+void SetupMouseEvent( wxMouseEvent &wxevent , wxMacCarbonEvent &cEvent );
+
+static const EventTypeSpec eventList[] =
+{
+    //{ kEventClassControl, kEventControlTrack } ,
+    { kEventClassMouse, kEventMouseUp },
+    { kEventClassMouse, kEventMouseDown },
+    { kEventClassMouse, kEventMouseMoved },
+    { kEventClassMouse, kEventMouseDragged },
+
+    { kEventClassKeyboard, kEventRawKeyDown } ,
+    { kEventClassKeyboard, kEventRawKeyRepeat } ,
+    { kEventClassKeyboard, kEventRawKeyUp } ,
+    { kEventClassKeyboard, kEventRawKeyModifiersChanged } ,
+
+    { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent } ,
+    { kEventClassTextInput, kEventTextInputUpdateActiveInputArea } ,
+
+#if DEBUG_WEBKIT_SIZING == 1
+    { kEventClassControl, kEventControlBoundsChanged } ,
+#endif
+};
+
+// mix this in from window.cpp
+pascal OSStatus wxMacUnicodeTextEventHandler(EventHandlerCallRef handler,
+                                             EventRef event, void *data) ;
+
+// NOTE: This is mostly taken from KeyboardEventHandler in toplevel.cpp, but
+// that expects the data pointer is a top-level window, so I needed to change
+// that in this case. However, once 2.8 is out, we should factor out the common
+// logic among the two functions and merge them.
+static pascal OSStatus wxWebKitKeyEventHandler(EventHandlerCallRef handler,
+                                               EventRef event, void *data)
+{
+    OSStatus result = eventNotHandledErr ;
+    wxMacCarbonEvent cEvent( event ) ;
+
+    wxWebViewWebKit* thisWindow = (wxWebViewWebKit*) data ;
+    wxWindow* focus = thisWindow ;
+
+    unsigned char charCode ;
+    wxChar uniChar[2] ;
+    uniChar[0] = 0;
+    uniChar[1] = 0;
+
+    UInt32 keyCode ;
+    UInt32 modifiers ;
+    Point point ;
+    UInt32 when = EventTimeToTicks( GetEventTime( event ) ) ;
+
+#if wxUSE_UNICODE
+    ByteCount dataSize = 0 ;
+    if ( GetEventParameter(event, kEventParamKeyUnicodes, typeUnicodeText,
+                           NULL, 0 , &dataSize, NULL ) == noErr)
+    {
+        UniChar buf[2] ;
+        int numChars = dataSize / sizeof( UniChar) + 1;
+
+        UniChar* charBuf = buf ;
+
+        if ( numChars * 2 > 4 )
+            charBuf = new UniChar[ numChars ] ;
+        GetEventParameter(event, kEventParamKeyUnicodes, typeUnicodeText, NULL,
+                          dataSize , NULL , charBuf) ;
+        charBuf[ numChars - 1 ] = 0;
+
+#if SIZEOF_WCHAR_T == 2
+        uniChar = charBuf[0] ;
+#else
+        wxMBConvUTF16 converter ;
+        converter.MB2WC( uniChar , (const char*)charBuf , 2 ) ;
+#endif
+
+        if ( numChars * 2 > 4 )
+            delete[] charBuf ;
+    }
+#endif
+
+    GetEventParameter(event, kEventParamKeyMacCharCodes, typeChar, NULL,
+                      sizeof(char), NULL, &charCode );
+    GetEventParameter(event, kEventParamKeyCode, typeUInt32, NULL,
+                      sizeof(UInt32), NULL, &keyCode );
+    GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, NULL,
+                      sizeof(UInt32), NULL, &modifiers );
+    GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, NULL,
+                      sizeof(Point), NULL, &point );
+
+    UInt32 message = (keyCode << 8) + charCode;
+    switch ( GetEventKind( event ) )
+    {
+        case kEventRawKeyRepeat :
+        case kEventRawKeyDown :
+        {
+            WXEVENTREF formerEvent = wxTheApp->MacGetCurrentEvent() ;
+            WXEVENTHANDLERCALLREF formerHandler =
+                wxTheApp->MacGetCurrentEventHandlerCallRef() ;
+
+            wxTheApp->MacSetCurrentEvent( event , handler ) ;
+            if ( /* focus && */ wxTheApp->MacSendKeyDownEvent(
+                focus, message, modifiers, when, point.h, point.v, uniChar[0]))
+            {
+                result = noErr ;
+            }
+            wxTheApp->MacSetCurrentEvent( formerEvent , formerHandler ) ;
+        }
+        break ;
+
+        case kEventRawKeyUp :
+            if ( /* focus && */ wxTheApp->MacSendKeyUpEvent(
+                focus , message , modifiers , when , point.h , point.v , uniChar[0] ) )
+            {
+                result = noErr ;
+            }
+            break ;
+
+        case kEventRawKeyModifiersChanged :
+            {
+                wxKeyEvent event(wxEVT_KEY_DOWN);
+
+                event.m_shiftDown = modifiers & shiftKey;
+                event.m_controlDown = modifiers & controlKey;
+                event.m_altDown = modifiers & optionKey;
+                event.m_metaDown = modifiers & cmdKey;
+                event.m_x = point.h;
+                event.m_y = point.v;
+
+#if wxUSE_UNICODE
+                event.m_uniChar = uniChar[0] ;
+#endif
+
+                event.SetTimestamp(when);
+                event.SetEventObject(focus);
+
+                if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & controlKey )
+                {
+                    event.m_keyCode = WXK_CONTROL ;
+                    event.SetEventType( ( modifiers & controlKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+                    focus->GetEventHandler()->ProcessEvent( event ) ;
+                }
+                if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & shiftKey )
+                {
+                    event.m_keyCode = WXK_SHIFT ;
+                    event.SetEventType( ( modifiers & shiftKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+                    focus->GetEventHandler()->ProcessEvent( event ) ;
+                }
+                if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & optionKey )
+                {
+                    event.m_keyCode = WXK_ALT ;
+                    event.SetEventType( ( modifiers & optionKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+                    focus->GetEventHandler()->ProcessEvent( event ) ;
+                }
+                if ( /* focus && */ (modifiers ^ wxApp::s_lastModifiers ) & cmdKey )
+                {
+                    event.m_keyCode = WXK_COMMAND ;
+                    event.SetEventType( ( modifiers & cmdKey ) ? wxEVT_KEY_DOWN : wxEVT_KEY_UP ) ;
+                    focus->GetEventHandler()->ProcessEvent( event ) ;
+                }
+
+                wxApp::s_lastModifiers = modifiers ;
+            }
+            break ;
+
+        default:
+            break;
+    }
+
+    return result ;
+}
+
+static pascal OSStatus wxWebViewWebKitEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+{
+    OSStatus result = eventNotHandledErr ;
+
+    wxMacCarbonEvent cEvent( event ) ;
+
+    ControlRef controlRef ;
+    wxWebViewWebKit* thisWindow = (wxWebViewWebKit*) data ;
+    wxNonOwnedWindow* tlw = NULL;
+    if (thisWindow)
+        tlw = thisWindow->MacGetTopLevelWindow();
+
+    cEvent.GetParameter( kEventParamDirectObject , &controlRef ) ;
+
+    wxWindow* currentMouseWindow = thisWindow ;
+
+    if ( wxApp::s_captureWindow )
+        currentMouseWindow = wxApp::s_captureWindow;
+
+    switch ( GetEventClass( event ) )
+    {
+        case kEventClassKeyboard:
+        {
+            result = wxWebKitKeyEventHandler(handler, event, data);
+            break;
+        }
+
+        case kEventClassTextInput:
+        {
+            result = wxMacUnicodeTextEventHandler(handler, event, data);
+            break;
+        }
+
+        case kEventClassMouse:
+        {
+            switch ( GetEventKind( event ) )
+            {
+                case kEventMouseDragged :
+                case kEventMouseMoved :
+                case kEventMouseDown :
+                case kEventMouseUp :
+                {
+                    wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
+                    SetupMouseEvent( wxevent , cEvent ) ;
+
+                    currentMouseWindow->ScreenToClient( &wxevent.m_x , &wxevent.m_y ) ;
+                    wxevent.SetEventObject( currentMouseWindow ) ;
+                    wxevent.SetId( currentMouseWindow->GetId() ) ;
+
+                    if ( currentMouseWindow->GetEventHandler()->ProcessEvent(wxevent) )
+                    {
+                        result = noErr;
+                    }
+
+                    break; // this should enable WebKit to fire mouse dragged and mouse up events...
+                }
+                default :
+                    break ;
+            }
+        }
+        default:
+            break;
+    }
+
+    result = CallNextEventHandler(handler, event);
+    return result ;
+}
+
+DEFINE_ONE_SHOT_HANDLER_GETTER( wxWebViewWebKitEventHandler )
+
+#endif
+
+@interface WebViewLoadDelegate : NSObject
+{
+    wxWebViewWebKit* webKitWindow;
+}
+
+- initWithWxWindow: (wxWebViewWebKit*)inWindow;
+
+@end
+
+@interface WebViewPolicyDelegate : NSObject
+{
+    wxWebViewWebKit* webKitWindow;
+}
+
+- initWithWxWindow: (wxWebViewWebKit*)inWindow;
+
+@end
+
+//We use a hash to map scheme names to wxWebViewHandler
+WX_DECLARE_STRING_HASH_MAP(wxSharedPtr<wxWebViewHandler>, wxStringToWebHandlerMap);
+
+static wxStringToWebHandlerMap g_stringHandlerMap;
+
+@interface WebViewCustomProtocol : NSURLProtocol
+{
+}
+@end
+
+// ----------------------------------------------------------------------------
+// creation/destruction
+// ----------------------------------------------------------------------------
+
+bool wxWebViewWebKit::Create(wxWindow *parent,
+                                 wxWindowID winID,
+                                 const wxString& strURL,
+                                 const wxPoint& pos,
+                                 const wxSize& size, long style,
+                                 const wxString& name)
+{
+    m_busy = false;
+
+    DontCreatePeer();
+    wxControl::Create(parent, winID, pos, size, style, wxDefaultValidator, name);
+
+#if wxOSX_USE_CARBON
+    wxMacControl* peer = new wxMacControl(this);
+    WebInitForCarbon();
+    HIWebViewCreate( peer->GetControlRefAddr() );
+
+    m_webView = (WebView*) HIWebViewGetWebView( peer->GetControlRef() );
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
+    if ( UMAGetSystemVersion() >= 0x1030 )
+        HIViewChangeFeatures( peer->GetControlRef() , kHIViewIsOpaque , 0 ) ;
+#endif
+    InstallControlEventHandler(peer->GetControlRef(),
+                               GetwxWebViewWebKitEventHandlerUPP(),
+                               GetEventTypeCount(eventList), eventList, this,
+                              (EventHandlerRef *)&m_webKitCtrlEventHandler);
+    SetPeer(peer);
+#else
+    NSRect r = wxOSXGetFrameForControl( this, pos , size ) ;
+    m_webView = [[WebView alloc] initWithFrame:r
+                                     frameName:@"webkitFrame"
+                                     groupName:@"webkitGroup"];
+    SetPeer(new wxWidgetCocoaImpl( this, m_webView ));
+#endif
+
+    MacPostControlCreate(pos, size);
+
+#if wxOSX_USE_CARBON
+    HIViewSetVisible( GetPeer()->GetControlRef(), true );
+#endif
+    [m_webView setHidden:false];
+
+
+
+    // Register event listener interfaces
+    WebViewLoadDelegate* loadDelegate =
+            [[WebViewLoadDelegate alloc] initWithWxWindow: this];
+
+    [m_webView setFrameLoadDelegate:loadDelegate];
+
+    // this is used to veto page loads, etc.
+    WebViewPolicyDelegate* policyDelegate =
+            [[WebViewPolicyDelegate alloc] initWithWxWindow: this];
+
+    [m_webView setPolicyDelegate:policyDelegate];
+
+    //Register our own class for custom scheme handling
+    [NSURLProtocol registerClass:[WebViewCustomProtocol class]];
+
+    LoadURL(strURL);
+    return true;
+}
+
+wxWebViewWebKit::~wxWebViewWebKit()
+{
+    WebViewLoadDelegate* loadDelegate = [m_webView frameLoadDelegate];
+    WebViewPolicyDelegate* policyDelegate = [m_webView policyDelegate];
+    [m_webView setFrameLoadDelegate: nil];
+    [m_webView setPolicyDelegate: nil];
+
+    if (loadDelegate)
+        [loadDelegate release];
+
+    if (policyDelegate)
+        [policyDelegate release];
+}
+
+// ----------------------------------------------------------------------------
+// public methods
+// ----------------------------------------------------------------------------
+
+bool wxWebViewWebKit::CanGoBack() const
+{
+    if ( !m_webView )
+        return false;
+
+    return [m_webView canGoBack];
+}
+
+bool wxWebViewWebKit::CanGoForward() const
+{
+    if ( !m_webView )
+        return false;
+
+    return [m_webView canGoForward];
+}
+
+void wxWebViewWebKit::GoBack()
+{
+    if ( !m_webView )
+        return;
+
+    [(WebView*)m_webView goBack];
+}
+
+void wxWebViewWebKit::GoForward()
+{
+    if ( !m_webView )
+        return;
+
+    [(WebView*)m_webView goForward];
+}
+
+void wxWebViewWebKit::Reload(wxWebViewReloadFlags flags)
+{
+    if ( !m_webView )
+        return;
+
+    if (flags & wxWEB_VIEW_RELOAD_NO_CACHE)
+    {
+        // TODO: test this indeed bypasses the cache
+        [[m_webView preferences] setUsesPageCache:NO];
+        [[m_webView mainFrame] reload];
+        [[m_webView preferences] setUsesPageCache:YES];
+    }
+    else
+    {
+        [[m_webView mainFrame] reload];
+    }
+}
+
+void wxWebViewWebKit::Stop()
+{
+    if ( !m_webView )
+        return;
+
+    [[m_webView mainFrame] stopLoading];
+}
+
+bool wxWebViewWebKit::CanGetPageSource() const
+{
+    if ( !m_webView )
+        return false;
+
+    WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
+    return ( [[dataSource representation] canProvideDocumentSource] );
+}
+
+wxString wxWebViewWebKit::GetPageSource() const
+{
+
+    if (CanGetPageSource())
+       {
+        WebDataSource* dataSource = [[m_webView mainFrame] dataSource];
+               wxASSERT (dataSource != nil);
+
+               id<WebDocumentRepresentation> representation = [dataSource representation];
+               wxASSERT (representation != nil);
+
+               NSString* source = [representation documentSource];
+               if (source == nil)
+               {
+                       return wxEmptyString;
+               }
+
+        return wxStringWithNSString( source );
+    }
+
+    return wxEmptyString;
+}
+
+bool wxWebViewWebKit::CanIncreaseTextSize() const
+{
+    if ( !m_webView )
+        return false;
+
+    if ([m_webView canMakeTextLarger])
+        return true;
+    else
+        return false;
+}
+
+void wxWebViewWebKit::IncreaseTextSize()
+{
+    if ( !m_webView )
+        return;
+
+    if (CanIncreaseTextSize())
+        [m_webView makeTextLarger:(WebView*)m_webView];
+}
+
+bool wxWebViewWebKit::CanDecreaseTextSize() const
+{
+    if ( !m_webView )
+        return false;
+
+    if ([m_webView canMakeTextSmaller])
+        return true;
+    else
+        return false;
+}
+
+void wxWebViewWebKit::DecreaseTextSize()
+{
+    if ( !m_webView )
+        return;
+
+    if (CanDecreaseTextSize())
+        [m_webView makeTextSmaller:(WebView*)m_webView];
+}
+
+void wxWebViewWebKit::Print()
+{
+
+    // TODO: allow specifying the "show prompt" parameter in Print() ?
+    bool showPrompt = true;
+
+    if ( !m_webView )
+        return;
+
+    id view = [[[m_webView mainFrame] frameView] documentView];
+    NSPrintOperation *op = [NSPrintOperation printOperationWithView:view
+                                 printInfo: [NSPrintInfo sharedPrintInfo]];
+    if (showPrompt)
+    {
+        [op setShowsPrintPanel: showPrompt];
+        // in my tests, the progress bar always freezes and it stops the whole
+        // print operation. do not turn this to true unless there is a 
+        // workaround for the bug.
+        [op setShowsProgressPanel: false];
+    }
+    // Print it.
+    [op runOperation];
+}
+
+void wxWebViewWebKit::SetEditable(bool enable)
+{
+    if ( !m_webView )
+        return;
+
+    [m_webView setEditable:enable ];
+}
+
+bool wxWebViewWebKit::IsEditable() const
+{
+    if ( !m_webView )
+        return false;
+
+    return [m_webView isEditable];
+}
+
+void wxWebViewWebKit::SetZoomType(wxWebViewZoomType zoomType)
+{
+    // there is only one supported zoom type at the moment so this setter
+    // does nothing beyond checking sanity
+    wxASSERT(zoomType == wxWEB_VIEW_ZOOM_TYPE_TEXT);
+}
+
+wxWebViewZoomType wxWebViewWebKit::GetZoomType() const
+{
+    // for now that's the only one that is supported
+    // FIXME: does the default zoom type change depending on webkit versions? :S
+    //        Then this will be wrong
+    return wxWEB_VIEW_ZOOM_TYPE_TEXT;
+}
+
+bool wxWebViewWebKit::CanSetZoomType(wxWebViewZoomType type) const
+{
+    switch (type)
+    {
+        // for now that's the only one that is supported
+        // TODO: I know recent versions of webkit support layout zoom too,
+        //       check if we can support it
+        case wxWEB_VIEW_ZOOM_TYPE_TEXT:
+            return true;
+
+        default:
+            return false;
+    }
+}
+
+int wxWebViewWebKit::GetScrollPos()
+{
+    id result = [[m_webView windowScriptObject]
+                    evaluateWebScript:@"document.body.scrollTop"];
+    return [result intValue];
+}
+
+void wxWebViewWebKit::SetScrollPos(int pos)
+{
+    if ( !m_webView )
+        return;
+
+    wxString javascript;
+    javascript.Printf(wxT("document.body.scrollTop = %d;"), pos);
+    [[m_webView windowScriptObject] evaluateWebScript:
+            (NSString*)wxNSStringWithWxString( javascript )];
+}
+
+wxString wxWebViewWebKit::GetSelectedText() const
+{
+    NSString* selection = [[m_webView selectedDOMRange] markupString];
+    if (!selection) return wxEmptyString;
+
+    return wxStringWithNSString(selection);
+}
+
+void wxWebViewWebKit::RunScript(const wxString& javascript)
+{
+    if ( !m_webView )
+        return;
+
+    [[m_webView windowScriptObject] evaluateWebScript:
+                    (NSString*)wxNSStringWithWxString( javascript )];
+}
+
+void wxWebViewWebKit::OnSize(wxSizeEvent &event)
+{
+#if defined(__WXMAC_) && wxOSX_USE_CARBON
+    // This is a nasty hack because WebKit seems to lose its position when it is
+    // embedded in a control that is not itself the content view for a TLW.
+    // I put it in OnSize because these calcs are not perfect, and in fact are
+    // basically guesses based on reverse engineering, so it's best to give
+    // people the option of overriding OnSize with their own calcs if need be.
+    // I also left some test debugging print statements as a convenience if
+    // a(nother) problem crops up.
+
+    wxWindow* tlw = MacGetTopLevelWindow();
+
+    NSRect frame = [(WebView*)m_webView frame];
+    NSRect bounds = [(WebView*)m_webView bounds];
+
+#if DEBUG_WEBKIT_SIZING
+    fprintf(stderr,"Carbon window x=%d, y=%d, width=%d, height=%d\n",
+            GetPosition().x, GetPosition().y, GetSize().x, GetSize().y);
+    fprintf(stderr, "Cocoa window frame x=%G, y=%G, width=%G, height=%G\n",
+            frame.origin.x, frame.origin.y,
+            frame.size.width, frame.size.height);
+    fprintf(stderr, "Cocoa window bounds x=%G, y=%G, width=%G, height=%G\n",
+            bounds.origin.x, bounds.origin.y,
+            bounds.size.width, bounds.size.height);
+#endif
+
+    // This must be the case that Apple tested with, because well, in this one case
+    // we don't need to do anything! It just works. ;)
+    if (GetParent() == tlw) return;
+
+    // since we no longer use parent coordinates, we always want 0,0.
+    int x = 0;
+    int y = 0;
+
+    HIRect rect;
+    rect.origin.x = x;
+    rect.origin.y = y;
+
+#if DEBUG_WEBKIT_SIZING
+    printf("Before conversion, origin is: x = %d, y = %d\n", x, y);
+#endif
+
+    // NB: In most cases, when calling HIViewConvertRect, what people want is to
+    // use GetRootControl(), and this tripped me up at first. But in fact, what
+    // we want is the root view, because we need to make the y origin relative
+    // to the very top of the window, not its contents, since we later flip
+    // the y coordinate for Cocoa.
+    HIViewConvertRect (&rect, m_peer->GetControlRef(),
+                                HIViewGetRoot(
+                                    (WindowRef) MacGetTopLevelWindowRef()
+                                 ));
+
+    x = (int)rect.origin.x;
+    y = (int)rect.origin.y;
+
+#if DEBUG_WEBKIT_SIZING
+    printf("Moving Cocoa frame origin to: x = %d, y = %d\n", x, y);
+#endif
+
+    if (tlw){
+        //flip the y coordinate to convert to Cocoa coordinates
+        y = tlw->GetSize().y - ((GetSize().y) + y);
+    }
+
+#if DEBUG_WEBKIT_SIZING
+    printf("y = %d after flipping value\n", y);
+#endif
+
+    frame.origin.x = x;
+    frame.origin.y = y;
+    [(WebView*)m_webView setFrame:frame];
+
+    if (IsShown())
+        [(WebView*)m_webView display];
+    event.Skip();
+#endif
+}
+
+void wxWebViewWebKit::MacVisibilityChanged(){
+#if defined(__WXMAC__) && wxOSX_USE_CARBON
+    bool isHidden = !IsControlVisible( GetPeer()->GetControlRef());
+    if (!isHidden)
+        [(WebView*)m_webView display];
+
+    [m_webView setHidden:isHidden];
+#endif
+}
+
+void wxWebViewWebKit::LoadURL(const wxString& url)
+{
+    [[m_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:
+            [NSURL URLWithString:wxNSStringWithWxString(url)]]];
+}
+
+wxString wxWebViewWebKit::GetCurrentURL() const
+{
+    return wxStringWithNSString([m_webView mainFrameURL]);
+}
+
+wxString wxWebViewWebKit::GetCurrentTitle() const
+{
+    return wxStringWithNSString([m_webView mainFrameTitle]);
+}
+
+float wxWebViewWebKit::GetWebkitZoom() const
+{
+    return [m_webView textSizeMultiplier];
+}
+
+void wxWebViewWebKit::SetWebkitZoom(float zoom)
+{
+    [m_webView setTextSizeMultiplier:zoom];
+}
+
+wxWebViewZoom wxWebViewWebKit::GetZoom() const
+{
+    float zoom = GetWebkitZoom();
+
+    // arbitrary way to map float zoom to our common zoom enum
+    if (zoom <= 0.55)
+    {
+        return wxWEB_VIEW_ZOOM_TINY;
+    }
+    else if (zoom > 0.55 && zoom <= 0.85)
+    {
+        return wxWEB_VIEW_ZOOM_SMALL;
+    }
+    else if (zoom > 0.85 && zoom <= 1.15)
+    {
+        return wxWEB_VIEW_ZOOM_MEDIUM;
+    }
+    else if (zoom > 1.15 && zoom <= 1.45)
+    {
+        return wxWEB_VIEW_ZOOM_LARGE;
+    }
+    else if (zoom > 1.45)
+    {
+        return wxWEB_VIEW_ZOOM_LARGEST;
+    }
+
+    // to shut up compilers, this can never be reached logically
+    wxASSERT(false);
+    return wxWEB_VIEW_ZOOM_MEDIUM;
+}
+
+void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom)
+{
+    // arbitrary way to map our common zoom enum to float zoom
+    switch (zoom)
+    {
+        case wxWEB_VIEW_ZOOM_TINY:
+            SetWebkitZoom(0.4f);
+            break;
+
+        case wxWEB_VIEW_ZOOM_SMALL:
+            SetWebkitZoom(0.7f);
+            break;
+
+        case wxWEB_VIEW_ZOOM_MEDIUM:
+            SetWebkitZoom(1.0f);
+            break;
+
+        case wxWEB_VIEW_ZOOM_LARGE:
+            SetWebkitZoom(1.3);
+            break;
+
+        case wxWEB_VIEW_ZOOM_LARGEST:
+            SetWebkitZoom(1.6);
+            break;
+
+        default:
+            wxASSERT(false);
+    }
+
+}
+
+void wxWebViewWebKit::SetPage(const wxString& src, const wxString& baseUrl)
+{
+   if ( !m_webView )
+        return;
+
+    [[m_webView mainFrame] loadHTMLString:(NSString*)wxNSStringWithWxString(src)
+                                  baseURL:[NSURL URLWithString:
+                                    wxNSStringWithWxString( baseUrl )]];
+}
+
+void wxWebViewWebKit::Cut()
+{
+    if ( !m_webView )
+        return;
+
+    [(WebView*)m_webView cut:m_webView];
+}
+
+void wxWebViewWebKit::Copy()
+{
+    if ( !m_webView )
+        return;
+
+    [(WebView*)m_webView copy:m_webView];
+}
+
+void wxWebViewWebKit::Paste()
+{
+    if ( !m_webView )
+        return;
+
+    [(WebView*)m_webView paste:m_webView];
+}
+
+void wxWebViewWebKit::DeleteSelection()
+{
+    if ( !m_webView )
+        return;
+
+    [(WebView*)m_webView deleteSelection];
+}
+
+bool wxWebViewWebKit::HasSelection() const
+{
+    DOMRange* range = [m_webView selectedDOMRange];
+    if(!range)
+    {
+        return false;
+    }
+    else
+    {
+        return true;
+    }
+}
+
+void wxWebViewWebKit::ClearSelection()
+{
+    //We use javascript as selection isn't exposed at the moment in webkit
+    RunScript("window.getSelection().removeAllRanges();");
+}
+
+void wxWebViewWebKit::SelectAll()
+{
+    RunScript("window.getSelection().selectAllChildren(document.body);");
+}
+
+wxString wxWebViewWebKit::GetSelectedSource() const
+{
+    wxString script = ("var range = window.getSelection().getRangeAt(0);"
+                       "var element = document.createElement('div');"
+                       "element.appendChild(range.cloneContents());"
+                       "return element.innerHTML;");
+    id result = [[m_webView windowScriptObject]
+                   evaluateWebScript:wxNSStringWithWxString(script)];
+    return wxStringWithNSString([result stringValue]);
+}
+
+wxString wxWebViewWebKit::GetPageText() const
+{
+    id result = [[m_webView windowScriptObject]
+                 evaluateWebScript:@"document.body.textContent"];
+    return wxStringWithNSString([result stringValue]);
+}
+
+void wxWebViewWebKit::EnableHistory(bool enable)
+{
+    if ( !m_webView )
+        return;
+
+    [m_webView setMaintainsBackForwardList:enable];
+}
+
+void wxWebViewWebKit::ClearHistory()
+{
+    [m_webView setMaintainsBackForwardList:NO];
+    [m_webView setMaintainsBackForwardList:YES];
+}
+
+wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetBackwardHistory()
+{
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > backhist;
+    WebBackForwardList* history = [m_webView backForwardList];
+    int count = [history backListCount];
+    for(int i = -count; i < 0; i++)
+    {
+        WebHistoryItem* item = [history itemAtIndex:i];
+        wxString url = wxStringWithNSString([item URLString]);
+        wxString title = wxStringWithNSString([item title]);
+        wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(url, title);
+        wxitem->m_histItem = item;
+        wxSharedPtr<wxWebViewHistoryItem> itemptr(wxitem);
+        backhist.push_back(itemptr);
+    }
+    return backhist;
+}
+
+wxVector<wxSharedPtr<wxWebViewHistoryItem> > wxWebViewWebKit::GetForwardHistory()
+{
+    wxVector<wxSharedPtr<wxWebViewHistoryItem> > forwardhist;
+    WebBackForwardList* history = [m_webView backForwardList];
+    int count = [history forwardListCount];
+    for(int i = 1; i <= count; i++)
+    {
+        WebHistoryItem* item = [history itemAtIndex:i];
+        wxString url = wxStringWithNSString([item URLString]);
+        wxString title = wxStringWithNSString([item title]);
+        wxWebViewHistoryItem* wxitem = new wxWebViewHistoryItem(url, title);
+        wxitem->m_histItem = item;
+        wxSharedPtr<wxWebViewHistoryItem> itemptr(wxitem);
+        forwardhist.push_back(itemptr);
+    }
+    return forwardhist;
+}
+
+void wxWebViewWebKit::LoadHistoryItem(wxSharedPtr<wxWebViewHistoryItem> item)
+{
+    [m_webView goToBackForwardItem:item->m_histItem];
+}
+
+bool wxWebViewWebKit::CanUndo() const
+{
+    return [[m_webView undoManager] canUndo];
+}
+
+bool wxWebViewWebKit::CanRedo() const
+{
+    return [[m_webView undoManager] canRedo];
+}
+
+void wxWebViewWebKit::Undo()
+{
+    [[m_webView undoManager] undo];
+}
+
+void wxWebViewWebKit::Redo()
+{
+    [[m_webView undoManager] redo];
+}
+
+void wxWebViewWebKit::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
+{
+    g_stringHandlerMap[handler->GetName()] = handler;
+}
+
+//------------------------------------------------------------
+// Listener interfaces
+//------------------------------------------------------------
+
+// NB: I'm still tracking this down, but it appears the Cocoa window
+// still has these events fired on it while the Carbon control is being
+// destroyed. Therefore, we must be careful to check both the existence
+// of the Carbon control and the event handler before firing events.
+
+@implementation WebViewLoadDelegate
+
+- initWithWxWindow: (wxWebViewWebKit*)inWindow
+{
+    [super init];
+    webKitWindow = inWindow;    // non retained
+    return self;
+}
+
+- (void)webView:(WebView *)sender
+    didStartProvisionalLoadForFrame:(WebFrame *)frame
+{
+    webKitWindow->m_busy = true;
+}
+
+- (void)webView:(WebView *)sender didCommitLoadForFrame:(WebFrame *)frame
+{
+    webKitWindow->m_busy = true;
+
+    if (webKitWindow && frame == [sender mainFrame]){
+        NSString *url = [[[[frame dataSource] request] URL] absoluteString];
+        wxString target = wxStringWithNSString([frame name]);
+        wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATED,
+                             webKitWindow->GetId(),
+                             wxStringWithNSString( url ),
+                             target);
+
+        if (webKitWindow && webKitWindow->GetEventHandler())
+            webKitWindow->GetEventHandler()->ProcessEvent(event);
+    }
+}
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+    webKitWindow->m_busy = false;
+
+    if (webKitWindow && frame == [sender mainFrame]){
+        NSString *url = [[[[frame dataSource] request] URL] absoluteString];
+
+        wxString target = wxStringWithNSString([frame name]);
+        wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_LOADED,
+                             webKitWindow->GetId(),
+                             wxStringWithNSString( url ),
+                             target);
+
+        if (webKitWindow && webKitWindow->GetEventHandler())
+            webKitWindow->GetEventHandler()->ProcessEvent(event);
+    }
+}
+
+wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out)
+{
+    *out = wxWEB_NAV_ERR_OTHER;
+
+    if ([[error domain] isEqualToString:NSURLErrorDomain])
+    {
+        switch ([error code])
+        {
+            case NSURLErrorCannotFindHost:
+            case NSURLErrorFileDoesNotExist:
+            case NSURLErrorRedirectToNonExistentLocation:
+                *out = wxWEB_NAV_ERR_NOT_FOUND;
+                break;
+
+            case NSURLErrorResourceUnavailable:
+            case NSURLErrorHTTPTooManyRedirects:
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+            case NSURLErrorDataLengthExceedsMaximum:
+#endif
+            case NSURLErrorBadURL:
+            case NSURLErrorFileIsDirectory:
+                *out = wxWEB_NAV_ERR_REQUEST;
+                break;
+
+            case NSURLErrorTimedOut:
+            case NSURLErrorDNSLookupFailed:
+            case NSURLErrorNetworkConnectionLost:
+            case NSURLErrorCannotConnectToHost:
+            case NSURLErrorNotConnectedToInternet:
+            //case NSURLErrorInternationalRoamingOff:
+            //case NSURLErrorCallIsActive:
+            //case NSURLErrorDataNotAllowed:
+                *out = wxWEB_NAV_ERR_CONNECTION;
+                break;
+
+            case NSURLErrorCancelled:
+            case NSURLErrorUserCancelledAuthentication:
+                *out = wxWEB_NAV_ERR_USER_CANCELLED;
+                break;
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5                
+            case NSURLErrorCannotDecodeRawData:
+            case NSURLErrorCannotDecodeContentData:
+            case NSURLErrorCannotParseResponse:
+#endif
+            case NSURLErrorBadServerResponse:
+                *out = wxWEB_NAV_ERR_REQUEST;
+                break;
+
+            case NSURLErrorUserAuthenticationRequired:
+            case NSURLErrorSecureConnectionFailed:
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+            case NSURLErrorClientCertificateRequired:
+#endif
+                *out = wxWEB_NAV_ERR_AUTH;
+                break;
+
+            case NSURLErrorNoPermissionsToReadFile:
+                               *out = wxWEB_NAV_ERR_SECURITY;
+                break;
+
+            case NSURLErrorServerCertificateHasBadDate:
+            case NSURLErrorServerCertificateUntrusted:
+            case NSURLErrorServerCertificateHasUnknownRoot:
+            case NSURLErrorServerCertificateNotYetValid:
+            case NSURLErrorClientCertificateRejected:
+                *out = wxWEB_NAV_ERR_CERTIFICATE;
+                break;
+        }
+    }
+
+    wxString message = wxStringWithNSString([error localizedDescription]);
+    NSString* detail = [error localizedFailureReason];
+    if (detail != NULL)
+    {
+        message = message + " (" + wxStringWithNSString(detail) + ")";
+    }
+    return message;
+}
+
+- (void)webView:(WebView *)sender didFailLoadWithError:(NSError*) error
+        forFrame:(WebFrame *)frame
+{
+    webKitWindow->m_busy = false;
+
+    if (webKitWindow && frame == [sender mainFrame]){
+        NSString *url = [[[[frame dataSource] request] URL] absoluteString];
+
+        wxWebViewNavigationError type;
+        wxString description = nsErrorToWxHtmlError(error, &type);
+               wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_ERROR,
+                                    webKitWindow->GetId(),
+                             wxStringWithNSString( url ),
+                             wxEmptyString);
+               event.SetString(description);
+               event.SetInt(type);
+
+               if (webKitWindow && webKitWindow->GetEventHandler())
+               {
+                       webKitWindow->GetEventHandler()->ProcessEvent(event);
+               }
+    }
+}
+
+- (void)webView:(WebView *)sender
+        didFailProvisionalLoadWithError:(NSError*)error
+                               forFrame:(WebFrame *)frame
+{
+    webKitWindow->m_busy = false;
+
+    if (webKitWindow && frame == [sender mainFrame]){
+        NSString *url = [[[[frame provisionalDataSource] request] URL]
+                            absoluteString];
+
+               wxWebViewNavigationError type;
+        wxString description = nsErrorToWxHtmlError(error, &type);
+               wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_ERROR,
+                                    webKitWindow->GetId(),
+                             wxStringWithNSString( url ),
+                             wxEmptyString);
+               event.SetString(description);
+               event.SetInt(type);
+
+               if (webKitWindow && webKitWindow->GetEventHandler())
+                       webKitWindow->GetEventHandler()->ProcessEvent(event);
+    }
+}
+
+- (void)webView:(WebView *)sender didReceiveTitle:(NSString *)title
+                                         forFrame:(WebFrame *)frame
+{
+    wxString target = wxStringWithNSString([frame name]);
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED,
+                         webKitWindow->GetId(),
+                         webKitWindow->GetCurrentURL(),
+                         target);
+                                   
+    event.SetString(wxStringWithNSString(title));
+
+    if (webKitWindow && webKitWindow->GetEventHandler())
+        webKitWindow->GetEventHandler()->ProcessEvent(event);
+}
+@end
+
+@implementation WebViewPolicyDelegate
+
+- initWithWxWindow: (wxWebViewWebKit*)inWindow
+{
+    [super init];
+    webKitWindow = inWindow;    // non retained
+    return self;
+}
+
+- (void)webView:(WebView *)sender
+        decidePolicyForNavigationAction:(NSDictionary *)actionInformation
+                                request:(NSURLRequest *)request
+                                  frame:(WebFrame *)frame
+                       decisionListener:(id<WebPolicyDecisionListener>)listener
+{
+    wxUnusedVar(frame);
+
+    webKitWindow->m_busy = true;
+    NSString *url = [[request URL] absoluteString];
+    wxString target = wxStringWithNSString([frame name]);
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATING,
+                         webKitWindow->GetId(),
+                         wxStringWithNSString( url ), target);
+
+    if (webKitWindow && webKitWindow->GetEventHandler())
+        webKitWindow->GetEventHandler()->ProcessEvent(event);
+
+    if (!event.IsAllowed())
+    {
+        webKitWindow->m_busy = false;
+        [listener ignore];
+    }
+    else
+    {
+        [listener use];
+    }
+}
+
+- (void)webView:(WebView *)sender 
+      decidePolicyForNewWindowAction:(NSDictionary *)actionInformation
+                             request:(NSURLRequest *)request
+                        newFrameName:(NSString *)frameName
+                    decisionListener:(id < WebPolicyDecisionListener >)listener
+{
+    wxUnusedVar(actionInformation);
+
+    NSString *url = [[request URL] absoluteString];
+    wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
+                         webKitWindow->GetId(),
+                         wxStringWithNSString( url ), "");
+
+    if (webKitWindow && webKitWindow->GetEventHandler())
+        webKitWindow->GetEventHandler()->ProcessEvent(event);
+
+    [listener ignore];
+}
+@end
+
+@implementation WebViewCustomProtocol
+
++ (BOOL)canInitWithRequest:(NSURLRequest *)request
+{
+    NSString *scheme = [[request URL] scheme];
+
+    wxStringToWebHandlerMap::const_iterator it;
+    for( it = g_stringHandlerMap.begin(); it != g_stringHandlerMap.end(); ++it )
+    {
+        if(it->first.IsSameAs(wxStringWithNSString(scheme)))
+        {
+            return YES;
+        }
+    }
+
+       return NO;
+}
+
++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
+{
+    //We don't do any processing here as the wxWebViewHandler classes do it
+    return request;
+}
+
+- (void)startLoading
+{
+    NSURLRequest *request = [self request];
+       NSString* path = [[request URL] absoluteString];
+
+    wxString wxpath = wxStringWithNSString(path);
+    wxString scheme = wxStringWithNSString([[request URL] scheme]);
+    wxFSFile* file = g_stringHandlerMap[scheme]->GetFile(wxpath);
+    size_t length = file->GetStream()->GetLength();
+
+
+    NSURLResponse *response =  [[NSURLResponse alloc] initWithURL:[request URL]
+                                          MIMEType:wxNSStringWithWxString(file->GetMimeType())
+                                          expectedContentLength:length 
+                                          textEncodingName:nil];
+    
+    //Load the data, we malloc it so it is tidied up properly
+    void* buffer = malloc(length);
+    file->GetStream()->Read(buffer, length);
+    NSData *data = [[NSData alloc] initWithBytesNoCopy:buffer length:length];
+    
+    id<NSURLProtocolClient> client = [self client];
+
+    //We do not support caching anything yet
+       [client URLProtocol:self didReceiveResponse:response 
+            cacheStoragePolicy:NSURLCacheStorageNotAllowed];
+
+    //Set the data
+       [client URLProtocol:self didLoadData:data];
+
+       //Notify that we have finished
+       [client URLProtocolDidFinishLoading:self];
+
+       [response release];
+}
+
+- (void)stopLoading
+{
+
+}
+
+@end
+
+#endif //wxUSE_WEBVIEW_WEBKIT
diff --git a/tests/controls/webtest.cpp b/tests/controls/webtest.cpp
new file mode 100644 (file)
index 0000000..0d6bbc5
--- /dev/null
@@ -0,0 +1,247 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        tests/controls/webtest.cpp
+// Purpose:     wxWebView unit test
+// Author:      Steven Lamerton
+// Created:     2011-07-08
+// RCS-ID:      $Id$
+// Copyright:   (c) 2011 Steven Lamerton
+///////////////////////////////////////////////////////////////////////////////
+
+#include "testprec.h"
+
+#if wxUSE_WEBVIEW
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+#endif // WX_PRECOMP
+
+#include "testableframe.h"
+#include "wx/uiaction.h"
+#include "wx/webview.h"
+#include "asserthelper.h"
+
+class WebTestCase : public CppUnit::TestCase
+{
+public:
+    WebTestCase() { }
+
+    void setUp();
+    void tearDown();
+
+private:
+    CPPUNIT_TEST_SUITE( WebTestCase );
+        CPPUNIT_TEST( Title );
+        CPPUNIT_TEST( Url );
+        CPPUNIT_TEST( History );
+        CPPUNIT_TEST( HistoryEnable );
+        CPPUNIT_TEST( HistoryClear );
+        CPPUNIT_TEST( HistoryList );
+        CPPUNIT_TEST( Editable );
+        CPPUNIT_TEST( Selection );
+        CPPUNIT_TEST( Zoom );
+        CPPUNIT_TEST( RunScript );
+    CPPUNIT_TEST_SUITE_END();
+
+    void Title();
+    void Url();
+    void History();
+    void HistoryEnable();
+    void HistoryClear();
+    void HistoryList();
+    void Editable();
+    void Selection();
+    void Zoom();
+    void RunScript();
+    void LoadUrl(int times = 1);
+
+    wxWebView* m_browser;
+
+    DECLARE_NO_COPY_CLASS(WebTestCase)
+};
+
+// register in the unnamed registry so that these tests are run by default
+CPPUNIT_TEST_SUITE_REGISTRATION( WebTestCase );
+
+// also include in its own registry so that these tests can be run alone
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( WebTestCase, "WebTestCase" );
+
+void WebTestCase::setUp()
+{
+    m_browser = wxWebView::New(wxTheApp->GetTopWindow(), wxID_ANY);
+    //We yield to let the initial page load
+    wxYield();
+}
+
+void WebTestCase::tearDown()
+{
+    wxDELETE(m_browser);
+}
+
+void WebTestCase::LoadUrl(int times)
+{
+    //We alternate between urls as otherwise webkit merges them in the history
+    //we use about and about blank to avoid the need for a network connection
+    for(int i = 0; i < times; i++)
+    {
+        if(i % 2 == 1)
+            m_browser->LoadUrl("about:blank");
+        else
+            m_browser->LoadUrl("about:");
+        wxYield();
+    }
+}
+
+void WebTestCase::Title()
+{
+    CPPUNIT_ASSERT_EQUAL("", m_browser->GetCurrentTitle());
+
+    //Test title after loading raw html
+    m_browser->SetPage("<html><title>Title</title><body>Text</body></html>", "");
+    wxYield();
+    CPPUNIT_ASSERT_EQUAL("Title", m_browser->GetCurrentTitle());
+
+    //Test title after loading a url, we yield to let events process
+    LoadUrl();
+    CPPUNIT_ASSERT_EQUAL("", m_browser->GetCurrentTitle());
+}
+
+void WebTestCase::Url()
+{
+    CPPUNIT_ASSERT_EQUAL("about:blank", m_browser->GetCurrentURL());
+
+    //After first loading about:blank the next in the sequence is about:
+    LoadUrl();
+    CPPUNIT_ASSERT_EQUAL("about:", m_browser->GetCurrentURL());
+}
+
+void WebTestCase::History()
+{
+    LoadUrl(3);
+
+    CPPUNIT_ASSERT(m_browser->CanGoBack());
+    CPPUNIT_ASSERT(!m_browser->CanGoForward());
+
+    m_browser->GoBack();
+
+    CPPUNIT_ASSERT(m_browser->CanGoBack());
+    CPPUNIT_ASSERT(m_browser->CanGoForward());
+
+    m_browser->GoBack();
+    m_browser->GoBack();
+
+    //We should now be at the start of the history
+    CPPUNIT_ASSERT(!m_browser->CanGoBack());
+    CPPUNIT_ASSERT(m_browser->CanGoForward());
+}
+
+void WebTestCase::HistoryEnable()
+{
+    LoadUrl();
+    m_browser->EnableHistory(false);
+
+    CPPUNIT_ASSERT(!m_browser->CanGoForward());
+    CPPUNIT_ASSERT(!m_browser->CanGoBack());
+
+    LoadUrl();
+
+    CPPUNIT_ASSERT(!m_browser->CanGoForward());
+    CPPUNIT_ASSERT(!m_browser->CanGoBack());
+}
+
+void WebTestCase::HistoryClear()
+{
+    LoadUrl(2);
+
+    //Now we are in the 'middle' of the history
+    m_browser->GoBack();
+    wxYield();
+
+    CPPUNIT_ASSERT(m_browser->CanGoForward());
+    CPPUNIT_ASSERT(m_browser->CanGoBack());
+
+    m_browser->ClearHistory();
+
+    CPPUNIT_ASSERT(!m_browser->CanGoForward());
+    CPPUNIT_ASSERT(!m_browser->CanGoBack());
+}
+
+void WebTestCase::HistoryList()
+{
+    LoadUrl(2);
+    m_browser->GoBack();
+
+    CPPUNIT_ASSERT_EQUAL(1, m_browser->GetBackwardHistory().size());
+    CPPUNIT_ASSERT_EQUAL(1, m_browser->GetForwardHistory().size());
+
+    m_browser->LoadHistoryItem(m_browser->GetForwardHistory()[0]);
+
+    CPPUNIT_ASSERT(!m_browser->CanGoForward());
+    CPPUNIT_ASSERT_EQUAL(2, m_browser->GetBackwardHistory().size());
+}
+
+void WebTestCase::Editable()
+{
+    CPPUNIT_ASSERT(!m_browser->IsEditable());
+
+    m_browser->SetEditable(true);
+
+    CPPUNIT_ASSERT(m_browser->IsEditable());
+
+    m_browser->SetEditable(false);
+
+    CPPUNIT_ASSERT(!m_browser->IsEditable());
+}
+
+void WebTestCase::Selection()
+{
+    m_browser->SetPage("<html><body>Some <strong>strong</strong> text</body></html>", "");
+    wxYield();
+    CPPUNIT_ASSERT(!m_browser->HasSelection());
+
+    m_browser->SelectAll();
+
+    CPPUNIT_ASSERT(m_browser->HasSelection());
+    CPPUNIT_ASSERT_EQUAL("Some strong text", m_browser->GetSelectedText());
+    //We lower case the result as ie returns tags in uppercase
+    CPPUNIT_ASSERT_EQUAL("some <strong>strong</strong> text", 
+                         m_browser->GetSelectedSource().Lower());
+
+    m_browser->ClearSelection();
+    CPPUNIT_ASSERT(!m_browser->HasSelection());  
+}
+
+void WebTestCase::Zoom()
+{
+    if(m_browser->CanSetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT))
+    {
+        m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_LAYOUT);
+        CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TYPE_LAYOUT, m_browser->GetZoomType());
+
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_TINY);
+        CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TINY, m_browser->GetZoom());
+    }
+
+    //Reset the zoom level
+    m_browser->SetZoom(wxWEB_VIEW_ZOOM_MEDIUM);
+
+    if(m_browser->CanSetZoomType(wxWEB_VIEW_ZOOM_TYPE_TEXT))
+    {
+        m_browser->SetZoomType(wxWEB_VIEW_ZOOM_TYPE_TEXT);
+        CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TYPE_TEXT, m_browser->GetZoomType());
+
+        m_browser->SetZoom(wxWEB_VIEW_ZOOM_TINY);
+        CPPUNIT_ASSERT_EQUAL(wxWEB_VIEW_ZOOM_TINY, m_browser->GetZoom());
+    }
+}
+
+void WebTestCase::RunScript()
+{
+    m_browser->RunScript("document.write(\"Hello World!\");");
+    CPPUNIT_ASSERT_EQUAL("Hello World!", m_browser->GetPageText());
+}
+
+#endif //wxUSE_WEBVIEW
index 75403f58ae291c0cf21c89c741fb10d699376747..a35147fddd442d44e4e7d657c587a76446c1d1f7 100644 (file)
             controls/treectrltest.cpp
             controls/treelistctrltest.cpp
             controls/virtlistctrltest.cpp
+            controls/webtest.cpp
             controls/windowtest.cpp
             events/clone.cpp
             events/propagation.cpp
             window/setsize.cpp
             xml/xrctest.cpp
         </sources>
+        <wx-lib>webview</wx-lib>
         <wx-lib>richtext</wx-lib>
         <wx-lib>media</wx-lib>
         <wx-lib>xrc</wx-lib>