Now its possible to run wxHTML without wxSockets
if wxUSE_FS_ZIP = 1, wxUSE_HTML = 1 Fixed typo in filelist Compile fix for spinbutton, git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7e1e096097
commit
8a4df1595b
@ -314,7 +314,7 @@ mod_fonts.cpp H
|
||||
mod_hline.cpp H
|
||||
mod_image.cpp H
|
||||
mod_layout.cpp H
|
||||
mod_links.cpp H
|
||||
mod_links.cpp H
|
||||
mod_list.cpp H
|
||||
mod_pre.cpp H
|
||||
mod_tables.cpp H
|
||||
|
@ -45,6 +45,12 @@
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"WXMSWOBJS"} .= '$(MSWDIR)/' . $file . " "
|
||||
}
|
||||
|
||||
foreach $file (sort keys %wxHTML) {
|
||||
$file =~ s/cp?p?$/\$(OBJSUFF)/;
|
||||
$project{"WXHTMLOBJS"} .= '$(HTMLDIR)/' . $file . " "
|
||||
}
|
||||
|
||||
#$}
|
||||
# This file was automatically generated by tmake at #$ Now()
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
|
||||
|
@ -29,6 +29,8 @@ limitation)
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
|
||||
|
||||
#ifndef WXPRECOMP
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
@ -52,4 +54,6 @@ class wxInternetFSHandler : public wxFileSystemHandler
|
||||
~wxInternetFSHandler();
|
||||
};
|
||||
|
||||
#endif
|
||||
// wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
|
||||
|
||||
|
@ -17,6 +17,9 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_FS_ZIP && wxUSE_STREAMS
|
||||
|
||||
|
||||
#ifndef WXPRECOMP
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
@ -38,4 +41,6 @@ class wxZipFSHandler : public wxFileSystemHandler
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
// wxUSE_FS_ZIP && wxUSE_STREAMS
|
||||
|
||||
|
@ -17,12 +17,14 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/stream.h"
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
#include "wx/socket.h"
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
wxPROTO_NOERR = 0,
|
||||
@ -61,14 +63,21 @@ public:
|
||||
wxClassInfo *info);
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxProtocol : public wxSocketClient {
|
||||
class WXDLLEXPORT wxProtocol
|
||||
#if wxUSE_SOCKETS
|
||||
: public wxSocketClient {
|
||||
#else
|
||||
: public wxObject {
|
||||
#endif
|
||||
DECLARE_ABSTRACT_CLASS(wxProtocol)
|
||||
public:
|
||||
wxProtocol();
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
bool Reconnect();
|
||||
virtual bool Connect( const wxString& WXUNUSED(host) ) { return FALSE; }
|
||||
virtual bool Connect( wxSockAddress& addr, bool WXUNUSED(wait) = TRUE) { return wxSocketClient::Connect(addr); }
|
||||
#endif
|
||||
|
||||
virtual bool Abort() = 0;
|
||||
virtual wxInputStream *GetInputStream(const wxString& path) = 0;
|
||||
@ -78,8 +87,8 @@ public:
|
||||
virtual void SetPassword(const wxString& WXUNUSED(passwd) ) {}
|
||||
};
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
wxProtocolError WXDLLEXPORT GetLine(wxSocketBase *sock, wxString& result);
|
||||
|
||||
#endif // wxUSE_SOCKETS
|
||||
#endif
|
||||
|
||||
#endif // _WX_PROTOCOL_PROTOCOL_H
|
||||
|
@ -20,7 +20,10 @@
|
||||
|
||||
// wxSocket headers
|
||||
#include "wx/protocol/protocol.h"
|
||||
#include "wx/protocol/http.h"
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
#include "wx/protocol/http.h"
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
wxURL_NOERR = 0,
|
||||
@ -36,10 +39,14 @@ class WXDLLEXPORT wxURL : public wxObject {
|
||||
DECLARE_DYNAMIC_CLASS(wxURL)
|
||||
protected:
|
||||
static wxProtoInfo *g_protocols;
|
||||
#if wxUSE_SOCKETS
|
||||
static wxHTTP *g_proxy;
|
||||
#endif
|
||||
wxProtoInfo *m_protoinfo;
|
||||
wxProtocol *m_protocol;
|
||||
#if wxUSE_SOCKETS
|
||||
wxHTTP *m_proxy;
|
||||
#endif
|
||||
wxURLError m_error;
|
||||
wxString m_protoname, m_hostname, m_servname, m_path, m_url;
|
||||
wxString m_user, m_password;
|
||||
@ -69,8 +76,10 @@ public:
|
||||
|
||||
wxInputStream *GetInputStream();
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
static void SetDefaultProxy(const wxString& url_proxy);
|
||||
void SetProxy(const wxString& url_proxy);
|
||||
#endif
|
||||
|
||||
static wxString ConvertToValidURI(const wxString& uri);
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
# Makefile for wxWindows sample (Cygwin/Mingw32).
|
||||
|
||||
WXDIR = $(WXWIN)
|
||||
WXDIR = ../../..
|
||||
|
||||
TARGET=about
|
||||
OBJECTS = $(TARGET).o
|
||||
|
@ -17,9 +17,7 @@
|
||||
#endif
|
||||
|
||||
#if !wxUSE_SOCKETS
|
||||
#undef wxUSE_FS_ZIP
|
||||
#undef wxUSE_FS_INET
|
||||
#define wxUSE_FS_ZIP 0
|
||||
#define wxUSE_FS_INET 0
|
||||
#endif
|
||||
|
||||
|
@ -17,11 +17,6 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if !wxUSE_SOCKETS
|
||||
#undef wxUSE_FS_ZIP
|
||||
#define wxUSE_FS_ZIP 0
|
||||
#endif
|
||||
|
||||
#if wxUSE_FS_ZIP
|
||||
|
||||
#ifndef WXPRECOMP
|
||||
|
@ -20,8 +20,6 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include "wx/protocol/protocol.h"
|
||||
#include "wx/url.h"
|
||||
#include "wx/module.h"
|
||||
@ -53,13 +51,20 @@ wxProtoInfo::wxProtoInfo(const wxChar *name, const wxChar *serv,
|
||||
// wxProtocol ///////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxProtocol, wxSocketClient)
|
||||
#else
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxProtocol, wxObject)
|
||||
#endif
|
||||
|
||||
wxProtocol::wxProtocol()
|
||||
#if wxUSE_SOCKETS
|
||||
: wxSocketClient()
|
||||
#endif
|
||||
{
|
||||
}
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
bool wxProtocol::Reconnect()
|
||||
{
|
||||
wxIPV4address addr;
|
||||
@ -109,6 +114,7 @@ wxProtocolError GetLine(wxSocketBase *sock, wxString& result) {
|
||||
return wxPROTO_NOERR;
|
||||
#undef PROTO_BSIZE
|
||||
}
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// Module
|
||||
@ -128,6 +134,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxProtocolModule, wxModule)
|
||||
|
||||
bool wxProtocolModule::OnInit()
|
||||
{
|
||||
#if wxUSE_SOCKETS
|
||||
char *env_http_prox;
|
||||
|
||||
wxURL::g_proxy = NULL;
|
||||
@ -135,16 +142,17 @@ bool wxProtocolModule::OnInit()
|
||||
env_http_prox = getenv("HTTP_PROXY");
|
||||
if (env_http_prox)
|
||||
wxURL::SetDefaultProxy(env_http_prox);
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void wxProtocolModule::OnExit()
|
||||
{
|
||||
#if wxUSE_SOCKETS
|
||||
if (wxURL::g_proxy)
|
||||
delete wxURL::g_proxy;
|
||||
wxURL::g_proxy = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_SOCKETS
|
||||
|
@ -23,8 +23,6 @@
|
||||
#include "wx/defs.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include <stdio.h>
|
||||
#include <wx/wfstream.h>
|
||||
#include <wx/protocol/file.h>
|
||||
@ -48,5 +46,3 @@ wxInputStream *wxFileProto::GetInputStream(const wxString& path)
|
||||
return new wxFileInputStream(path);
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_SOCKETS
|
||||
|
@ -20,8 +20,6 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@ -37,7 +35,10 @@ IMPLEMENT_CLASS(wxURL, wxObject)
|
||||
|
||||
// Protocols list
|
||||
wxProtoInfo *wxURL::g_protocols = NULL;
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
wxHTTP *wxURL::g_proxy = NULL;
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------
|
||||
// wxURL
|
||||
@ -52,8 +53,10 @@ wxURL::wxURL(const wxString& url)
|
||||
m_protocol = NULL;
|
||||
m_error = wxURL_NOERR;
|
||||
m_url = url;
|
||||
#if wxUSE_SOCKETS
|
||||
m_useProxy = (g_proxy != NULL);
|
||||
m_proxy = g_proxy;
|
||||
#endif
|
||||
ParseURL();
|
||||
}
|
||||
|
||||
@ -96,6 +99,7 @@ bool wxURL::ParseURL()
|
||||
}
|
||||
// URL parse finished.
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
if (m_useProxy) {
|
||||
// We destroy the newly created protocol.
|
||||
CleanData();
|
||||
@ -110,6 +114,7 @@ bool wxURL::ParseURL()
|
||||
// We initialize specific variables.
|
||||
m_protocol = m_proxy; // FIXME: we should clone the protocol
|
||||
}
|
||||
#endif
|
||||
|
||||
m_error = wxURL_NOERR;
|
||||
return TRUE;
|
||||
@ -117,15 +122,19 @@ bool wxURL::ParseURL()
|
||||
|
||||
void wxURL::CleanData()
|
||||
{
|
||||
#if wxUSE_SOCKETS
|
||||
if (!m_useProxy)
|
||||
#endif
|
||||
delete m_protocol;
|
||||
}
|
||||
|
||||
wxURL::~wxURL()
|
||||
{
|
||||
CleanData();
|
||||
#if wxUSE_SOCKETS
|
||||
if (m_proxy && m_proxy != g_proxy)
|
||||
delete m_proxy;
|
||||
#endif
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
@ -233,7 +242,6 @@ bool wxURL::FetchProtocol()
|
||||
|
||||
wxInputStream *wxURL::GetInputStream(void)
|
||||
{
|
||||
wxIPV4address addr;
|
||||
wxInputStream *the_i_stream = NULL;
|
||||
|
||||
if (!m_protocol) {
|
||||
@ -247,6 +255,7 @@ wxInputStream *wxURL::GetInputStream(void)
|
||||
m_protocol->SetPassword(m_password);
|
||||
}
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
// m_protoinfo is NULL when we use a proxy
|
||||
if (!m_useProxy && m_protoinfo->m_needhost) {
|
||||
if (!addr.Hostname(m_hostname)) {
|
||||
@ -254,6 +263,7 @@ wxInputStream *wxURL::GetInputStream(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
wxIPV4address addr;
|
||||
addr.Service(m_servname);
|
||||
|
||||
if (!m_protocol->Connect(addr, TRUE)) // Watcom needs the 2nd arg for some reason
|
||||
@ -262,6 +272,7 @@ wxInputStream *wxURL::GetInputStream(void)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// When we use a proxy, we have to pass the whole URL to it.
|
||||
if (m_useProxy)
|
||||
@ -277,6 +288,7 @@ wxInputStream *wxURL::GetInputStream(void)
|
||||
return the_i_stream;
|
||||
}
|
||||
|
||||
#if wxUSE_SOCKETS
|
||||
void wxURL::SetDefaultProxy(const wxString& url_proxy)
|
||||
{
|
||||
if (url_proxy.IsNull()) {
|
||||
@ -347,6 +359,7 @@ void wxURL::SetProxy(const wxString& url_proxy)
|
||||
m_useProxy = TRUE;
|
||||
ParseURL();
|
||||
}
|
||||
#endif
|
||||
|
||||
wxString wxURL::ConvertToValidURI(const wxString& uri)
|
||||
{
|
||||
@ -371,5 +384,3 @@ wxString wxURL::ConvertToValidURI(const wxString& uri)
|
||||
return out_str;
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_SOCKETS
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
# This file was automatically generated by tmake at 03:16, 1999/07/29
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GNU.T!
|
||||
# This file was automatically generated by tmake at 21:49, 1999/07/29
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
|
||||
|
||||
#
|
||||
# File: makefile.gnu
|
||||
# File: Makefile
|
||||
# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
|
||||
# Created: 1993
|
||||
# Updated: 1999
|
||||
@ -148,7 +148,7 @@ HTMLOBJS = \
|
||||
$(HTMLDIR)/mod_hline.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_image.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_layout.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_links.cpp \
|
||||
$(HTMLDIR)/mod_links.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_list.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_pre.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_tables.$(OBJSUFF) \
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
# This file was automatically generated by tmake at 03:16, 1999/07/29
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GNU.T!
|
||||
# This file was automatically generated by tmake at 21:49, 1999/07/29
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
|
||||
|
||||
#
|
||||
# File: makefile.gnu
|
||||
# File: Makefile
|
||||
# Author: Julian Smart, Robert Roebling, Vadim Zeitlin
|
||||
# Created: 1993
|
||||
# Updated: 1999
|
||||
@ -148,7 +148,7 @@ HTMLOBJS = \
|
||||
$(HTMLDIR)/mod_hline.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_image.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_layout.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_links.cpp \
|
||||
$(HTMLDIR)/mod_links.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_list.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_pre.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_tables.$(OBJSUFF) \
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "wx/button.h"
|
||||
#include "wx/brush.h"
|
||||
#include "wx/panel.h"
|
||||
#include "wx/bmpbuttn.h"
|
||||
#endif
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
@ -186,7 +186,7 @@ void* wxChoice::DoGetClientData( int n ) const
|
||||
wxLogLastError(_T("CB_GETITEMDATA"));
|
||||
|
||||
// unfortunately, there is no way to return an error code to the user
|
||||
rc = NULL;
|
||||
rc = (LPARAM) NULL;
|
||||
}
|
||||
|
||||
return (void *)rc;
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
# This file was automatically generated by tmake at 02:15, 1999/07/29
|
||||
# This file was automatically generated by tmake at 21:49, 1999/07/29
|
||||
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
|
||||
|
||||
#
|
||||
@ -138,6 +138,23 @@ COMMONOBJS = \
|
||||
$(COMMDIR)/zstream.$(OBJSUFF)
|
||||
|
||||
HTMLOBJS = \
|
||||
$(HTMLDIR)/htmlcell.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmlfilter.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmlhelp.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmlhelp_io.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmlparser.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmltag.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmlwin.$(OBJSUFF) \
|
||||
$(HTMLDIR)/htmlwinparser.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_fonts.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_hline.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_image.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_layout.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_links.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_list.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_pre.$(OBJSUFF) \
|
||||
$(HTMLDIR)/mod_tables.$(OBJSUFF) \
|
||||
$(HTMLDIR)/search.$(OBJSUFF)
|
||||
|
||||
MSWOBJS = \
|
||||
$(MSWDIR)/accel.$(OBJSUFF) \
|
||||
|
@ -150,6 +150,7 @@ bool wxSpinButton::MSWOnScroll(int orientation, WXWORD wParam,
|
||||
|
||||
bool wxSpinButton::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
{
|
||||
#ifndef __GNUWIN32__
|
||||
LPNMUPDOWN lpnmud = (LPNMUPDOWN)lParam;
|
||||
|
||||
wxSpinEvent event(lpnmud->iDelta > 0 ? wxEVT_SCROLL_LINEUP
|
||||
@ -163,6 +164,9 @@ bool wxSpinButton::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
*result = event.IsAllowed() ? 0 : 1;
|
||||
|
||||
return processed;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxSpinButton::MSWCommand(WXUINT cmd, WXWORD id)
|
||||
|
Loading…
Reference in New Issue
Block a user