Commit Graph

182 Commits

Author SHA1 Message Date
Vadim Zeitlin
715e4f7e3e Fix Cygwin 1.7 build.
Avoid using Cygwin sockets as our code assumes that we use WinSock API under
Windows currently (this might change in the future) by defining
__USE_W32_SOCKETS.

Use new, safer and more efficient cygwin_conv_path() function.

Use t_str() instead of fn_str() with Windows API taking file names, under
Cygwin they are different and using fn_str() is incorrect.

A few other minor fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-23 23:32:46 +00:00
Francesco Montorsi
e4431849b4 Implement wx-prefixed macros versions of DECLARE/IMPLEMENT_APP_* macros.
Implement compatibility aliases for non-prefixed macro names.
Require a final semicolon where possible.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-09 13:23:13 +00:00
Vadim Zeitlin
7d9550df50 Define wxDEBUG_LEVEL in both debug and release builds as 1.
By default include assertions and debug logging in both debug and release
builds but disable them in application release builds (when NDEBUG is
defined).

Also update (more accurately, replace) debugging overview.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61886 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-12 11:28:52 +00:00
Vadim Zeitlin
f432e6777d Tweak the default wxApp::GetAppDisplayName() logic.
Don't capitalize the app name if it had been explicitly set with SetAppName()
as this can result in unexpectedly wrong value. Do capitalize the program name
which is used as app name by default and don't store the program name in
m_appName to be able to distinguish between the two cases.

Closes #11165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-03 11:38:31 +00:00
Vadim Zeitlin
3185abc278 Support delayed destruction in console applications too.\n\nThis only works if there is a running event loop but if there is one, we can have the same kind of problems with non-GUI objects such as sockets in console applications as we have with windows in GUI ones, so we must support this (see #10989).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-21 14:16:44 +00:00
Vadim Zeitlin
a758f601dd No real changes, just refactor wxEventLoop/wxApp::ProcessIdle().
Old code called wxApp::ProcessIdle() from wxEventLoopManualRun::Run() which called wxEventLoop::ProcessIdle() which called wxApp methods from it. In the new version wxEventLoopManualRun::Run() calls wxEventLoopManualRun::ProcessIdle() which calls wxApp::ProcessIdle() which calls other wxApp methods which seems to make more sense and also allows overriding ProcessIdle() in either wxEventLoopManual or wxApp-derived classes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-17 16:52:43 +00:00
Vadim Zeitlin
657a8a3598 first round of debug/release merge: introduce wxDEBUG_LEVEL, for now defined as 1 if __WXDEBUG__ is defined, i.e. no real changes; don't use __WXDEBUG__ in the headers to keep debug and release builds ABI-compatible; add functions to customize or disable asserts handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 23:36:37 +00:00
Francesco Montorsi
cae9e7b169 add wxAppConsoleBase::DeletePendingEvents and wxEvtHandler::DeletePendingEvents.
Fix wxAppConsoleBase::Suspend/ResumeProcessingOfPendingEvents: locking the mutex does not prevent wxAppConsoleBase::ProcessPendingEvents from running if the mutex was locked from the main thread!

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-08 12:58:24 +00:00
Francesco Montorsi
8e40ed8535 move pending event processing back to wxApp (these methods were moved into wxEventLoopBase during YieldFor() refactoring - see #10320): we need to be able to queue events even when there's no event loop running (e.g. wxApp::OnInit)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 20:45:22 +00:00
Francesco Montorsi
ec38d07d03 add wxAppConsoleBase::OnEventLoopEnter/Exit callbacks; add wxEventLoopBase::IsMain() and wxAppConsoleBase::GetMainLoop() helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-25 13:23:12 +00:00
Francesco Montorsi
1f2f732921 remove wxAppConsoleBase::OInitGui and leave it only in wxApp[Base] class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-22 14:42:35 +00:00
Francesco Montorsi
dde19c2180 second part of #10320: move wxApp event handling functions to wxEventLoopBase (in particular move Yield() functions); add backward compatible redirections to wxApp; update docs; remove global lists wxPendingEvents and wxPendingEventsLocker
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-15 14:25:08 +00:00
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
Vadim Zeitlin
e799e8d7d8 use WXDLLIMPEXP_FWD_BASE instead of WXDLLIMPEXP_BASE in friend declaration
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58666 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-04 21:27:33 +00:00
Francesco Montorsi
d48b06bd90 check in the 'selective yield' patch (see ticket #10320):
- implements YieldFor() with event filtering for wxMSW and wxGTK,
  adds TODO markers in other ports;
- replaces wxYield() in GTK's clipboard code with a wxTheApp->YieldFor() call, thus fixing possible reentrancies 
(and modifies clipboard sample to test synchronous IsSupported calls)
- replaces wxYieldIfNeeded() calls in wxProgressDialog with wxTheApp->YieldFor() calls, so that it processes only 
UI/user-input events, thus fixing the race condition visible in the "thread" sample
- documents the new functions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-04 17:42:28 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Francesco Montorsi
3828182615 fix wxYield[IfNeeded] dll linkage (closes #10325)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-07 11:28:50 +00:00
Francesco Montorsi
d181e877b0 use a common m_isInsideYield flag instead of static booleans in all ports; add a IsYielding() test which can help to fix unwanted re-entrancies
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-29 15:03:39 +00:00
Francesco Montorsi
079f4130b8 no real change: rename wxPendingEvents to wxHandlersWithPendingEvents since its current name is misleading; that's not a list of events but a list of event handlers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-28 19:30:43 +00:00
Vadim Zeitlin
5c33522fca replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 02:39:52 +00:00
Vadim Zeitlin
328fafa1db capitalize the application name in GetAppDisplayName() by default; this results in logging message appearance consistent with wx 2.8 and generally looks better
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-08-01 23:47:22 +00:00
Vadim Zeitlin
96b2cbe8b3 use (new) safer GetTraitsIfExists() in wxMutexGuiEnter/Leave() to avoid crashing on exit of wxGTK1 applications putting anything on clipboard (and maybe other cases)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-21 01:35:00 +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
Vadim Zeitlin
4ec80a5966 forward declare wxVideoMode as struct, not class, now that it was reverted to be struct again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-12 15:12:02 +00:00
Robin Dunn
26c093da54 wxVideoMode is a class not a struct
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53083 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-07 18:53:16 +00:00
Vadim Zeitlin
c50c6fb23b add SetNativeTheme() (slightly modified patch 1884553)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-27 17:46:14 +00:00
Vadim Zeitlin
a131b460ac don't redeclare wxYield() if it had been already declared to fix g++ warnings with -Wredundant-decls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-08 08:17:41 +00:00
Vadim Zeitlin
9d55bfef2c don't use 8 bit characters in sources, this results in level 1 warning with VC8 (patch 1841741)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-03 22:09:26 +00:00
Vadim Zeitlin
180b5b4827 added vendor display name (for consistency with app display name &c) (patch 1831303)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-17 14:45:53 +00:00
Vadim Zeitlin
541ea80f0e made wxApp::argv an object convertible to either char** or wchar_t** for better compatibility with the existing ANSI code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-11-12 22:32:23 +00:00
Vadim Zeitlin
9cf3d21870 added wxApp::Set/GetAppDisplayName() (patch 1780414)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-09 23:26: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
Paul Cornett
0728199b91 process pending wx events before sending idle events
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47229 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-08 05:31:32 +00:00
Vadim Zeitlin
1663c65500 show the unhandled exceptions in debug build instead of silently eating them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46490 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-16 14:20:16 +00:00
Vadim Zeitlin
4c2a8d899d compilation fix after last commit: make wxAppConsole a class, not typedef, under non-Unix as we can't forward declare a typedef
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-05 17:31:10 +00:00
Vadim Zeitlin
e0954e729d rename old wxAppConsole to wxAppConsoleBase and wxAppConsoleUnix to wxAppConsole for consistency with wxAppBase/wxApp and to fix the bug 1729377 (crash when using timers under Unix in console app); also #define wxApp as wxAppConsole instead of declaring it as a real class in console build to avoid problems with ODR violation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-04 13:39:23 +00:00
Vadim Zeitlin
2ddff00c92 don't define wxEventLoop class differently in GUI and base, this breaks the
ODR and hence results in many problems in practice; instead use wxEventLoopBase
whenever possible and #define wxEventLoop differently in console applications


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-22 02:30:01 +00:00
Vadim Zeitlin
b46b1d59d6 implement event loop for console applications (heavily modified patch 1715735)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-14 23:43:39 +00:00
Vadim Zeitlin
c1dc9f8394 removed WXWIN_COMPATIBILITY_2_4 from common and wxMSW files (patch 1675546)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 11:35:04 +00:00
Robert Roebling
515a31bf65 Add forceTrueColour option to SetBestVisual().
Currently API only, implement later.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-17 09:29:39 +00:00
Vadim Zeitlin
475a93b76a moved GetLayoutDirection() to GUI wxApp, it has nothing to do in wxAppConsole
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-11 22:34:53 +00:00
Václav Slavík
ee92941afc fixed IMPLEMENT_APP to work even if compiled with --with-themes and win32 or gtk themes are not compiled in
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-29 12:43:59 +00:00
Paul Cornett
5ff14574fc some app.h cleanup: minimize includes, use static cast
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-09 17:29:19 +00:00
Włodzimierz Skiba
b137e49318 Build fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-04 19:22:57 +00:00
Vadim Zeitlin
978af86426 merge of RTL changes (with many modifications) from SOC2006_RTL branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-04 13:35:13 +00:00
Václav Slavík
b3c861501a initial (not yet working) code for DirectFB port
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-27 09:42:42 +00:00
Włodzimierz Skiba
40ff126ac4 Deprecated and obsolete parts marked up for backward compatibility.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-14 17:01:16 +00:00
Vadim Zeitlin
3ec4a23f50 show the function in which the assert failure occured if the compiler supports it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-21 15:47:24 +00:00
Mart Raudsepp
1be7a35c5e Include gtk1 headers for non-gtk2. I don't really like this CPP logic, or more exactly __WXGTK__ without __WXGTK20__
being GTK1, oh well.
Might have missed some.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37066 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-23 03:27:34 +00:00
Vadim Zeitlin
4d90072c22 implemented wxEventLoop for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-12 20:09:00 +00:00