]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/private.h
Suppress 'unused argument' warnings
[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 #include "wx/hashmap.h"
17 #include "wx/utils.h"
18 #if defined( __cplusplus ) && defined( __VMS )
19 #pragma message disable nosimpint
20 #endif
21 #include "X11/Xlib.h"
22 #include "X11/Xatom.h"
23 #include "X11/Xutil.h"
24 #if defined( __cplusplus ) && defined( __VMS )
25 #pragma message enable nosimpint
26 #endif
27
28 // Include common declarations
29 #include "wx/x11/privx.h"
30
31 #if wxUSE_PANGO
32 #include <pango/pango.h>
33 #endif
34
35 class WXDLLIMPEXP_FWD_CORE wxMouseEvent;
36 class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
37 class WXDLLIMPEXP_FWD_CORE wxWindow;
38
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
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
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
62 extern void wxDeleteWindowFromTable(Window w);
63 extern wxWindow *wxGetWindowFromTable(Window w);
64 extern bool wxAddWindowToTable(Window w, wxWindow *win);
65
66 extern void wxDeleteClientWindowFromTable(Window w);
67 extern wxWindow *wxGetClientWindowFromTable(Window w);
68 extern bool wxAddClientWindowToTable(Window w, wxWindow *win);
69
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);
75
76 extern Window wxGetWindowParent(Window window);
77
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);
82
83 #endif
84 // _WX_PRIVATE_H_