OGLplus  (0.59.0) a C++ wrapper for rendering APIs

pixmap.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_INTEROP_X11_PIXMAP_HPP
10 #define EAGINE_INTEROP_X11_PIXMAP_HPP
11 
12 #include "display.hpp"
13 #include "visual_info.hpp"
14 
15 #include <X11/Xlib.h>
16 #include <stdexcept>
17 
18 namespace eagine::x11 {
19 
20 class pixmap : public display_object<::Pixmap> {
21 public:
22  pixmap(
23  const display& dpy,
24  const visual_info& vi,
25  unsigned width,
26  unsigned height)
27  : display_object<::Pixmap>(
28  dpy,
29  ::XCreatePixmap(
30  dpy,
31  RootWindow(dpy.get(), vi->screen),
32  width,
33  height,
34  unsigned(vi->depth)),
35  ::XFreePixmap,
36  "Error creating X Pixmap") {}
37 };
38 
39 } // namespace eagine::x11
40 
41 #endif
X11 wrapper code is placed in this namespace.
Definition: x11.hpp:11

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).