2002-02-05 11:34:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: private.h
|
2002-02-08 07:00:11 -05:00
|
|
|
// Purpose: Private declarations for X11 port
|
2002-02-05 11:34:33 -05:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2002-02-05 11:34:33 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_PRIVATE_H_
|
|
|
|
#define _WX_PRIVATE_H_
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
2002-02-10 11:42:42 -05:00
|
|
|
#include "wx/utils.h"
|
2003-05-09 06:53:52 -04:00
|
|
|
#if defined( __cplusplus ) && defined( __VMS )
|
|
|
|
#pragma message disable nosimpint
|
|
|
|
#endif
|
2002-02-08 12:44:23 -05:00
|
|
|
#include "X11/Xlib.h"
|
2002-02-11 07:04:35 -05:00
|
|
|
#include "X11/Xatom.h"
|
|
|
|
#include "X11/Xutil.h"
|
2003-05-09 06:53:52 -04:00
|
|
|
#if defined( __cplusplus ) && defined( __VMS )
|
|
|
|
#pragma message enable nosimpint
|
|
|
|
#endif
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-13 11:17:29 -05:00
|
|
|
// Include common declarations
|
2002-02-13 12:23:13 -05:00
|
|
|
#include "wx/x11/privx.h"
|
2002-02-13 11:17:29 -05:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
#if wxUSE_UNICODE
|
|
|
|
#include "pango/pango.h"
|
|
|
|
#endif
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
class wxMouseEvent;
|
|
|
|
class wxKeyEvent;
|
2002-02-10 11:42:42 -05:00
|
|
|
class wxWindow;
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// Some Unicode <-> UTF8 macros stolen from GTK
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#if wxUSE_UNICODE
|
|
|
|
#define wxGTK_CONV(s) wxConvUTF8.cWX2MB(s)
|
|
|
|
#define wxGTK_CONV_BACK(s) wxConvUTF8.cMB2WX(s)
|
|
|
|
#else
|
|
|
|
#define wxGTK_CONV(s) s.c_str()
|
|
|
|
#define wxGTK_CONV_BACK(s) s
|
|
|
|
#endif
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// we maintain a hash table which contains the mapping from Widget to wxWindow
|
|
|
|
// corresponding to the window for this widget
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2002-02-08 07:00:11 -05:00
|
|
|
extern void wxDeleteWindowFromTable(Window w);
|
|
|
|
extern wxWindow *wxGetWindowFromTable(Window w);
|
|
|
|
extern bool wxAddWindowToTable(Window w, wxWindow *win);
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-03-24 17:17:53 -05:00
|
|
|
extern void wxDeleteClientWindowFromTable(Window w);
|
|
|
|
extern wxWindow *wxGetClientWindowFromTable(Window w);
|
|
|
|
extern bool wxAddClientWindowToTable(Window w, wxWindow *win);
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2002-02-13 11:17:29 -05:00
|
|
|
// TranslateXXXEvent() functions - translate X event to wxWindow one
|
2002-02-05 11:34:33 -05:00
|
|
|
// ----------------------------------------------------------------------------
|
2002-02-08 07:00:11 -05:00
|
|
|
extern bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent);
|
2002-12-04 09:11:26 -05:00
|
|
|
extern bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Window window, XEvent *xevent, bool isAscii = FALSE);
|
2002-02-05 11:34:33 -05:00
|
|
|
|
2002-02-09 20:03:45 -05:00
|
|
|
extern Window wxGetWindowParent(Window window);
|
|
|
|
|
2002-02-11 06:06:50 -05:00
|
|
|
// Set the window manager decorations according to the
|
2004-05-23 10:56:36 -04:00
|
|
|
// given wxWidgets style
|
2002-02-11 06:06:50 -05:00
|
|
|
bool wxSetWMDecorations(Window w, long style);
|
|
|
|
bool wxMWMIsRunning(Window w);
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
#endif
|
|
|
|
// _WX_PRIVATE_H_
|