X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..f87584b55268e165f15de6f8ae34c99df72e5896:/include/wx/motif/private.h?ds=sidebyside diff --git a/include/wx/motif/private.h b/include/wx/motif/private.h index 3c9bf6ac72..315899ffaa 100644 --- a/include/wx/motif/private.h +++ b/include/wx/motif/private.h @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_PRIVATE_H_ @@ -36,7 +36,13 @@ class WXDLLEXPORT wxColour; #define wxCHECK_LESSTIF_VERSION( major, minor ) \ ( LesstifVersion >= (major) * 1000 + (minor) ) -#define wxCHECK_LESSTIF() ( defined(LesstifVersion) && LesstifVersion > 0 ) +#define wxCHECK_LESSTIF() ( __WXLESSTIF__ ) + +// some compilers (e.g. Sun CC) give warnings when treating string literals as +// (non const) "char *" but many Motif functions take "char *" parameters which +// are really "const char *" so use this macro to suppress the warnings when we +// know it's ok +#define wxMOTIF_STR(x) wx_const_cast(char *, x) // ---------------------------------------------------------------------------- // Miscellaneous functions @@ -70,7 +76,7 @@ extern bool wxAddWindowToTable(Widget w, wxWindow *win); // ---------------------------------------------------------------------------- // Creates a bitmap with transparent areas drawn in the given colour. -wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour); +wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour); // ---------------------------------------------------------------------------- // key events related functions @@ -93,9 +99,13 @@ extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, extern void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour); extern void wxDoChangeBackgroundColour(WXWidget widget, - wxColour& backgroundColour, - bool changeArmColour = FALSE); -extern void wxDoChangeFont(WXWidget widget, wxFont& font); + const wxColour& backgroundColour, + bool changeArmColour = false); +extern void wxDoChangeFont(WXWidget widget, const wxFont& font); +extern void wxGetTextExtent(WXDisplay* display, const wxFont& font, + double scale, + const wxString& string, int* width, int* height, + int* ascent, int* descent); #define wxNO_COLORS 0x00 #define wxBACK_COLORS 0x01