]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/unix/apptrait.h
removing outdated code
[wxWidgets.git] / include / wx / unix / apptrait.h
... / ...
CommitLineData
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/unix/apptrait.h
3// Purpose: standard implementations of wxAppTraits for Unix
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 23.06.2003
7// RCS-ID: $Id$
8// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_UNIX_APPTRAIT_H_
13#define _WX_UNIX_APPTRAIT_H_
14
15// ----------------------------------------------------------------------------
16// wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
17// ----------------------------------------------------------------------------
18
19class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
20{
21public:
22#if wxUSE_CONSOLE_EVENTLOOP
23 virtual wxEventLoopBase *CreateEventLoop();
24#endif // wxUSE_CONSOLE_EVENTLOOP
25#if wxUSE_TIMER
26 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
27#endif
28};
29
30#if wxUSE_GUI
31
32// GTK+ and Motif integrate sockets and child processes monitoring directly in
33// their main loop, the other Unix ports do it at wxEventLoop level and so use
34// the non-GUI traits and don't need anything here
35//
36// TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there is
37// no advantage in doing this compared to the generic way currently used
38// by wxX11, should we continue to use GTK/Motif-specific stuff?
39#if defined(__WXGTK__) || defined(__WXMOTIF__)
40 #define wxHAS_GUI_FDIOMANAGER
41 #define wxHAS_GUI_PROCESS_CALLBACKS
42#endif // ports using wxFDIOManager
43
44#if defined(__WXMAC__)
45 #define wxHAS_GUI_PROCESS_CALLBACKS
46 #define wxHAS_GUI_SOCKET_MANAGER
47#endif
48
49class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase
50{
51public:
52 virtual wxEventLoopBase *CreateEventLoop();
53 virtual int WaitForChild(wxExecuteData& execData);
54#ifdef wxHAS_GUI_PROCESS_CALLBACKS
55 virtual int AddProcessCallback(wxEndProcessData *data, int fd);
56#endif
57#if wxUSE_TIMER
58 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
59#endif
60#if wxUSE_THREADS && defined(__WXGTK20__)
61 virtual void MutexGuiEnter();
62 virtual void MutexGuiLeave();
63#endif
64
65#if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS
66 virtual wxStandardPaths& GetStandardPaths();
67#endif
68 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
69
70#ifdef __WXGTK20__
71 virtual wxString GetDesktopEnvironment() const;
72 virtual wxString GetStandardCmdLineOptions(wxArrayString& names,
73 wxArrayString& desc) const;
74#endif // __WXGTK20____
75
76#if defined(__WXGTK20__)
77 virtual bool ShowAssertDialog(const wxString& msg);
78#endif
79
80#if wxUSE_SOCKETS
81
82#ifdef wxHAS_GUI_SOCKET_MANAGER
83 virtual wxSocketManager *GetSocketManager();
84#endif
85
86#ifdef wxHAS_GUI_FDIOMANAGER
87 virtual wxFDIOManager *GetFDIOManager();
88#endif
89
90#endif // wxUSE_SOCKETS
91};
92
93#endif // wxUSE_GUI
94
95#endif // _WX_UNIX_APPTRAIT_H_
96