Bläddra i källkod

recreated dwm.h

Anselm R. Garbe 18 år sedan
förälder
incheckning
0453c1d180
3 ändrade filer med 23 tillägg och 21 borttagningar
  1. 1 1
      Makefile
  2. 2 20
      dwm.c
  3. 20 0
      dwm.h

+ 1 - 1
Makefile

@@ -35,7 +35,7 @@ clean:
 dist: clean
 dist: clean
 	@echo creating dist tarball
 	@echo creating dist tarball
 	@mkdir -p dwm-${VERSION}
 	@mkdir -p dwm-${VERSION}
-	@cp -R LICENSE Makefile README config.def.h config.mk \
+	@cp -R LICENSE Makefile README config.def.h config.mk dwm.h \
 		dwm.1 ${SRC} dwm-${VERSION}
 		dwm.1 ${SRC} dwm-${VERSION}
 	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
 	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
 	@gzip dwm-${VERSION}.tar
 	@gzip dwm-${VERSION}.tar

+ 2 - 20
dwm.c

@@ -25,6 +25,8 @@
  *
  *
  * To understand everything else, start reading main().
  * To understand everything else, start reading main().
  */
  */
+#include "dwm.h"
+
 #include <errno.h>
 #include <errno.h>
 #include <locale.h>
 #include <locale.h>
 #include <stdarg.h>
 #include <stdarg.h>
@@ -39,7 +41,6 @@
 #include <X11/cursorfont.h>
 #include <X11/cursorfont.h>
 #include <X11/keysym.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/Xatom.h>
-#include <X11/Xlib.h>
 #include <X11/Xproto.h>
 #include <X11/Xproto.h>
 #include <X11/Xutil.h>
 #include <X11/Xutil.h>
 
 
@@ -55,25 +56,6 @@ enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
 
 
-/* typedefs */
-typedef struct Client Client;
-
-struct Client {
-	char name[256];
-	int x, y, w, h;
-	int rx, ry, rw, rh; /* revert geometry */
-	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
-	int minax, maxax, minay, maxay;
-	long flags;
-	unsigned int border, oldborder;
-	Bool isbanned, isfixed, ismax, isfloating, wasfloating;
-	Bool *tags;
-	Client *next;
-	Client *prev;
-	Client *snext;
-	Window win;
-};
-
 typedef struct {
 typedef struct {
 	int x, y, w, h;
 	int x, y, w, h;
 	unsigned long norm[ColLast];
 	unsigned long norm[ColLast];

+ 20 - 0
dwm.h

@@ -0,0 +1,20 @@
+/* See LICENSE file for copyright and license details. */
+#include <X11/Xlib.h>
+
+/* typedefs */
+typedef struct Client Client;
+struct Client {
+	char name[256];
+	int x, y, w, h;
+	int rx, ry, rw, rh; /* revert geometry */
+	int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+	int minax, maxax, minay, maxay;
+	long flags;
+	unsigned int border, oldborder;
+	Bool isbanned, isfixed, ismax, isfloating, wasfloating;
+	Bool *tags;
+	Client *next;
+	Client *prev;
+	Client *snext;
+	Window win;
+};