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