2003-06-23 20:56:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/unix/apptrait.h
|
|
|
|
// Purpose: standard implementations of wxAppTraits for Unix
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 23.06.2003
|
|
|
|
// RCS-ID: $Id$
|
2004-05-23 10:56:36 -04:00
|
|
|
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2003-06-23 20:56:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_UNIX_APPTRAIT_H_
|
|
|
|
#define _WX_UNIX_APPTRAIT_H_
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-12-11 20:35:53 -05:00
|
|
|
class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
|
2003-06-23 20:56:19 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-07-14 15:06:18 -04:00
|
|
|
#if wxUSE_CONSOLE_EVENTLOOP
|
2007-05-21 22:30:01 -04:00
|
|
|
virtual wxEventLoopBase *CreateEventLoop();
|
2007-07-14 15:06:18 -04:00
|
|
|
#endif // wxUSE_CONSOLE_EVENTLOOP
|
2007-04-19 21:29:16 -04:00
|
|
|
#if wxUSE_TIMER
|
|
|
|
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
|
|
|
|
#endif
|
2003-06-23 20:56:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#if wxUSE_GUI
|
|
|
|
|
2008-04-10 06:44:06 -04: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 19:13:55 -04:00
|
|
|
// by wxX11, should we continue to use GTK/Motif-specific stuff?
|
2009-08-17 19:02:46 -04:00
|
|
|
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
|
|
|
#define wxHAS_GUI_FDIOMANAGER
|
|
|
|
#define wxHAS_GUI_PROCESS_CALLBACKS
|
|
|
|
#endif // ports using wxFDIOManager
|
|
|
|
|
|
|
|
#if defined(__WXMAC__)
|
2008-04-11 08:59:22 -04:00
|
|
|
#define wxHAS_GUI_PROCESS_CALLBACKS
|
|
|
|
#define wxHAS_GUI_SOCKET_MANAGER
|
|
|
|
#endif
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
|
2003-06-23 20:56:19 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-05-21 22:30:01 -04:00
|
|
|
virtual wxEventLoopBase *CreateEventLoop();
|
2003-06-23 20:56:19 -04:00
|
|
|
virtual int WaitForChild(wxExecuteData& execData);
|
2008-04-11 08:59:22 -04:00
|
|
|
#ifdef wxHAS_GUI_PROCESS_CALLBACKS
|
2008-03-21 20:07:13 -04:00
|
|
|
virtual int AddProcessCallback(wxEndProcessData *data, int fd);
|
2008-04-10 06:45:47 -04:00
|
|
|
#endif
|
2007-04-19 21:29:16 -04:00
|
|
|
#if wxUSE_TIMER
|
|
|
|
virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
|
|
|
|
#endif
|
2007-12-17 00:37:00 -05:00
|
|
|
#if wxUSE_THREADS && defined(__WXGTK20__)
|
|
|
|
virtual void MutexGuiEnter();
|
|
|
|
virtual void MutexGuiLeave();
|
|
|
|
#endif
|
2003-06-23 20:56:19 -04:00
|
|
|
|
2007-06-15 11:21:57 -04:00
|
|
|
#if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS
|
2009-06-06 19:34:05 -04:00
|
|
|
virtual wxStandardPaths& GetStandardPaths();
|
2004-11-12 16:21:00 -05:00
|
|
|
#endif
|
2008-03-21 10:21:52 -04:00
|
|
|
virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
|
2006-11-24 05:55:26 -05:00
|
|
|
|
2007-05-14 19:43:39 -04:00
|
|
|
#if defined(__WXGTK__) && wxUSE_INTL
|
2007-03-11 21:46:14 -04:00
|
|
|
virtual void SetLocale();
|
2007-05-14 19:43:39 -04:00
|
|
|
#endif // __WXGTK__
|
|
|
|
|
|
|
|
#ifdef __WXGTK20__
|
2006-10-18 17:55:54 -04:00
|
|
|
virtual wxString GetDesktopEnvironment() const;
|
2007-04-22 16:54:07 -04:00
|
|
|
virtual wxString GetStandardCmdLineOptions(wxArrayString& names,
|
|
|
|
wxArrayString& desc) const;
|
2007-05-14 19:43:39 -04:00
|
|
|
#endif // __WXGTK20____
|
2006-11-24 06:33:53 -05:00
|
|
|
|
2009-03-21 19:36:37 -04:00
|
|
|
#if defined(__WXGTK20__)
|
2006-11-24 06:33:53 -05:00
|
|
|
virtual bool ShowAssertDialog(const wxString& msg);
|
2006-10-18 17:55:54 -04:00
|
|
|
#endif
|
2007-12-19 11:45:08 -05:00
|
|
|
|
2009-08-17 19:02:46 -04:00
|
|
|
#if wxUSE_SOCKETS
|
|
|
|
|
|
|
|
#ifdef wxHAS_GUI_SOCKET_MANAGER
|
2008-11-28 07:47:07 -05:00
|
|
|
virtual wxSocketManager *GetSocketManager();
|
2007-12-19 11:45:08 -05:00
|
|
|
#endif
|
2009-08-17 19:02:46 -04:00
|
|
|
|
|
|
|
#ifdef wxHAS_GUI_FDIOMANAGER
|
|
|
|
virtual wxFDIOManager *GetFDIOManager();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // wxUSE_SOCKETS
|
2003-06-23 20:56:19 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_GUI
|
|
|
|
|
|
|
|
#endif // _WX_UNIX_APPTRAIT_H_
|
|
|
|
|