]> Dogcows Code - chaz/openbox/blob - src/frame.hh
WINDOWS GET FRAMES FRAME SHOW UP THEY WORK HUZZAH SOON THEYLL BE LIKE OLD TIMES!
[chaz/openbox] / src / frame.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __frame_hh
3 #define __frame_hh
4
5 /*! @file frame.hh
6 */
7
8 extern "C" {
9 #include <X11/Xlib.h>
10 }
11
12 #include <string>
13
14 #include "otk/strut.hh"
15 #include "otk/rect.hh"
16 #include "otk/screeninfo.hh"
17 #include "otk/style.hh"
18
19 namespace ob {
20
21 class OBClient;
22
23 //! Holds and decorates a frame around an OBClient (client window)
24 /*!
25 */
26 class OBFrame {
27 private:
28 const OBClient *_client;
29 const otk::ScreenInfo *_screen;
30
31 //! The style to use for size and display the decorations
32 const otk::Style *_style;
33
34 //! The window id of the base frame window
35 Window _window;
36 //! The size of the frame on each side of the client window
37 otk::Strut _size;
38
39 //! Creates the base frame window
40 Window createFrame();
41
42 //! Reparents the client window from the root window onto the frame
43 void grabClient();
44 //! Reparents the client window back to the root window
45 /*!
46 @param remap Re-map the client window when we're done reparenting?
47 */
48 void releaseClient(bool remap);
49
50 public:
51 //! Constructs an OBFrame object, and reparents the client to itself
52 /*!
53 @param client The client window which will be decorated by the new OBFrame
54 @param style The style to use to decorate the frame
55 */
56 OBFrame(const OBClient *client, const otk::Style *style);
57 //! Destroys the OBFrame object
58 virtual ~OBFrame();
59
60 //! Load a style to decorate the frame with
61 void loadStyle(const otk::Style *style);
62
63 //! Size the frame to the client
64 void resize();
65 //! Shape the frame window to the client window
66 void shape();
67
68 //! Returns the frame's most-parent window, which is a child of the root
69 //! window
70 inline Window window() const { return _window; }
71 };
72
73 }
74
75 #endif // __frame_hh
This page took 0.042861 seconds and 5 git commands to generate.