all: Prepare the code to Doxygen: Add function comment with definition, parameter & return precision
This commit is contained in:
parent
97c8da0153
commit
9e779d5aa6
38
src/bar.c
38
src/bar.c
@ -32,6 +32,17 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Create a BarWindow
|
||||
* \param parent Parent window of the BarWindow
|
||||
* \param x X position
|
||||
* \param y Y position
|
||||
* \param w BarWindow Width
|
||||
* \param h BarWindow Height
|
||||
* \param bord Bord width
|
||||
* \param color BarWindow color
|
||||
* \param entermask Bool for know if the EnterMask mask is needed
|
||||
* \return The new BarWindow pointer
|
||||
*/
|
||||
BarWindow*
|
||||
bar_create(Window parent, int x, int y, uint w, uint h, int bord, uint color, Bool entermask)
|
||||
{
|
||||
@ -63,8 +74,11 @@ bar_create(Window parent, int x, int y, uint w, uint h, int bord, uint color, Bo
|
||||
bw->color = color;
|
||||
|
||||
return bw;
|
||||
}
|
||||
}
|
||||
|
||||
/** Delete a BarWindow
|
||||
* \param bw BarWindow pointer
|
||||
*/
|
||||
void
|
||||
bar_delete(BarWindow *bw)
|
||||
{
|
||||
@ -76,6 +90,9 @@ bar_delete(BarWindow *bw)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Map a BarWindow
|
||||
* \param bw BarWindow pointer
|
||||
*/
|
||||
void
|
||||
bar_map(BarWindow *bw)
|
||||
{
|
||||
@ -88,6 +105,9 @@ bar_map(BarWindow *bw)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Unmap a BarWindow
|
||||
* \param bw BarWindow pointer
|
||||
*/
|
||||
void
|
||||
bar_unmap(BarWindow *bw)
|
||||
{
|
||||
@ -99,6 +119,11 @@ bar_unmap(BarWindow *bw)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Move a BarWindow
|
||||
* \param bw BarWindow pointer
|
||||
* \param x X position
|
||||
* \param y Y poistion
|
||||
*/
|
||||
void
|
||||
bar_move(BarWindow *bw, int x, int y)
|
||||
{
|
||||
@ -110,6 +135,11 @@ bar_move(BarWindow *bw, int x, int y)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Resize a BarWindow
|
||||
* \param bw BarWindow pointer
|
||||
* \param w Width
|
||||
* \param h Height
|
||||
*/
|
||||
void
|
||||
bar_resize(BarWindow *bw, uint w, uint h)
|
||||
{
|
||||
@ -123,6 +153,9 @@ bar_resize(BarWindow *bw, uint w, uint h)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Refresh the BarWindowColor
|
||||
* \param bw BarWindow pointer
|
||||
*/
|
||||
void
|
||||
bar_refresh_color(BarWindow *bw)
|
||||
{
|
||||
@ -133,6 +166,9 @@ bar_refresh_color(BarWindow *bw)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Refresh a BarWindow
|
||||
* \param bw BarWindow pointer
|
||||
*/
|
||||
void
|
||||
bar_refresh(BarWindow *bw)
|
||||
{
|
||||
|
||||
86
src/client.c
86
src/client.c
@ -32,6 +32,11 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Calcule how many of client there are
|
||||
* Per tag
|
||||
* \param tag Tag number
|
||||
* \return Number of client
|
||||
*/
|
||||
int
|
||||
client_pertag(int tag)
|
||||
{
|
||||
@ -45,6 +50,9 @@ client_pertag(int tag)
|
||||
return i;
|
||||
}
|
||||
|
||||
/** Attach client in the client chain
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_attach(Client *c)
|
||||
{
|
||||
@ -56,6 +64,9 @@ client_attach(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Send a ConfigureRequest event to the Client
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_configure(Client *c)
|
||||
{
|
||||
@ -77,7 +88,9 @@ client_configure(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/** Detach a client to the client chain
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_detach(Client *c)
|
||||
{
|
||||
@ -89,7 +102,9 @@ client_detach(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Fixed, need testing */
|
||||
/** Switch to the previous client
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_client_prev(uicb_t cmd)
|
||||
{
|
||||
@ -116,6 +131,9 @@ uicb_client_prev(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Switch to the next client
|
||||
* \param cnd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_client_next(uicb_t cmd)
|
||||
{
|
||||
@ -138,6 +156,9 @@ uicb_client_next(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the focus to a client
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_focus(Client *c)
|
||||
{
|
||||
@ -170,6 +191,10 @@ client_focus(Client *c)
|
||||
}
|
||||
|
||||
/* Get Client with any window Client member {{{ */
|
||||
/** Get a client->win with a window
|
||||
* \param w Window
|
||||
* \return The client
|
||||
*/
|
||||
Client* client_gb_win(Window w)
|
||||
{
|
||||
Client *c;
|
||||
@ -179,6 +204,10 @@ client_focus(Client *c)
|
||||
return c;
|
||||
}
|
||||
|
||||
/** Get a client->frame with a window
|
||||
* \param w Window
|
||||
* \return The client
|
||||
*/
|
||||
Client* client_gb_frame(Window w)
|
||||
{
|
||||
Client *c;
|
||||
@ -188,6 +217,10 @@ client_focus(Client *c)
|
||||
return c;
|
||||
}
|
||||
|
||||
/** Get a client->titlebar with a window
|
||||
* \param w Window
|
||||
* \return The client
|
||||
*/
|
||||
Client* client_gb_titlebar(Window w)
|
||||
{
|
||||
Client *c;
|
||||
@ -197,6 +230,10 @@ client_focus(Client *c)
|
||||
return c;
|
||||
}
|
||||
|
||||
/** Get a client->resize with a window
|
||||
* \param w Window
|
||||
* \return The client
|
||||
*/
|
||||
Client* client_gb_resize(Window w)
|
||||
{
|
||||
Client *c;
|
||||
@ -207,6 +244,9 @@ client_focus(Client *c)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/** Get a client name
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_get_name(Client *c)
|
||||
{
|
||||
@ -219,6 +259,9 @@ client_get_name(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Hide a client (for tag switching)
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_hide(Client *c)
|
||||
{
|
||||
@ -229,7 +272,10 @@ client_hide(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/** Check if the client 'c' is hide
|
||||
* \param c Client pointer
|
||||
* \return True if the client is hide; False if not
|
||||
*/
|
||||
Bool
|
||||
ishide(Client *c)
|
||||
{
|
||||
@ -238,6 +284,9 @@ ishide(Client *c)
|
||||
return True;
|
||||
}
|
||||
|
||||
/** Kill a client
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_client_kill(uicb_t cmd)
|
||||
{
|
||||
@ -256,6 +305,9 @@ uicb_client_kill(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Map a client
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_map(Client *c)
|
||||
{
|
||||
@ -267,6 +319,10 @@ client_map(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Manage a client with a window and his attributes
|
||||
* \param w Cient's futur Window
|
||||
* \param wa XWindowAttributes pointer, Window w attributes
|
||||
*/
|
||||
void
|
||||
client_manage(Window w, XWindowAttributes *wa)
|
||||
{
|
||||
@ -304,6 +360,12 @@ client_manage(Window w, XWindowAttributes *wa)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Move and Resize a client
|
||||
* \param c Client pointer
|
||||
* \param geo Coordinate info for the future size
|
||||
* of the client
|
||||
* \param r Bool for resize hint or not
|
||||
*/
|
||||
void
|
||||
client_moveresize(Client *c, XRectangle geo, bool r)
|
||||
{
|
||||
@ -370,6 +432,9 @@ client_moveresize(Client *c, XRectangle geo, bool r)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Get client size hints
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_size_hints(Client *c)
|
||||
{
|
||||
@ -441,6 +506,9 @@ client_size_hints(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Raise a client
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_raise(Client *c)
|
||||
{
|
||||
@ -452,6 +520,9 @@ client_raise(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Raise the selected client
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_client_raise(uicb_t cmd)
|
||||
{
|
||||
@ -460,6 +531,9 @@ uicb_client_raise(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** UnHide a client (for tag switching)
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_unhide(Client *c)
|
||||
{
|
||||
@ -470,6 +544,9 @@ client_unhide(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Unmanage a client
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_unmanage(Client *c)
|
||||
{
|
||||
@ -498,6 +575,9 @@ client_unmanage(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Unmap a client
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
client_unmap(Client *c)
|
||||
{
|
||||
|
||||
@ -167,7 +167,8 @@ var_to_str(char *conf_choice)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/** Configuration initialization
|
||||
*/
|
||||
void
|
||||
init_conf(void)
|
||||
{
|
||||
|
||||
21
src/draw.c
21
src/draw.c
@ -32,6 +32,15 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Draw a string in a Drawable
|
||||
* \param d Drawable
|
||||
* \param x X position
|
||||
* \param y Y position
|
||||
* \param fg Foreground text color
|
||||
* \param bg Background text color
|
||||
* \param pad Text padding
|
||||
* \param str String that will be draw
|
||||
*/
|
||||
void
|
||||
draw_text(Drawable d, int x, int y, char* fg, uint bg, int pad, char *str)
|
||||
{
|
||||
@ -61,6 +70,14 @@ draw_text(Drawable d, int x, int y, char* fg, uint bg, int pad, char *str)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Draw a Rectangle in a drawable
|
||||
* \param dr Drawable
|
||||
* \param x X position
|
||||
* \param y Y position
|
||||
* \param w Width
|
||||
* \param h Height
|
||||
* \param color Color of the rectangle
|
||||
*/
|
||||
void
|
||||
draw_rectangle(Drawable dr, int x, int y, uint w, uint h, uint color)
|
||||
{
|
||||
@ -72,6 +89,10 @@ draw_rectangle(Drawable dr, int x, int y, uint w, uint h, uint color)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Calculates the text's size relatively to the font
|
||||
* \param text Text string
|
||||
* \return final text width
|
||||
*/
|
||||
ushort
|
||||
textw(const char *text)
|
||||
{
|
||||
|
||||
53
src/event.c
53
src/event.c
@ -32,7 +32,9 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/* BUTTONPRESS */
|
||||
/** ButtonPress handle event
|
||||
* \param ev XButtonEvent pointer
|
||||
*/
|
||||
void
|
||||
buttonpress(XButtonEvent *ev)
|
||||
{
|
||||
@ -119,7 +121,9 @@ buttonpress(XButtonEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* CONFIGUREREQUEST */
|
||||
/** ConfigureRequest handle event
|
||||
* \param ev XConfigureRequestEvent pointer
|
||||
*/
|
||||
void
|
||||
configurerequest(XConfigureRequestEvent *ev)
|
||||
{
|
||||
@ -167,7 +171,9 @@ configurerequest(XConfigureRequestEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* DESTROYNOTIFY */
|
||||
/** DestroyNotify handle event
|
||||
* \param ev XDestroyWindowEvent pointer
|
||||
*/
|
||||
void
|
||||
destroynotify(XDestroyWindowEvent *ev)
|
||||
{
|
||||
@ -178,7 +184,9 @@ destroynotify(XDestroyWindowEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* ENTERNOTIFY */
|
||||
/** EnterNotify handle event
|
||||
* \param ev XCrossingEvent pointer
|
||||
*/
|
||||
void
|
||||
enternotify(XCrossingEvent *ev)
|
||||
{
|
||||
@ -198,7 +206,9 @@ enternotify(XCrossingEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* EXPOSE */
|
||||
/** ExposeEvent handle event
|
||||
* \param ev XExposeEvent pointer
|
||||
*/
|
||||
void
|
||||
expose(XExposeEvent *ev)
|
||||
{
|
||||
@ -215,7 +225,10 @@ expose(XExposeEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* FOCUSIN */
|
||||
/** FocusChange handle event
|
||||
* \param ev XFocusChangeEvent pointer
|
||||
* \return
|
||||
*/
|
||||
void
|
||||
focusin(XFocusChangeEvent *ev)
|
||||
{
|
||||
@ -225,6 +238,8 @@ focusin(XFocusChangeEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Key grabbing function
|
||||
*/
|
||||
void
|
||||
grabkeys(void)
|
||||
{
|
||||
@ -244,8 +259,9 @@ grabkeys(void)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* KEYPRESS */
|
||||
/** KeyPress handle event
|
||||
* \param ev XKeyPressedEvent pointer
|
||||
*/
|
||||
void
|
||||
keypress(XKeyPressedEvent *ev)
|
||||
{
|
||||
@ -263,7 +279,9 @@ keypress(XKeyPressedEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* MAPPINGNOTIFY */
|
||||
/** MapNotify handle event
|
||||
* \param ev XMappingEvent pointer
|
||||
*/
|
||||
void
|
||||
mapnotify(XMappingEvent *ev)
|
||||
{
|
||||
@ -273,7 +291,9 @@ mapnotify(XMappingEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* MAPREQUEST */
|
||||
/** MapRequest handle event
|
||||
* \param ev XMapRequestEvent pointer
|
||||
*/
|
||||
void
|
||||
maprequest(XMapRequestEvent *ev)
|
||||
{
|
||||
@ -287,8 +307,9 @@ maprequest(XMapRequestEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* PROPERTYNOTIFY */
|
||||
/** PropertyNotify handle event
|
||||
* \param ev XPropertyEvent pointer
|
||||
*/
|
||||
void
|
||||
propertynotify(XPropertyEvent *ev)
|
||||
{
|
||||
@ -319,6 +340,9 @@ propertynotify(XPropertyEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/** UnmapNotify handle event
|
||||
* \param XUnmapEvent pointer
|
||||
*/
|
||||
void
|
||||
unmapnotify(XUnmapEvent *ev)
|
||||
{
|
||||
@ -334,7 +358,10 @@ unmapnotify(XUnmapEvent *ev)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Handle */
|
||||
/** Event handle function: execute every function
|
||||
* handle by event
|
||||
* \param ev Event
|
||||
*/
|
||||
void
|
||||
getevent(XEvent ev)
|
||||
{
|
||||
|
||||
11
src/frame.c
11
src/frame.c
@ -32,6 +32,10 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Frame creation function, for make a
|
||||
* client frame, and configure it
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
frame_create(Client *c)
|
||||
{
|
||||
@ -88,6 +92,10 @@ frame_create(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Move a frame
|
||||
* \param c The client frame
|
||||
* \param geo Coordinate info for move the frame
|
||||
*/
|
||||
void
|
||||
frame_moveresize(Client *c, XRectangle geo)
|
||||
{
|
||||
@ -111,6 +119,9 @@ frame_moveresize(Client *c, XRectangle geo)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Update a frame
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
frame_update(Client *c)
|
||||
{
|
||||
|
||||
@ -32,6 +32,8 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Init the Infobar
|
||||
*/
|
||||
void
|
||||
infobar_init(void)
|
||||
{
|
||||
@ -60,6 +62,8 @@ infobar_init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Draw the Infobar
|
||||
*/
|
||||
void
|
||||
infobar_draw(void)
|
||||
{
|
||||
@ -103,6 +107,8 @@ infobar_draw(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Draw the layout button in the InfoBar
|
||||
*/
|
||||
void
|
||||
infobar_draw_layout(void)
|
||||
{
|
||||
@ -155,6 +161,8 @@ infobar_draw_layout(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Draw the taglist in the InfoBar
|
||||
*/
|
||||
void
|
||||
infobar_draw_taglist(void)
|
||||
{
|
||||
@ -184,6 +192,9 @@ infobar_draw_taglist(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Toggle the infobar position
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_infobar_togglepos(uicb_t cmd)
|
||||
{
|
||||
|
||||
14
src/init.c
14
src/init.c
@ -32,6 +32,8 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Init WMFS
|
||||
*/
|
||||
void
|
||||
init(void)
|
||||
{
|
||||
@ -56,6 +58,8 @@ init(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Init the font
|
||||
*/
|
||||
void
|
||||
init_font(void)
|
||||
{
|
||||
@ -67,6 +71,8 @@ init_font(void)
|
||||
}
|
||||
}
|
||||
|
||||
/** Init WMFS cursor
|
||||
*/
|
||||
void
|
||||
init_cursor(void)
|
||||
{
|
||||
@ -77,6 +83,8 @@ init_cursor(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Init key modifier
|
||||
*/
|
||||
void
|
||||
init_key(void)
|
||||
{
|
||||
@ -98,6 +106,8 @@ init_key(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Init atoms
|
||||
*/
|
||||
void
|
||||
init_atom(void)
|
||||
{
|
||||
@ -112,6 +122,8 @@ init_atom(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Init root Window
|
||||
*/
|
||||
void
|
||||
init_root(void)
|
||||
{
|
||||
@ -130,6 +142,8 @@ init_root(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Init screen geometry
|
||||
*/
|
||||
void
|
||||
init_geometry(void)
|
||||
{
|
||||
|
||||
55
src/layout.c
55
src/layout.c
@ -32,6 +32,8 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Arrange All
|
||||
*/
|
||||
void
|
||||
arrange(void)
|
||||
{
|
||||
@ -55,6 +57,8 @@ arrange(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** The free layout function
|
||||
*/
|
||||
void
|
||||
freelayout(void)
|
||||
{
|
||||
@ -80,6 +84,9 @@ freelayout(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Layout switching function
|
||||
* \param b Bool True : next False : previous
|
||||
*/
|
||||
void
|
||||
layoutswitch(Bool b)
|
||||
{
|
||||
@ -102,6 +109,9 @@ layoutswitch(Bool b)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Tile layout switching function
|
||||
* \param b Bool True : next False : previous
|
||||
*/
|
||||
void
|
||||
layout_tile_switch(Bool b)
|
||||
{
|
||||
@ -125,6 +135,9 @@ layout_tile_switch(Bool b)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the next layout
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_layout_next(uicb_t cmd)
|
||||
{
|
||||
@ -133,6 +146,9 @@ uicb_layout_next(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the previous layout
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_layout_prev(uicb_t cmd)
|
||||
{
|
||||
@ -141,6 +157,8 @@ uicb_layout_prev(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Max layout function
|
||||
*/
|
||||
void
|
||||
maxlayout(void)
|
||||
{
|
||||
@ -166,8 +184,11 @@ maxlayout(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* To use in a for, select only the
|
||||
* client who can be tiled */
|
||||
/** Sort all the client that can be
|
||||
* tiled
|
||||
* \param c Client pointer
|
||||
* \return a client pointer
|
||||
*/
|
||||
Client*
|
||||
nexttiled(Client *c)
|
||||
{
|
||||
@ -176,6 +197,9 @@ nexttiled(Client *c)
|
||||
return c;
|
||||
}
|
||||
|
||||
/** Set the mwfact
|
||||
* \param cmd Mwfact
|
||||
*/
|
||||
void
|
||||
uicb_set_mwfact(uicb_t cmd)
|
||||
{
|
||||
@ -193,6 +217,9 @@ uicb_set_mwfact(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the nmaster
|
||||
* \param cmd nmaster
|
||||
*/
|
||||
void
|
||||
uicb_set_nmaster(uicb_t cmd)
|
||||
{
|
||||
@ -211,6 +238,8 @@ uicb_set_nmaster(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Grid layout function
|
||||
*/
|
||||
void
|
||||
grid(void)
|
||||
{
|
||||
@ -266,6 +295,9 @@ grid(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Multi tile function
|
||||
* \param type Postion type { Top, Bottom, Left, Right }
|
||||
*/
|
||||
void
|
||||
multi_tile(Position type)
|
||||
{
|
||||
@ -394,6 +426,8 @@ multi_tile(Position type)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Tile Right function
|
||||
*/
|
||||
void
|
||||
tile(void)
|
||||
{
|
||||
@ -402,6 +436,8 @@ tile(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Tile Left function
|
||||
*/
|
||||
void
|
||||
tile_left(void)
|
||||
{
|
||||
@ -410,6 +446,8 @@ tile_left(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Tile Top function
|
||||
*/
|
||||
void
|
||||
tile_top(void)
|
||||
{
|
||||
@ -417,6 +455,10 @@ tile_top(void)
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/** Tile Bottom function
|
||||
*/
|
||||
void
|
||||
tile_bottom(void)
|
||||
{
|
||||
@ -425,6 +467,9 @@ tile_bottom(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Put the selected client to the master postion
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_tile_switch(uicb_t cmd)
|
||||
{
|
||||
@ -442,6 +487,9 @@ uicb_tile_switch(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Toggle the selected client to free
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_togglefree(uicb_t cmd)
|
||||
{
|
||||
@ -458,6 +506,9 @@ uicb_togglefree(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Toggle the selected client to max
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_togglemax(uicb_t cmd)
|
||||
{
|
||||
|
||||
16
src/mouse.c
16
src/mouse.c
@ -32,6 +32,9 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Move the client with the mouse
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
mouse_move(Client *c)
|
||||
{
|
||||
@ -78,6 +81,9 @@ mouse_move(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Resize a client with the mouse
|
||||
* \param c Client pointer
|
||||
*/
|
||||
void
|
||||
mouse_resize(Client *c)
|
||||
{
|
||||
@ -172,6 +178,10 @@ mouse_resize(Client *c)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Grab buttons
|
||||
* \param c Client pointer
|
||||
* \param focused For know if c is or not focused
|
||||
*/
|
||||
void
|
||||
mouse_grabbuttons(Client *c, Bool focused)
|
||||
{
|
||||
@ -196,6 +206,9 @@ mouse_grabbuttons(Client *c, Bool focused)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Move the selected client
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_mouse_move(uicb_t cmd)
|
||||
{
|
||||
@ -205,6 +218,9 @@ uicb_mouse_move(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Reisze the selected client
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_mouse_resize(uicb_t cmd)
|
||||
{
|
||||
|
||||
15
src/tag.c
15
src/tag.c
@ -32,8 +32,9 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/* if cmd is +X or -X, this is just switch
|
||||
* else {1, 2.. 9} it's go to the wanted tag. */
|
||||
/** Set a tag
|
||||
* \param cmd Tag number or '+' / '-'
|
||||
*/
|
||||
void
|
||||
uicb_tag(uicb_t cmd)
|
||||
{
|
||||
@ -61,6 +62,9 @@ uicb_tag(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the next tag
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_tag_next(uicb_t cmd)
|
||||
{
|
||||
@ -69,6 +73,9 @@ uicb_tag_next(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the previous tag
|
||||
* \param cmd uicb_t type unused
|
||||
*/
|
||||
void
|
||||
uicb_tag_prev(uicb_t cmd)
|
||||
{
|
||||
@ -77,6 +84,10 @@ uicb_tag_prev(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Transfert the selected client to
|
||||
* the wanted tag
|
||||
* \param cmd Wanted tag
|
||||
*/
|
||||
void
|
||||
uicb_tagtransfert(uicb_t cmd)
|
||||
{
|
||||
|
||||
28
src/util.c
28
src/util.c
@ -32,6 +32,11 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
/** Calloc with an error message if there is a probleme
|
||||
* \param uint Element
|
||||
* \param uint Size
|
||||
* \return void pointer
|
||||
*/
|
||||
void*
|
||||
emalloc(uint element, uint size)
|
||||
{
|
||||
@ -43,6 +48,9 @@ emalloc(uint element, uint size)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/** Free with a conditions
|
||||
* \param ptr void pointer
|
||||
*/
|
||||
void
|
||||
efree(void *ptr)
|
||||
{
|
||||
@ -52,6 +60,10 @@ efree(void *ptr)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Get a color with a string
|
||||
* \param color Color string
|
||||
* \return Color pixel
|
||||
*/
|
||||
ulong
|
||||
getcolor(char *color)
|
||||
{
|
||||
@ -62,6 +74,10 @@ getcolor(char *color)
|
||||
return xcolor.pixel;
|
||||
}
|
||||
|
||||
/** Get a Window WM State
|
||||
* \param win Window
|
||||
* \return The state
|
||||
*/
|
||||
long
|
||||
getwinstate(Window win)
|
||||
{
|
||||
@ -82,13 +98,20 @@ getwinstate(Window win)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/** Round function
|
||||
* \param x double type
|
||||
* \return the round of x
|
||||
*/
|
||||
double
|
||||
round(double x)
|
||||
{
|
||||
return (x > 0) ? x + 0.5 : x - 0.5;
|
||||
}
|
||||
|
||||
/** Set the window WM State
|
||||
* \param win Window target
|
||||
* \param state WM State
|
||||
*/
|
||||
void
|
||||
setwinstate(Window win, long state)
|
||||
{
|
||||
@ -100,6 +123,9 @@ setwinstate(Window win, long state)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Execute a sh command
|
||||
* \param cmd Command
|
||||
*/
|
||||
void
|
||||
uicb_spawn(uicb_t cmd)
|
||||
{
|
||||
|
||||
26
src/wmfs.c
26
src/wmfs.c
@ -32,7 +32,6 @@
|
||||
|
||||
#include "wmfs.h"
|
||||
|
||||
|
||||
int
|
||||
errorhandler(Display *d, XErrorEvent *event)
|
||||
{
|
||||
@ -57,13 +56,14 @@ errorhandler(Display *d, XErrorEvent *event)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* for no-important error */
|
||||
int
|
||||
errorhandlerdummy(Display *d, XErrorEvent *event)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** Clean wmfs before the exit
|
||||
*/
|
||||
void
|
||||
quit(void)
|
||||
{
|
||||
@ -85,6 +85,9 @@ quit(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** WMFS main loop: Check stdin and
|
||||
* execute the event loop
|
||||
*/
|
||||
void
|
||||
mainloop(void)
|
||||
{
|
||||
@ -124,7 +127,7 @@ mainloop(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
strncpy(infobar->statustext, sbuf, strlen(sbuf));
|
||||
readstdin = False;
|
||||
@ -141,6 +144,11 @@ mainloop(void)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/** Set the exiting variable to True
|
||||
* for stop the main loop
|
||||
* \param unused uicb_t
|
||||
*/
|
||||
void
|
||||
uicb_quit(uicb_t cmd)
|
||||
{
|
||||
@ -149,7 +157,9 @@ uicb_quit(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/* scan all the client who was in X before wmfs */
|
||||
/** Scan if there are window on X
|
||||
* for manage it
|
||||
*/
|
||||
void
|
||||
scan(void)
|
||||
{
|
||||
@ -184,6 +194,9 @@ scan(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Signal handle function
|
||||
* \param signum Signal number
|
||||
*/
|
||||
void
|
||||
handle_signal(int signum)
|
||||
{
|
||||
@ -205,6 +218,11 @@ handle_signal(int signum)
|
||||
return;
|
||||
}
|
||||
|
||||
/** main function
|
||||
* \param argc ?
|
||||
* \param argv ?
|
||||
* \return 0
|
||||
*/
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user