2003-06-24 00:56:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/unix/apptrait.h
|
|
|
|
// Purpose: standard implementations of wxAppTraits for Unix
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 23.06.2003
|
2004-05-23 14:56:36 +00:00
|
|
|
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2003-06-24 00:56:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_UNIX_APPTRAIT_H_
|
|
|
|
#define _WX_UNIX_APPTRAIT_H_
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-12-12 01:35:53 +00:00
|
|
|
class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
|
2003-06-24 00:56:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2007-07-14 19:06:18 +00:00
|
|
|
#if wxUSE_CONSOLE_EVENTLOOP
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxEventLoopBase *CreateEventLoop() wxOVERRIDE;
|
2007-07-14 19:06:18 +00:00
|
|
|
#endif // wxUSE_CONSOLE_EVENTLOOP
|
2007-04-20 01:29:16 +00:00
|
|
|
#if wxUSE_TIMER
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) wxOVERRIDE;
|
2007-04-20 01:29:16 +00:00
|
|
|
#endif
|
2003-06-24 00:56:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#if wxUSE_GUI
|
|
|
|
|
2008-04-10 10:44:06 +00:00
|
|
|
// GTK+ and Motif integrate sockets and child processes monitoring directly in
|
|
|
|
// their main loop, the other Unix ports do it at wxEventLoop level and so use
|
|
|
|
// the non-GUI traits and don't need anything here
|
|
|
|
//
|
|
|
|
// TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there is
|
|
|
|
// no advantage in doing this compared to the generic way currently used
|
2009-08-16 23:13:55 +00:00
|
|
|
// by wxX11, should we continue to use GTK/Motif-specific stuff?
|
2014-08-24 01:50:11 +00:00
|
|
|
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXQT__)
|
2009-08-17 23:02:46 +00:00
|
|
|
#define wxHAS_GUI_FDIOMANAGER
|
|
|
|
#define wxHAS_GUI_PROCESS_CALLBACKS
|
|
|
|
#endif // ports using wxFDIOManager
|
|
|
|
|
|
|
|
#if defined(__WXMAC__)
|
2008-04-11 12:59:22 +00:00
|
|
|
#define wxHAS_GUI_PROCESS_CALLBACKS
|
|
|
|
#define wxHAS_GUI_SOCKET_MANAGER
|
|
|
|
#endif
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
|
2003-06-24 00:56:19 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxEventLoopBase *CreateEventLoop() wxOVERRIDE;
|
|
|
|
virtual int WaitForChild(wxExecuteData& execData) wxOVERRIDE;
|
2007-04-20 01:29:16 +00:00
|
|
|
#if wxUSE_TIMER
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer) wxOVERRIDE;
|
2007-04-20 01:29:16 +00:00
|
|
|
#endif
|
2007-12-17 05:37:00 +00:00
|
|
|
#if wxUSE_THREADS && defined(__WXGTK20__)
|
2015-09-07 00:20:42 +00:00
|
|
|
virtual void MutexGuiEnter() wxOVERRIDE;
|
|
|
|
virtual void MutexGuiLeave() wxOVERRIDE;
|
2007-12-17 05:37:00 +00:00
|
|
|
#endif
|
2003-06-24 00:56:19 +00:00
|
|
|
|
2015-06-24 04:54:34 +00:00
|
|
|
wxPortId GetToolkitVersion(int *majVer = NULL,
|
|
|
|
int *minVer = NULL,
|
|
|
|
int *microVer = NULL) const wxOVERRIDE;
|
2006-11-24 10:55:26 +00:00
|
|
|
|
2007-05-14 23:43:39 +00:00
|
|
|
#ifdef __WXGTK20__
|
2015-09-07 00:20:42 +00:00
|
|
|
virtual wxString GetDesktopEnvironment() const wxOVERRIDE;
|
2007-04-22 20:54:07 +00:00
|
|
|
virtual wxString GetStandardCmdLineOptions(wxArrayString& names,
|
2015-09-07 00:20:42 +00:00
|
|
|
wxArrayString& desc) const wxOVERRIDE;
|
2007-05-14 23:43:39 +00:00
|
|
|
#endif // __WXGTK20____
|
2006-11-24 11:33:53 +00:00
|
|
|
|
2009-03-21 23:36:37 +00:00
|
|
|
#if defined(__WXGTK20__)
|
2015-09-07 00:20:42 +00:00
|
|
|
virtual bool ShowAssertDialog(const wxString& msg) wxOVERRIDE;
|
2006-10-18 21:55:54 +00:00
|
|
|
#endif
|
2007-12-19 16:45:08 +00:00
|
|
|
|
2009-08-17 23:02:46 +00:00
|
|
|
#if wxUSE_SOCKETS
|
|
|
|
|
|
|
|
#ifdef wxHAS_GUI_SOCKET_MANAGER
|
2015-11-22 08:28:33 +00:00
|
|
|
virtual wxSocketManager *GetSocketManager() wxOVERRIDE;
|
2007-12-19 16:45:08 +00:00
|
|
|
#endif
|
2009-08-17 23:02:46 +00:00
|
|
|
|
|
|
|
#ifdef wxHAS_GUI_FDIOMANAGER
|
2015-09-07 00:20:42 +00:00
|
|
|
virtual wxFDIOManager *GetFDIOManager() wxOVERRIDE;
|
2009-08-17 23:02:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // wxUSE_SOCKETS
|
2013-07-03 00:28:42 +00:00
|
|
|
|
2014-08-24 01:50:11 +00:00
|
|
|
#if wxUSE_EVENTLOOP_SOURCE
|
2014-03-30 00:02:23 +00:00
|
|
|
virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager() wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
#endif
|
2003-06-24 00:56:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_GUI
|
|
|
|
|
|
|
|
#endif // _WX_UNIX_APPTRAIT_H_
|
|
|
|
|