1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/unix/apptrait.h
3 // Purpose: standard implementations of wxAppTraits for Unix
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_UNIX_APPTRAIT_H_
13 #define _WX_UNIX_APPTRAIT_H_
15 // ----------------------------------------------------------------------------
16 // wxGUI/ConsoleAppTraits: must derive from wxAppTraits, not wxAppTraitsBase
17 // ----------------------------------------------------------------------------
19 class WXDLLIMPEXP_BASE wxConsoleAppTraits
: public wxConsoleAppTraitsBase
22 #if wxUSE_CONSOLE_EVENTLOOP
23 virtual wxEventLoopBase
*CreateEventLoop();
24 #endif // wxUSE_CONSOLE_EVENTLOOP
25 virtual int WaitForChild(wxExecuteData
& execData
);
27 virtual wxTimerImpl
*CreateTimerImpl(wxTimer
*timer
);
33 class WXDLLEXPORT wxGUIAppTraits
: public wxGUIAppTraitsBase
36 virtual wxEventLoopBase
*CreateEventLoop();
37 virtual int WaitForChild(wxExecuteData
& execData
);
39 virtual wxTimerImpl
*CreateTimerImpl(wxTimer
*timer
);
41 #if wxUSE_THREADS && defined(__WXGTK20__)
42 virtual void MutexGuiEnter();
43 virtual void MutexGuiLeave();
46 #if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS
47 virtual wxStandardPathsBase
& GetStandardPaths();
49 virtual wxPortId
GetToolkitVersion(int *majVer
= NULL
, int *minVer
= NULL
) const;
51 #if defined(__WXGTK__) && wxUSE_INTL
52 virtual void SetLocale();
56 virtual wxString
GetDesktopEnvironment() const;
57 virtual wxString
GetStandardCmdLineOptions(wxArrayString
& names
,
58 wxArrayString
& desc
) const;
59 #endif // __WXGTK20____
61 #if defined(__WXDEBUG__) && defined(__WXGTK20__)
62 virtual bool ShowAssertDialog(const wxString
& msg
);
65 // GTK+ and Motif integrate sockets directly in their main loop, the other
66 // Unix ports do it at wxEventLoop level
68 // TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there
69 // is no advantage in doing this compared to the generic way
70 // currently used by wxX11, should we continue to use GTK/Motif-
72 #if wxUSE_SOCKETS && (defined(__WXGTK__) || defined(__WXMOTIF__))
73 virtual GSocketManager
*GetSocketManager();
79 #endif // _WX_UNIX_APPTRAIT_H_