]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/x11/private.h
set eol-style
[wxWidgets.git] / include / wx / x11 / private.h
... / ...
CommitLineData
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
35class WXDLLIMPEXP_FWD_CORE wxMouseEvent;
36class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
37class 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
56WX_DECLARE_HASH_MAP(Window, wxWindow *, wxIntegerHash, wxIntegerEqual, wxWindowHash);
57
58// these hashes are defined in app.cpp
59extern wxWindowHash *wxWidgetHashTable;
60extern wxWindowHash *wxClientWidgetHashTable;
61
62extern void wxDeleteWindowFromTable(Window w);
63extern wxWindow *wxGetWindowFromTable(Window w);
64extern bool wxAddWindowToTable(Window w, wxWindow *win);
65
66extern void wxDeleteClientWindowFromTable(Window w);
67extern wxWindow *wxGetClientWindowFromTable(Window w);
68extern bool wxAddClientWindowToTable(Window w, wxWindow *win);
69
70// ----------------------------------------------------------------------------
71// TranslateXXXEvent() functions - translate X event to wxWindow one
72// ----------------------------------------------------------------------------
73extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent);
74extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent, bool isAscii = FALSE);
75
76extern Window wxGetWindowParent(Window window);
77
78// Set the window manager decorations according to the
79// given wxWidgets style
80bool wxSetWMDecorations(Window w, long style);
81bool wxMWMIsRunning(Window w);
82
83// Checks if any of our children are finished.
84// implemented in src/x11/utils.cpp
85void wxCheckForFinishedChildren();
86
87#endif
88// _WX_PRIVATE_H_