]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/private.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Private declarations for X11 port
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_PRIVATE_H_
13 #define _WX_PRIVATE_H_
20 // ----------------------------------------------------------------------------
22 // ----------------------------------------------------------------------------
25 // All widgets should have this as their resize proc.
26 extern void wxWidgetResizeProc(Widget w
, XConfigureEvent
*event
, String args
[], int *num_args
);
28 // For repainting arbitrary windows
29 void wxUniversalRepaintProc(Widget w
, XtPointer
WXUNUSED(c_data
), XEvent
*event
, char *);
32 // ----------------------------------------------------------------------------
33 // we maintain a hash table which contains the mapping from Widget to wxWindow
34 // corresponding to the window for this widget
35 // ----------------------------------------------------------------------------
37 extern void wxDeleteWindowFromTable(Window w
);
38 extern wxWindow
*wxGetWindowFromTable(Window w
);
39 extern bool wxAddWindowToTable(Window w
, wxWindow
*win
);
41 // ----------------------------------------------------------------------------
42 // key events related functions
43 // ----------------------------------------------------------------------------
45 extern char wxFindMnemonic(const char* s
);
47 extern char * wxFindAccelerator (const char *s
);
48 //extern XmString wxFindAcceleratorText (const char *s);
50 extern int wxCharCodeXToWX(KeySym keySym
);
51 extern KeySym
wxCharCodeWXToX(int id
);
53 // ----------------------------------------------------------------------------
54 // TranslateXXXEvent() functions - translate Motif event to wxWindow one
55 // ----------------------------------------------------------------------------
56 extern bool wxTranslateMouseEvent(wxMouseEvent
& wxevent
, wxWindow
*win
, Window window
, XEvent
*xevent
);
57 extern bool wxTranslateKeyEvent(wxKeyEvent
& wxevent
, wxWindow
*win
, Window window
, XEvent
*xevent
);
59 int wxGetBestMatchingPixel(Display
*display
, XColor
*desiredColor
, Colormap cmap
);
60 Pixmap
XCreateInsensitivePixmap( Display
*display
, Pixmap pixmap
);
62 extern XColor g_itemColors
[];
63 extern int wxComputeColours (Display
*display
, wxColour
* back
, wxColour
* fore
);
65 extern void wxDoChangeForegroundColour(WXWidget widget
, wxColour
& foregroundColour
);
66 extern void wxDoChangeBackgroundColour(WXWidget widget
, wxColour
& backgroundColour
, bool changeArmColour
= FALSE
);
68 #define wxNO_COLORS 0x00
69 #define wxBACK_COLORS 0x01
70 #define wxFORE_COLORS 0x02
72 extern XColor itemColors
[5] ;
74 #define wxBACK_INDEX 0
75 #define wxFORE_INDEX 1
76 #define wxSELE_INDEX 2
77 #define wxTOPS_INDEX 3
78 #define wxBOTS_INDEX 4
80 // ----------------------------------------------------------------------------
81 // accessors for C modules
82 // ----------------------------------------------------------------------------
84 // extern "C" XtAppContext wxGetAppContext();