]>
Commit | Line | Data |
---|---|---|
83df96d6 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: private.h | |
1b0fb34b | 3 | // Purpose: Private declarations for X11 port |
83df96d6 JS |
4 | // Author: Julian Smart |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
65571936 | 9 | // Licence: wxWindows licence |
83df96d6 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_PRIVATE_H_ | |
13 | #define _WX_PRIVATE_H_ | |
14 | ||
15 | #include "wx/defs.h" | |
b8033a5d | 16 | #include "wx/hashmap.h" |
1934d291 | 17 | #include "wx/utils.h" |
d171743e JJ |
18 | #if defined( __cplusplus ) && defined( __VMS ) |
19 | #pragma message disable nosimpint | |
20 | #endif | |
7266b672 | 21 | #include "X11/Xlib.h" |
1b0b798d RR |
22 | #include "X11/Xatom.h" |
23 | #include "X11/Xutil.h" | |
d171743e JJ |
24 | #if defined( __cplusplus ) && defined( __VMS ) |
25 | #pragma message enable nosimpint | |
26 | #endif | |
83df96d6 | 27 | |
5e29f97a | 28 | // Include common declarations |
61aa560b | 29 | #include "wx/x11/privx.h" |
5e29f97a | 30 | |
2b5f62a0 VZ |
31 | #if wxUSE_UNICODE |
32 | #include "pango/pango.h" | |
33 | #endif | |
34 | ||
b5dbe15d VS |
35 | class WXDLLIMPEXP_FWD_CORE wxMouseEvent; |
36 | class WXDLLIMPEXP_FWD_CORE wxKeyEvent; | |
37 | class WXDLLIMPEXP_FWD_CORE wxWindow; | |
83df96d6 | 38 | |
2b5f62a0 VZ |
39 | // ---------------------------------------------------------------------------- |
40 | // Some Unicode <-> UTF8 macros stolen from GTK | |
41 | // ---------------------------------------------------------------------------- | |
42 | ||
43 | #if wxUSE_UNICODE | |
44 | #define wxGTK_CONV(s) wxConvUTF8.cWX2MB(s) | |
45 | #define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX(s) | |
46 | #else | |
47 | #define wxGTK_CONV(s) s.c_str() | |
48 | #define wxGTK_CONV_BACK(s) s | |
49 | #endif | |
50 | ||
83df96d6 JS |
51 | // ---------------------------------------------------------------------------- |
52 | // we maintain a hash table which contains the mapping from Widget to wxWindow | |
53 | // corresponding to the window for this widget | |
54 | // ---------------------------------------------------------------------------- | |
55 | ||
b8033a5d VZ |
56 | WX_DECLARE_HASH_MAP(Window, wxWindow *, wxIntegerHash, wxIntegerEqual, wxWindowHash); |
57 | ||
58 | // these hashes are defined in app.cpp | |
59 | extern wxWindowHash *wxWidgetHashTable; | |
60 | extern wxWindowHash *wxClientWidgetHashTable; | |
61 | ||
1b0fb34b JS |
62 | extern void wxDeleteWindowFromTable(Window w); |
63 | extern wxWindow *wxGetWindowFromTable(Window w); | |
64 | extern bool wxAddWindowToTable(Window w, wxWindow *win); | |
83df96d6 | 65 | |
ab6b6b15 RR |
66 | extern void wxDeleteClientWindowFromTable(Window w); |
67 | extern wxWindow *wxGetClientWindowFromTable(Window w); | |
68 | extern bool wxAddClientWindowToTable(Window w, wxWindow *win); | |
69 | ||
83df96d6 | 70 | // ---------------------------------------------------------------------------- |
5e29f97a | 71 | // TranslateXXXEvent() functions - translate X event to wxWindow one |
83df96d6 | 72 | // ---------------------------------------------------------------------------- |
1b0fb34b | 73 | extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent); |
2b5f62a0 | 74 | extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent, bool isAscii = FALSE); |
83df96d6 | 75 | |
b513212d JS |
76 | extern Window wxGetWindowParent(Window window); |
77 | ||
b28d3abf | 78 | // Set the window manager decorations according to the |
77ffb593 | 79 | // given wxWidgets style |
b28d3abf JS |
80 | bool wxSetWMDecorations(Window w, long style); |
81 | bool wxMWMIsRunning(Window w); | |
82 | ||
bd00fe32 VZ |
83 | // Checks if any of our children are finished. |
84 | // implemented in src/x11/utils.cpp | |
85 | void wxCheckForFinishedChildren(); | |
86 | ||
83df96d6 JS |
87 | #endif |
88 | // _WX_PRIVATE_H_ |