aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/api/wndmgr/snappnt.h
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/api/wndmgr/snappnt.h
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Wasabi/api/wndmgr/snappnt.h')
-rw-r--r--Src/Wasabi/api/wndmgr/snappnt.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/Src/Wasabi/api/wndmgr/snappnt.h b/Src/Wasabi/api/wndmgr/snappnt.h
new file mode 100644
index 00000000..997e8fd7
--- /dev/null
+++ b/Src/Wasabi/api/wndmgr/snappnt.h
@@ -0,0 +1,49 @@
+#ifndef __SNAPPOINT_H
+#define __SNAPPOINT_H
+
+#include <bfc/ptrlist.h>
+#include <bfc/string/StringW.h>
+#include <api/skin/xmlobject.h>
+
+#define SNAPPOINT_XMLPARENT XmlObjectI
+
+class Container;
+class Layout;
+class SnapPoint;
+class ifc_window;
+
+class SnapPoint : public SNAPPOINT_XMLPARENT {
+
+public:
+ SnapPoint(Layout *l, Container *c);
+ virtual ~SnapPoint();
+
+ virtual int setXmlParam(const wchar_t *name, const wchar_t *strvalue);
+
+ virtual void setParentContainer(Container *c);
+ virtual void setParentLayout(Layout *l);
+ virtual Container *getParentContainer();
+ virtual Layout *getParentLayout();
+ virtual const wchar_t *getId();
+
+ virtual int getX();
+ virtual int getY();
+
+ static int match(ifc_window *master, RECT *z, ifc_window *slave, int flag, int *donex, int *doney, int w, int h);
+ static void removeAll();
+
+private:
+ int x;
+ int y;
+ int relatx;
+ int relaty;
+ StringW id;
+
+ Container *pcontainer;
+ Layout *playout;
+
+ static PtrList<SnapPoint> points;
+ static int do_match(SnapPoint *pmast, SnapPoint *pslav, RECT *z, int mask, int *donex, int *doney, int w, int h);
+};
+
+#endif \ No newline at end of file