mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
f268743f8c
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7632 a592a061-630c-0410-9148-cb99ea01b6c8
65 lines
1.1 KiB
C++
65 lines
1.1 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GtkmmX.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Huang Ying
|
|
*
|
|
* Full author contact details are available in file CREDITS
|
|
*/
|
|
|
|
#ifndef GTKMMX_H
|
|
#define GTKMMX_H
|
|
|
|
#include <X11/Xlib.h>
|
|
#include <gtkmm.h>
|
|
#include <gdk/gdkx.h>
|
|
|
|
|
|
inline Display * getDisplay()
|
|
{
|
|
return gdk_x11_get_default_xdisplay();
|
|
}
|
|
|
|
|
|
inline int getScreen()
|
|
{
|
|
return gdk_x11_get_default_screen();
|
|
}
|
|
|
|
|
|
inline Window getRootWindow()
|
|
{
|
|
static Window rootWin =
|
|
GDK_WINDOW_XID(Gdk::Display::get_default()->
|
|
get_default_screen()->
|
|
get_root_window()->gobj());
|
|
return rootWin;
|
|
}
|
|
|
|
|
|
inline int getDepth()
|
|
{
|
|
static int depth;
|
|
if (!depth) {
|
|
int width, height, x, y;
|
|
Gdk::Display::get_default()->get_default_screen()->
|
|
get_root_window()->
|
|
get_geometry(x, y, width, height, depth);
|
|
}
|
|
return depth;
|
|
}
|
|
|
|
|
|
inline Colormap getColormap()
|
|
{
|
|
static Colormap colormap = GDK_COLORMAP_XCOLORMAP(
|
|
Gdk::Display::get_default()->get_default_screen()->
|
|
get_default_colormap()->gobj());
|
|
return colormap;
|
|
}
|
|
|
|
|
|
#endif
|