Commit Graph

70 Commits

Author SHA1 Message Date
Vadim Zeitlin
c0c133e13b add wx-prefixed and semicolon-requiring versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-08 11:45:59 +00:00
Francesco Montorsi
87315ea262 fix a couple of typos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 11:11:33 +00:00
Francesco Montorsi
94a007ece4 a few more int/wxPolygonFillMode substitutions in wxRegion and wxGraphicsContext code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-08 16:43:56 +00:00
Jouk Jansen
4d8988f7b1 insert missing include file for OpenVMS platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-07 20:37:16 +00:00
Vadim Zeitlin
a12698abb7 added wxFDIODispatcher::HasPending() and implemented correctly wxConsoleEventLoop::Pending() using it to fix the pending events processing in console event loop based programs; also changed wxFDIODispatcher::Dispatch() return type/value to be able to indicate the errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-03 01:21:24 +00:00
Vadim Zeitlin
df21920b80 disable the events when we get a notification about socket being ready for IO and reenable them later after performing the IO in the Unix version to avoid continuous flood of ready notifications
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-02 21:53:30 +00:00
Vadim Zeitlin
c363ead1e2 remove wxSOCKET_MAX_EVENT, it is not really necessary and results in gcc warnings about unhandled enum value in switch in existing code (including our own sample)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-30 00:11:04 +00:00
Vadim Zeitlin
67badd5753 build fixes for wxUSE_IPV6==1 under Windows
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-29 14:51:49 +00:00
Vadim Zeitlin
c9bccf239c replaced unweildy GAddress functions with wxSockAddressImpl class, similarly to GSocket -> wxSocketImpl transition; share more code between IPv4 and IPv6 branches
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-29 14:35:48 +00:00
Vadim Zeitlin
14372de82e move Read/Write() to common code, there was almost nothing platform-specific in it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 22:49:46 +00:00
Vadim Zeitlin
62088a3c3b wxSocketImpl::Shutdown() doesn't need to be virtual, its implementation can the same in Unix and Win32 versions (events are already disabled by Close() so there is no need to do it again explicitly under Unix)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 22:03:34 +00:00
Vadim Zeitlin
5e9238f9c6 remove the badle defined and apparently unnecessary wxSocketImpl::m_detected field
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 21:48:42 +00:00
Vadim Zeitlin
2b036c4b23 our sockets are always non-blocking anyhow so throw away all the code dealing with checking if they're blocking; also merge Unix/Win32 versions of connect() and accept() handling as they were almost identical except for the different checking of the return value which was factored out into a platform-specific GetLastError() function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 17:15:22 +00:00
Vadim Zeitlin
00414faf34 use DispatchTimeout() and/or select() with timeout instead of polling loop in wxSocket::DoWait()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-26 22:50:50 +00:00
Vadim Zeitlin
22185a1f15 remove m_use_events from Unix wxSocket implementation, we always need asynchronous socket notifications now (and this was always the case under Windows anyhow), even if we don't always generate wx events corresponding to them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-26 20:20:46 +00:00
Vadim Zeitlin
c6b1063250 refactor Input/Output_Timeout: don't duplicate the same code in MSW/Unix code and also don't duplicate it for input and output, one function is enough for both
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-25 20:27:35 +00:00
Vadim Zeitlin
9508a3e9a0 mingw32 typedef's and not define's SOCKET so test for __WXMSW__ before redefining it ourselves
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57555 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-25 19:52:00 +00:00
Vadim Zeitlin
2606716181 rename gsockmsw files to sockmsw
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57551 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-25 19:10:46 +00:00
Vadim Zeitlin
07792edb2e use void pointers, not char ones, in socket IO functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-25 18:29:08 +00:00
Vadim Zeitlin
54cb21d692 remove wxSocketManager::CreateSocket() function, we don't need to have different wxSocketImpl implementation for the same platform, all the differences between console and GUI applications are abstracted by wxSocketManager::Install/Uninstall_Callback() methods
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-28 15:06:50 +00:00
Vadim Zeitlin
a9d859df6f make wxSocketImplUnix inherit from wxFDIOHandler as they're used for almost the same purpose; this removes the need for the bridge wxSocketOHandler class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-28 14:39:49 +00:00
Vadim Zeitlin
86c5b12b21 also rename gsocketiohandler.* to socketiohandler.* and move it to wxNet where it belongs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-28 13:37:19 +00:00
Vadim Zeitlin
6091364135 rename various gsock* files to sock* (except for MSW where this will be done later)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-28 13:04:47 +00:00
Vadim Zeitlin
51fe4b60ab Streamline wxSocket code: wxSocketBase now uses wxSocketImpl (previously known
as GSocket) which is a base class with various wxSocketImplXXX implementations
provided by different wxSocketManagers.

Share more code between ports (still not finished).

Refactor some code inside wxSocketImpl itself to be less redundant and fixed a
couple of minor bugs in the process.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-28 12:47:07 +00:00
Vadim Zeitlin
04889c59c6 move wx/gsocket.h to wx/private/gsocket.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-26 12:21:56 +00:00
Vadim Zeitlin
025644120d move more socket functions common to Winsock and BSD implementations to common code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-23 13:30:42 +00:00
Vadim Zeitlin
40e7c0b913 compilation fixes for Unix after moving wxFD_XXX macros from wx/unix/private.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-23 01:52:20 +00:00
Vadim Zeitlin
5a2c086adf compilation fix after wxFont changes (closes #10152)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56726 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-10 14:30:41 +00:00
Vadim Zeitlin
e822d1bd5f fix more Borland release build warnings about unused variable/code without effect
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-20 10:30:49 +00:00
Vadim Zeitlin
5a557d1ea0 made Dispatch() return bool indicating whether we processed any events inside it or if the timeout expired
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-16 12:31:30 +00:00
Stefan Csomor
ef0e92205a fixing file paths after renaming
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-11 19:17:41 +00:00
Stefan Neis
db3df3c493 Another attempt at fixing Watcom compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-01 22:19:25 +00:00
Vadim Zeitlin
fdf7ff738c make wxSelectDispatcher ctor public, it can be useful to create it in places other than wxFDIODispatcher
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-22 04:19:12 +00:00
Václav Slavík
df44dcedaa added macros for checking for conflicts between flags values; use it in wxSizer code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-04 12:03:02 +00:00
Vadim Zeitlin
07c0e08a26 replace wxWindowDC with wxDC in generic wxOverlayImpl too to fix compilation after r50886--50890 changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50898 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-22 15:14:24 +00:00
Vadim Zeitlin
2804f77d88 more socket cleanup to allow using wxSocket from both wxBase and wxCore (replaces patch 1756260)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-19 16:45:08 +00:00
Stefan Csomor
3adadab482 moving things to private headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-18 13:22:37 +00:00
Vadim Zeitlin
8f884a0dcc Fix Ok/IsOk() mess in wxGDIObject-derived classes; also added
wxGDIObject::Create/CloneGDIRefData() and implemented them for (almost) all
ports


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50727 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-15 17:54:20 +00:00
Robert Roebling
05dff6b075 wxOverlay compile fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50367 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-30 18:06:10 +00:00
Stefan Neis
ddfed775ab Compilation fix for Watcom (on OS/2).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-18 13:40:43 +00:00
Vadim Zeitlin
b1f17bf00f refactor wxGTK mnemonics conversion functions in a separate file to be able to reuse them from wxMenu too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 19:41:38 +00:00
Julian Smart
05962bdd2b Compile fix on Mac (at least)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-21 17:03:45 +00:00
Václav Slavík
4734640692 fixed variadic templates in the case when char value is passed in place of (e.g.) %i or %d argument
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-20 19:20:10 +00:00
Vadim Zeitlin
5e1eac149f create the single global IO dispatcher in wxFDIODispatcher; don't use wxSelectDispatcher in wxGSocket as the global dispatcher may be of a different type (modified patch 1733626)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-14 20:18:38 +00:00
Vadim Zeitlin
7523de907d replaced wxFDIODispatcher::RunLoop() with Dispatch() which handles only one event at a time (part 1 of the patch 1733626)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-14 19:50:38 +00:00
Vadim Zeitlin
af57c51ab7 changed wxFDIODispatcher::UnregisterFD() to take only fd, without flags, and unregister it unconditionally; use ModifyFD() to just change the flags (modified part of patch 1733626)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-14 19:41:46 +00:00
Vadim Zeitlin
a187327964 Added wxUSE_CONSOLE_EVENTLOOP and wxUSE_SELECT/EPOLLDISPATCHER guards;
put checks for them in the new Unix-specific wx/unix/chkconf.h file


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-14 19:06:18 +00:00
Václav Slavík
b5dbe15d0b added WXDLLIMPEXP_FWD_FOO macros in addition to WXDLLIMPEXP_FOO for use with forward declarations (in preparation for GCC visibility support)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-09 10:09:52 +00:00
Vadim Zeitlin
ad8d42f83c factor out the fd<->handlers map from wxFDIODispatcher into a separate wxMappedFDIODispatcher class (patch 1729395)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-02 13:51:05 +00:00
David Elliott
c393881600 Include sys/types.h from selectdispatcher.h to ensure that fd_set is declared.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-18 21:19:37 +00:00