]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/private.h
Added X11 wxEventLoop implementation; rearranged event processing
[wxWidgets.git] / include / wx / x11 / private.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: private.h
3 // Purpose: Private declarations for X11 port
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_PRIVATE_H_
13 #define _WX_PRIVATE_H_
14
15 #include "wx/defs.h"
16
17 class wxMouseEvent;
18 class wxKeyEvent;
19
20 // ----------------------------------------------------------------------------
21 // common callbacks
22 // ----------------------------------------------------------------------------
23
24 #if 0
25 // All widgets should have this as their resize proc.
26 extern void wxWidgetResizeProc(Widget w, XConfigureEvent *event, String args[], int *num_args);
27
28 // For repainting arbitrary windows
29 void wxUniversalRepaintProc(Widget w, XtPointer WXUNUSED(c_data), XEvent *event, char *);
30 #endif
31
32 // ----------------------------------------------------------------------------
33 // we maintain a hash table which contains the mapping from Widget to wxWindow
34 // corresponding to the window for this widget
35 // ----------------------------------------------------------------------------
36
37 extern void wxDeleteWindowFromTable(Window w);
38 extern wxWindow *wxGetWindowFromTable(Window w);
39 extern bool wxAddWindowToTable(Window w, wxWindow *win);
40
41 // ----------------------------------------------------------------------------
42 // key events related functions
43 // ----------------------------------------------------------------------------
44
45 extern char wxFindMnemonic(const char* s);
46
47 extern char * wxFindAccelerator (const char *s);
48 //extern XmString wxFindAcceleratorText (const char *s);
49
50 extern int wxCharCodeXToWX(KeySym keySym);
51 extern KeySym wxCharCodeWXToX(int id);
52
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);
58
59 int wxGetBestMatchingPixel(Display *display, XColor *desiredColor, Colormap cmap);
60 Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap );
61
62 extern XColor g_itemColors[];
63 extern int wxComputeColours (Display *display, wxColour * back, wxColour * fore);
64
65 extern void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour);
66 extern void wxDoChangeBackgroundColour(WXWidget widget, wxColour& backgroundColour, bool changeArmColour = FALSE);
67
68 #define wxNO_COLORS 0x00
69 #define wxBACK_COLORS 0x01
70 #define wxFORE_COLORS 0x02
71
72 extern XColor itemColors[5] ;
73
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
79
80 // ----------------------------------------------------------------------------
81 // accessors for C modules
82 // ----------------------------------------------------------------------------
83
84 // extern "C" XtAppContext wxGetAppContext();
85
86 #endif
87 // _WX_PRIVATE_H_