aboutsummaryrefslogtreecommitdiff
path: root/src/move.h
diff options
context:
space:
mode:
authorJohn Ankarstr\xf6m <john@ankarstrom.se>2021-05-29 12:54:47 +0200
committerJohn Ankarstr\xf6m <john@ankarstrom.se>2021-05-29 13:18:40 +0200
commita041d9898e6d699bd8c0c25482ec574feb03c547 (patch)
tree7f094e33fb530152c3ab6238ce7300750b47addb /src/move.h
downloadjwm-a041d9898e6d699bd8c0c25482ec574feb03c547.tar.gz
First commit
This is the original state of the released tarball for JWM 1.8, which will serve as my starting point for further modifications.
Diffstat (limited to 'src/move.h')
-rw-r--r--src/move.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/move.h b/src/move.h
new file mode 100644
index 0000000..8a737ff
--- /dev/null
+++ b/src/move.h
@@ -0,0 +1,61 @@
+/**
+ * @file move.h
+ * @author Joe Wingbermuehle
+ * @date 2004-2006
+ *
+ * @brief Header for client window move functions.
+ *
+ */
+
+#ifndef MOVE_H
+#define MOVE_H
+
+struct ClientNode;
+
+/** Window snap modes. */
+typedef enum {
+ SNAP_NONE = 0, /**< Don't snap. */
+ SNAP_SCREEN = 1, /**< Snap to the edges of the screen. */
+ SNAP_BORDER = 2 /**< Snap to all borders. */
+} SnapModeType;
+
+/** Window move modes. */
+typedef enum {
+ MOVE_OPAQUE, /**< Show window contents while moving. */
+ MOVE_OUTLINE /**< Show an outline while moving. */
+} MoveModeType;
+
+/** Move a client window.
+ * @param np The client to move.
+ * @param startx The starting mouse x-coordinate (window relative).
+ * @param starty The starting mouse y-coordinate (window relative).
+ * @return 1 if the client moved, 0 otherwise.
+ */
+int MoveClient(struct ClientNode *np, int startx, int starty);
+
+/** Move a client window using the keyboard (mouse optional).
+ * @param np The client to move.
+ * @return 1 if the client moved, 0 otherwise.
+ */
+int MoveClientKeyboard(struct ClientNode *np);
+
+/** Set the snap mode to use.
+ * @param mode The snap mode to use.
+ */
+void SetSnapMode(SnapModeType mode);
+
+/** Set the snap distance to use.
+ * @param value A string representation of the distance to use.
+ */
+void SetSnapDistance(const char *value);
+
+/** Set the snap distance to the default. */
+void SetDefaultSnapDistance();
+
+/** Set the move mode to use.
+ * @param mode The move mode to use.
+ */
+void SetMoveMode(MoveModeType mode);
+
+#endif
+