]>
Commit | Line | Data |
---|---|---|
e2478fde VZ |
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$ | |
77ffb593 | 8 | // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org> |
65571936 | 9 | // Licence: wxWindows licence |
e2478fde VZ |
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 | ||
163b3ad7 | 19 | class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase |
e2478fde VZ |
20 | { |
21 | public: | |
a1873279 | 22 | #if wxUSE_CONSOLE_EVENTLOOP |
2ddff00c | 23 | virtual wxEventLoopBase *CreateEventLoop(); |
a1873279 | 24 | #endif // wxUSE_CONSOLE_EVENTLOOP |
46446cc2 | 25 | virtual bool CreateEndProcessPipe(wxExecuteData& execData); |
e2478fde VZ |
26 | virtual bool IsWriteFDOfEndProcessPipe(wxExecuteData& execData, int fd); |
27 | virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData); | |
28 | virtual int WaitForChild(wxExecuteData& execData); | |
c2ca375c VZ |
29 | #if wxUSE_TIMER |
30 | virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); | |
31 | #endif | |
e2478fde VZ |
32 | }; |
33 | ||
34 | #if wxUSE_GUI | |
35 | ||
36 | class WXDLLEXPORT wxGUIAppTraits : public wxGUIAppTraitsBase | |
37 | { | |
38 | public: | |
2ddff00c | 39 | virtual wxEventLoopBase *CreateEventLoop(); |
e2478fde VZ |
40 | virtual bool CreateEndProcessPipe(wxExecuteData& execData); |
41 | virtual bool IsWriteFDOfEndProcessPipe(wxExecuteData& execData, int fd); | |
42 | virtual void DetachWriteFDOfEndProcessPipe(wxExecuteData& execData); | |
43 | virtual int WaitForChild(wxExecuteData& execData); | |
c2ca375c VZ |
44 | #if wxUSE_TIMER |
45 | virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); | |
46 | #endif | |
d254213e PC |
47 | #if wxUSE_THREADS && defined(__WXGTK20__) |
48 | virtual void MutexGuiEnter(); | |
49 | virtual void MutexGuiLeave(); | |
50 | #endif | |
e2478fde | 51 | |
6ae3ead6 | 52 | #if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS |
fc480dc1 DE |
53 | virtual wxStandardPathsBase& GetStandardPaths(); |
54 | #endif | |
8bb6b2c0 | 55 | virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const; |
db9febdf | 56 | |
b46b1d59 | 57 | #if defined(__WXGTK__) && wxUSE_INTL |
d774f916 | 58 | virtual void SetLocale(); |
b46b1d59 VZ |
59 | #endif // __WXGTK__ |
60 | ||
61 | #ifdef __WXGTK20__ | |
88bbc332 | 62 | virtual wxString GetDesktopEnvironment() const; |
d3a0a0ee VZ |
63 | virtual wxString GetStandardCmdLineOptions(wxArrayString& names, |
64 | wxArrayString& desc) const; | |
b46b1d59 | 65 | #endif // __WXGTK20____ |
5807e60c RR |
66 | |
67 | #if defined(__WXDEBUG__) && defined(__WXGTK20__) | |
68 | virtual bool ShowAssertDialog(const wxString& msg); | |
88bbc332 | 69 | #endif |
2804f77d VZ |
70 | |
71 | // GTK+ and Motif integrate sockets directly in their main loop, the other | |
72 | // Unix ports do it at wxEventLoop level | |
73 | // | |
74 | // TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there | |
75 | // is no advantage in doing this compared to the generic way | |
76 | // currently used by wxX11, should we continue to use GTK/Motif- | |
77 | // specific stuff? | |
78 | #if wxUSE_SOCKETS && (defined(__WXGTK__) || defined(__WXMOTIF__)) | |
79 | virtual GSocketManager *GetSocketManager(); | |
80 | #endif | |
e2478fde VZ |
81 | }; |
82 | ||
83 | #endif // wxUSE_GUI | |
84 | ||
85 | #endif // _WX_UNIX_APPTRAIT_H_ | |
86 |