dwm.h
changeset 823 fb5cbf0bd923
parent 814 6fa419036c2e
child 828 4cb4940d8355
equal deleted inserted replaced
822:72d7221858aa 823:fb5cbf0bd923
    38 
    38 
    39 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
    39 enum { NetSupported, NetWMName, NetLast };		/* EWMH atoms */
    40 enum { WMProtocols, WMDelete, WMState, WMLast };	/* default atoms */
    40 enum { WMProtocols, WMDelete, WMState, WMLast };	/* default atoms */
    41 enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
    41 enum { CurNormal, CurResize, CurMove, CurLast };	/* cursor */
    42 enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
    42 enum { ColBorder, ColFG, ColBG, ColLast };		/* color */
    43 
       
    44 typedef union {
       
    45 	const char *cmd;
       
    46 	int i;
       
    47 } Arg; /* argument type */
       
    48 
    43 
    49 typedef struct {
    44 typedef struct {
    50 	int ascent;
    45 	int ascent;
    51 	int descent;
    46 	int descent;
    52 	int height;
    47 	int height;
   104 /* client.c */
    99 /* client.c */
   105 extern void attach(Client *c);			/* attaches c to global client list */
   100 extern void attach(Client *c);			/* attaches c to global client list */
   106 extern void configure(Client *c);		/* send synthetic configure event */
   101 extern void configure(Client *c);		/* send synthetic configure event */
   107 extern void detach(Client *c);			/* detaches c from global client list */
   102 extern void detach(Client *c);			/* detaches c from global client list */
   108 extern void focus(Client *c);			/* focus c, c may be NULL */
   103 extern void focus(Client *c);			/* focus c, c may be NULL */
   109 extern void killclient(Arg arg);		/* kill c nicely */
   104 extern void killclient(const char *arg);		/* kill c nicely */
   110 extern void manage(Window w, XWindowAttributes *wa);	/* manage new client */
   105 extern void manage(Window w, XWindowAttributes *wa);	/* manage new client */
   111 extern void resize(Client *c, int x, int y,
   106 extern void resize(Client *c, int x, int y,
   112 		int w, int h, Bool sizehints);	/* resize with given coordinates c*/
   107 		int w, int h, Bool sizehints);	/* resize with given coordinates c*/
   113 extern void toggleversatile(Arg arg);		/* toggles focused client between versatile/and non-versatile state */
   108 extern void toggleversatile(const char *arg);		/* toggles focused client between versatile/and non-versatile state */
   114 extern void updatesizehints(Client *c);		/* update the size hint variables of c */
   109 extern void updatesizehints(Client *c);		/* update the size hint variables of c */
   115 extern void updatetitle(Client *c);		/* update the name of c */
   110 extern void updatetitle(Client *c);		/* update the name of c */
   116 extern void unmanage(Client *c);		/* destroy c */
   111 extern void unmanage(Client *c);		/* destroy c */
   117 
   112 
   118 /* draw.c */
   113 /* draw.c */
   123 
   118 
   124 /* event.c */
   119 /* event.c */
   125 extern void grabkeys(void);			/* grab all keys defined in config.h */
   120 extern void grabkeys(void);			/* grab all keys defined in config.h */
   126 
   121 
   127 /* layout.c */
   122 /* layout.c */
   128 extern void focusnext(Arg arg);		/* focuses next visible client, arg is ignored  */
   123 extern void focusnext(const char *arg);		/* focuses next visible client, arg is ignored  */
   129 extern void focusprev(Arg arg);		/* focuses previous visible client, arg is ignored */
   124 extern void focusprev(const char *arg);		/* focuses previous visible client, arg is ignored */
   130 extern void incmasterw(Arg arg);		/* increments the master width with arg's index value */
   125 extern void incmasterw(const char *arg);		/* increments the master width with arg's index value */
   131 extern void incnmaster(Arg arg);		/* increments nmaster with arg's index value */
   126 extern void incnmaster(const char *arg);		/* increments nmaster with arg's index value */
   132 extern void initlayouts(void);			/* initialize layout array */
   127 extern void initlayouts(void);			/* initialize layout array */
   133 extern Client *nexttiled(Client *c);		/* returns tiled successor of c */
   128 extern Client *nexttiled(Client *c);		/* returns tiled successor of c */
   134 extern void restack(void);			/* restores z layers of all clients */
   129 extern void restack(void);			/* restores z layers of all clients */
   135 extern void setlayout(Arg arg);		/* sets layout, -1 toggles */
   130 extern void setlayout(const char *arg);		/* sets layout, -1 toggles */
   136 extern void togglemax(Arg arg);			/* toggles maximization of versatile client */
   131 extern void togglemax(const char *arg);			/* toggles maximization of versatile client */
   137 extern void versatile(void);			/* arranges all windows versatile */
   132 extern void versatile(void);			/* arranges all windows versatile */
   138 
   133 
   139 /* main.c */
   134 /* main.c */
   140 extern void quit(Arg arg);			/* quit dwm nicely */
   135 extern void quit(const char *arg);			/* quit dwm nicely */
   141 extern void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
   136 extern void sendevent(Window w, Atom a, long value);	/* send synthetic event to w */
   142 extern int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
   137 extern int xerror(Display *dsply, XErrorEvent *ee);	/* dwm's X error handler */
   143 
   138 
   144 /* tag.c */
   139 /* tag.c */
   145 extern void compileregs(void);			/* initialize regexps of rules defined in config.h */
   140 extern void compileregs(void);			/* initialize regexps of rules defined in config.h */
   146 extern Bool isvisible(Client *c);		/* returns True if client is visible */
   141 extern Bool isvisible(Client *c);		/* returns True if client is visible */
   147 extern void settags(Client *c, Client *trans);	/* sets tags of c */
   142 extern void settags(Client *c, Client *trans);	/* sets tags of c */
   148 extern void tag(Arg arg);			/* tags c with arg's index */
   143 extern void tag(const char *arg);			/* tags c with arg's index */
   149 extern void toggletag(Arg arg);		/* toggles c tags with arg's index */
   144 extern void toggletag(const char *arg);		/* toggles c tags with arg's index */
   150 extern void toggleview(Arg arg);		/* toggles the tag with arg's index (in)visible */
   145 extern void toggleview(const char *arg);		/* toggles the tag with arg's index (in)visible */
   151 extern void view(Arg arg);			/* views the tag with arg's index */
   146 extern void view(const char *arg);			/* views the tag with arg's index */
   152 extern void zoom(Arg arg);			/* zooms the focused client to master area, arg is ignored */
   147 extern void zoom(const char *arg);			/* zooms the focused client to master area, arg is ignored */
   153 
   148 
   154 /* util.c */
   149 /* util.c */
   155 extern void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
   150 extern void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
   156 extern void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
   151 extern void eprint(const char *errstr, ...);	/* prints errstr and exits with 1 */
   157 extern void spawn(Arg arg);			/* forks a new subprocess with arg's cmd */
   152 extern void spawn(const char *arg);			/* forks a new subprocess with arg's cmd */
   158 
   153