]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/privx.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Private declarations common to X11 and Motif ports
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
18 #include "X11/Xatom.h"
19 #include "X11/Xutil.h"
25 // ----------------------------------------------------------------------------
26 // key events related functions
27 // ----------------------------------------------------------------------------
29 extern int wxCharCodeXToWX(KeySym keySym
);
30 extern KeySym
wxCharCodeWXToX(int id
);
32 int wxGetBestMatchingPixel(Display
*display
, XColor
*desiredColor
, Colormap cmap
);
33 Pixmap
XCreateInsensitivePixmap( Display
*display
, Pixmap pixmap
);
35 extern XColor g_itemColors
[];
36 extern int wxComputeColours (Display
*display
, wxColour
* back
, wxColour
* fore
);
39 inline Display
* wxGlobalDisplay() { return (Display
*) wxGetDisplay(); }
41 #define wxNO_COLORS 0x00
42 #define wxBACK_COLORS 0x01
43 #define wxFORE_COLORS 0x02
45 extern XColor itemColors
[5] ;
47 #define wxBACK_INDEX 0
48 #define wxFORE_INDEX 1
49 #define wxSELE_INDEX 2
50 #define wxTOPS_INDEX 3
51 #define wxBOTS_INDEX 4
53 #define wxMAX_RGB 0xff
55 #define wxSIGN(x) ((x < 0) ? -x : x)
60 typedef struct wx_hsv
{
64 #define wxMax3(x,y,z) ((x > y) ? ((x > z) ? x : z) : ((y > z) ? y : z))
65 #define wxMin3(x,y,z) ((x < y) ? ((x < z) ? x : z) : ((y < z) ? y : z))
67 void wxHSVToXColor(wxHSV
*hsv
,XColor
*xcolor
);
68 void wxXColorToHSV(wxHSV
*hsv
,XColor
*xcolor
);
69 void wxAllocNearestColor(Display
*display
,Colormap colormap
,XColor
*xcolor
);
70 void wxAllocColor(Display
*display
,Colormap colormap
,XColor
*xcolor
);