X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fclient.hh;h=9196d1347e593ab84bee1561c02aff57893760a2;hb=bd39de609bcd340dd00fa9dab1519ee2a3aac458;hp=1726ce4415dec8de1103a465f46f8c41a0db01f4;hpb=c7b22b4f9cee63d860ad4f6617cd5210299b9d8b;p=chaz%2Fopenbox diff --git a/src/client.hh b/src/client.hh index 1726ce44..9196d134 100644 --- a/src/client.hh +++ b/src/client.hh @@ -3,11 +3,11 @@ #define __client_hh /*! @file client.hh - @brief The OBClient class maintains the state of a client window by handling + @brief The Client class maintains the state of a client window by handling property changes on the window and some client messages */ -#include "widget.hh" +#include "widgetbase.hh" #include "otk/point.hh" #include "otk/strut.hh" #include "otk/rect.hh" @@ -26,7 +26,7 @@ extern "C" { namespace ob { -class OBFrame; +class Frame; //! The MWM Hints as retrieved from the window property /*! @@ -34,36 +34,36 @@ class OBFrame; structure contains 5. We only use the first 3, so that is all gets defined. */ struct MwmHints { - //! The number of elements in the OBClient::MwmHints struct + unsigned long flags; //!< A bitmask of Client::MwmFlags values + unsigned long functions; //!< A bitmask of Client::MwmFunctions values + unsigned long decorations;//!< A bitmask of Client::MwmDecorations values + //! The number of elements in the Client::MwmHints struct static const unsigned int elements = 3; - unsigned long flags; //!< A bitmask of OBClient::MwmFlags values - unsigned long functions; //!< A bitmask of OBClient::MwmFunctions values - unsigned long decorations;//!< A bitmask of OBClient::MwmDecorations values }; //! Maintains the state of a client window. /*! - OBClient maintains the state of a client window. The state consists of the + Client maintains the state of a client window. The state consists of the hints that the application sets on the window, such as the title, or window gravity.
- OBClient also manages client messages for the client window. When the
+ Client also manages client messages for the client window. When the
application (or any application) requests something to be changed for the
client, it will call the ActionHandler (for client messages) or update the
class' member variables and call whatever is nessary to complete the
change (such as causing a redraw of the titlebar after the title is changed).
*/
-class OBClient : public otk::OtkEventHandler, public OBWidget {
+class Client : public otk::EventHandler, public WidgetBase {
public:
//! The frame window which decorates around the client window
/*!
NOTE: This should NEVER be used inside the client class's constructor!
*/
- OBFrame *frame;
+ Frame *frame;
- //! Holds a list of OBClients
- typedef std::list
A value of 0xffffffff indicates that the window exists on all desktops.
*/
- inline unsigned long desktop() const { return _desktop; }
+ inline long desktop() const { return _desktop; }
//! Returns the window's title
inline const std::string &title() const { return _title; }
//! Returns the window's title when it is iconified
@@ -432,6 +453,9 @@ public:
//! Returns the functions that the user can perform on the window
inline FunctionFlags funtions() const { return _functions; }
+ //! Return the client this window is transient for
+ inline Client *transientFor() const { return _transient_for; }
+
//! Returns if the window is modal
/*!
If the window is modal, then no other windows that it is related to can get
@@ -440,8 +464,7 @@ public:
inline bool modal() const { return _modal; }
//! Returns if the window is shaded
/*!
- When the window is shaded, only its titlebar is visible, the client itself
- is not mapped
+ When the window is shaded, only its titlebar is visible.
*/
inline bool shaded() const { return _shaded; }
//! Returns if the window is iconified
@@ -489,30 +512,11 @@ public:
*/
void resize(Corner anchor, int w, int h, int x = INT_MIN, int y = INT_MIN);
- //! Request the client to close its window.
- void close();
-
- //! Sets the window's stacking layer
- /*!
- @param l An integer specifying the layer.
- '0' - the normal layer
- '> 0' - the 'above' layer
- '< 0' - the 'below' layer
- */
- void setStackLayer(int l);
-
- //! Shades or unshades the client window
- /*!
- @param shade true if the window should be shaded; false if it should be
- unshaded.
- */
- void shade(bool shade);
-
//! Attempt to focus the client window
- bool focus();
+ bool focus() const;
//! Remove focus from the client window
- void unfocus();
+ void unfocus() const;
virtual void focusHandler(const XFocusChangeEvent &e);
virtual void unfocusHandler(const XFocusChangeEvent &e);
@@ -522,7 +526,6 @@ public:
virtual void unmapHandler(const XUnmapEvent &e);
virtual void destroyHandler(const XDestroyWindowEvent &e);
virtual void reparentHandler(const XReparentEvent &e);
- virtual void mapRequestHandler(const XMapRequestEvent &e);
#if defined(SHAPE)
virtual void shapeHandler(const XShapeEvent &e);
#endif // SHAPE