#include "wx/setup.h"
#include "wx/object.h"
#include "wx/list.h"
-#include "wx/window.h"
#include "wx/filefn.h"
-#include "wx/ioswrap.h"
-
#ifdef __X__
#include <dirent.h>
#include <unistd.h>
class WXDLLEXPORT wxProcess;
class WXDLLEXPORT wxFrame;
+class WXDLLEXPORT wxWindow;
// FIXME should use wxStricmp() instead
-#ifdef __GNUWIN32__
+#if defined(__GNUWIN32__)
#define stricmp strcasecmp
#define strnicmp strncasecmp
#endif
// ----------------------------------------------------------------------------
// Sound the bell
-WXDLLEXPORT void wxBell(void) ;
+WXDLLEXPORT void wxBell();
// Get OS version
WXDLLEXPORT int wxGetOsVersion(int *majorVsn= (int *) NULL,int *minorVsn= (int *) NULL) ;
// Return a string with the current date/time
WXDLLEXPORT wxString wxNow();
+#if wxUSE_GUI
+// Don't synthesize KeyUp events holding down a key and producing
+// KeyDown events with autorepeat. On by default and always on
+// in wxMSW.
+WXDLLEXPORT bool wxSetDetectableAutoRepeat( bool flag );
+
// ----------------------------------------------------------------------------
// Window ID management
// ----------------------------------------------------------------------------
// Return the current ID
WXDLLEXPORT long wxGetCurrentId();
+#endif // wxUSE_GUI
+
// ----------------------------------------------------------------------------
// Various conversions
// ----------------------------------------------------------------------------
// Get FQDN
WXDLLEXPORT wxString wxGetFullHostName();
+WXDLLEXPORT bool wxGetFullHostName(wxChar *buf, int maxSize);
// Get user ID e.g. jacs (this is known as login name under Unix)
WXDLLEXPORT bool wxGetUserId(wxChar *buf, int maxSize);
// Get the user's home dir (caller must copy --- volatile)
// returns NULL is no HOME dir is known
+#if defined(__UNIX__) && wxUSE_UNICODE
+WXDLLEXPORT const wxMB2WXbuf wxGetUserHome(const wxString& user = wxEmptyString);
+#else
WXDLLEXPORT wxChar* wxGetUserHome(const wxString& user = wxEmptyString);
+#endif
+
+#if wxUSE_GUI // GUI only things from now on
// ----------------------------------------------------------------------------
// Strip out any menu codes
// Yield to other apps/messages and disable user input
WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL);
+// Enable or disable input to all top level windows
+WXDLLEXPORT void wxEnableTopLevelWindows(bool enable = TRUE);
+
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
WXDLLEXPORT bool wxCheckForInterrupt(wxWindow *wnd);
#endif //__X__
+// ----------------------------------------------------------------------------
+// font-related functions (X and GTK)
+// ----------------------------------------------------------------------------
+
+#if defined(__X__) || defined(__WXGTK__)
+
+#ifdef __X__
+ typedef XFontStruct *wxNativeFont;
+#else // GDK
+ typedef GdkFont *wxNativeFont;
+#endif
+
+#include "wx/font.h" // for wxFontEncoding
+
+// returns the handle of the nearest available font or 0
+extern wxNativeFont wxLoadQueryNearestFont(int pointSize,
+ int family,
+ int style,
+ int weight,
+ bool underlined,
+ const wxString &facename,
+ wxFontEncoding encoding);
+
+#endif // X || GTK
+
+#endif // wxUSE_GUI
+
#endif
// _WX_UTILSH__