summaryrefslogtreecommitdiff
path: root/src/widget.hh
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-03 05:26:04 +0000
committerDana Jansens <danakj@orodu.net>2003-01-03 05:26:04 +0000
commitca3e463057ebf8a7a48a5997aedc062cdac72f3f (patch)
tree38c809333c9e11626d87bbd78a08cbe05169d43b /src/widget.hh
parentb35dae95a5cdb902f1661b9572af47c3f55c975c (diff)
moving a window is possible once again
Diffstat (limited to 'src/widget.hh')
-rw-r--r--src/widget.hh35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/widget.hh b/src/widget.hh
index e51189d6..85b9dcc5 100644
--- a/src/widget.hh
+++ b/src/widget.hh
@@ -2,6 +2,8 @@
#ifndef __obwidget_hh
#define __obwidget_hh
+#include "python.hh"
+
namespace ob {
class OBWidget {
@@ -30,6 +32,39 @@ public:
OBWidget(WidgetType type) : _type(type) {}
inline WidgetType type() const { return _type; }
+
+ inline MouseContext mcontext() const {
+ switch (_type) {
+ case Type_Frame:
+ return MC_Frame;
+ case Type_Titlebar:
+ return MC_Titlebar;
+ case Type_Handle:
+ return MC_Handle;
+ case Type_Plate:
+ return MC_Window;
+ case Type_Label:
+ return MC_Titlebar;
+ case Type_MaximizeButton:
+ return MC_MaximizeButton;
+ case Type_CloseButton:
+ return MC_CloseButton;
+ case Type_IconifyButton:
+ return MC_IconifyButton;
+ case Type_StickyButton:
+ return MC_StickyButton;
+ case Type_LeftGrip:
+ return MC_Grip;
+ case Type_RightGrip:
+ return MC_Grip;
+ case Type_Client:
+ return MC_Window;
+ case Type_Root:
+ return MC_Root;
+ default:
+ assert(false); // unhandled type
+ }
+ }
};
}