]>
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_
16 #include "wx/hashmap.h"
18 #if defined( __cplusplus ) && defined( __VMS )
19 #pragma message disable nosimpint
22 #include "X11/Xatom.h"
23 #include "X11/Xutil.h"
24 #if defined( __cplusplus ) && defined( __VMS )
25 #pragma message enable nosimpint
28 // Include common declarations
29 #include "wx/x11/privx.h"
32 #include "pango/pango.h"
39 // ----------------------------------------------------------------------------
40 // Some Unicode <-> UTF8 macros stolen from GTK
41 // ----------------------------------------------------------------------------
44 #define wxGTK_CONV(s) wxConvUTF8.cWX2MB(s)
45 #define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX(s)
47 #define wxGTK_CONV(s) s.c_str()
48 #define wxGTK_CONV_BACK(s) s
51 // ----------------------------------------------------------------------------
52 // we maintain a hash table which contains the mapping from Widget to wxWindow
53 // corresponding to the window for this widget
54 // ----------------------------------------------------------------------------
56 WX_DECLARE_HASH_MAP(Window
, wxWindow
*, wxIntegerHash
, wxIntegerEqual
, wxWindowHash
);
58 // these hashes are defined in app.cpp
59 extern wxWindowHash
*wxWidgetHashTable
;
60 extern wxWindowHash
*wxClientWidgetHashTable
;
62 extern void wxDeleteWindowFromTable(Window w
);
63 extern wxWindow
*wxGetWindowFromTable(Window w
);
64 extern bool wxAddWindowToTable(Window w
, wxWindow
*win
);
66 extern void wxDeleteClientWindowFromTable(Window w
);
67 extern wxWindow
*wxGetClientWindowFromTable(Window w
);
68 extern bool wxAddClientWindowToTable(Window w
, wxWindow
*win
);
70 // ----------------------------------------------------------------------------
71 // TranslateXXXEvent() functions - translate X event to wxWindow one
72 // ----------------------------------------------------------------------------
73 extern bool wxTranslateMouseEvent(wxMouseEvent
& wxevent
, wxWindow
*win
, Window window
, XEvent
*xevent
);
74 extern bool wxTranslateKeyEvent(wxKeyEvent
& wxevent
, wxWindow
*win
, Window window
, XEvent
*xevent
, bool isAscii
= FALSE
);
76 extern Window
wxGetWindowParent(Window window
);
78 // Set the window manager decorations according to the
79 // given wxWidgets style
80 bool wxSetWMDecorations(Window w
, long style
);
81 bool wxMWMIsRunning(Window w
);