]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/private.h
Implement wxNotificationMessage using libnotify in wxGTK.
[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
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
6991087b
VS
31#if wxUSE_PANGO
32#include <pango/pango.h>
2b5f62a0
VZ
33#endif
34
b5dbe15d
VS
35class WXDLLIMPEXP_FWD_CORE wxMouseEvent;
36class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
37class 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
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
1b0fb34b
JS
62extern void wxDeleteWindowFromTable(Window w);
63extern wxWindow *wxGetWindowFromTable(Window w);
64extern bool wxAddWindowToTable(Window w, wxWindow *win);
83df96d6 65
ab6b6b15
RR
66extern void wxDeleteClientWindowFromTable(Window w);
67extern wxWindow *wxGetClientWindowFromTable(Window w);
68extern bool wxAddClientWindowToTable(Window w, wxWindow *win);
69
83df96d6 70// ----------------------------------------------------------------------------
5e29f97a 71// TranslateXXXEvent() functions - translate X event to wxWindow one
83df96d6 72// ----------------------------------------------------------------------------
1b0fb34b 73extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent);
2b5f62a0 74extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent, bool isAscii = FALSE);
83df96d6 75
b513212d
JS
76extern Window wxGetWindowParent(Window window);
77
b28d3abf 78// Set the window manager decorations according to the
77ffb593 79// given wxWidgets style
b28d3abf
JS
80bool wxSetWMDecorations(Window w, long style);
81bool wxMWMIsRunning(Window w);
82
83df96d6
JS
83#endif
84// _WX_PRIVATE_H_