]> git.saurik.com Git - wxWidgets.git/blob - include/wx/unix/apptrait.h
73b06497558ce54e38181e598e56a75855f7bf0e
[wxWidgets.git] / include / wx / unix / apptrait.h
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
19 class WXDLLIMPEXP_BASE wxConsoleAppTraits : public wxConsoleAppTraitsBase
20 {
21 public:
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 class WXDLLEXPORT wxGUIAppTraits : public wxGUIAppTraitsBase
33 {
34 public:
35 virtual wxEventLoopBase *CreateEventLoop();
36 virtual int WaitForChild(wxExecuteData& execData);
37 #if defined(__WXGTK__) || defined(__WXMOTIF__)
38 virtual int AddProcessCallback(wxEndProcessData *data, int fd);
39 #endif
40 #if wxUSE_TIMER
41 virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer);
42 #endif
43 #if wxUSE_THREADS && defined(__WXGTK20__)
44 virtual void MutexGuiEnter();
45 virtual void MutexGuiLeave();
46 #endif
47
48 #if (defined(__WXMAC__) || defined(__WXCOCOA__)) && wxUSE_STDPATHS
49 virtual wxStandardPathsBase& GetStandardPaths();
50 #endif
51 virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const;
52
53 #if defined(__WXGTK__) && wxUSE_INTL
54 virtual void SetLocale();
55 #endif // __WXGTK__
56
57 #ifdef __WXGTK20__
58 virtual wxString GetDesktopEnvironment() const;
59 virtual wxString GetStandardCmdLineOptions(wxArrayString& names,
60 wxArrayString& desc) const;
61 #endif // __WXGTK20____
62
63 #if defined(__WXDEBUG__) && defined(__WXGTK20__)
64 virtual bool ShowAssertDialog(const wxString& msg);
65 #endif
66
67 // GTK+ and Motif integrate sockets directly in their main loop, the other
68 // Unix ports do it at wxEventLoop level
69 //
70 // TODO: Should we use XtAddInput() for wxX11 too? Or, vice versa, if there
71 // is no advantage in doing this compared to the generic way
72 // currently used by wxX11, should we continue to use GTK/Motif-
73 // specific stuff?
74 #if wxUSE_SOCKETS && (defined(__WXGTK__) || defined(__WXMOTIF__))
75 virtual GSocketManager *GetSocketManager();
76 #endif
77 };
78
79 #endif // wxUSE_GUI
80
81 #endif // _WX_UNIX_APPTRAIT_H_
82