howm
howm
layout.c File Reference

All of howm's layouts (as well as layout handler) are implemented here. More...

#include <stddef.h>
#include <stdint.h>
#include "client.h"
#include "helper.h"
#include "howm.h"
#include "layout.h"
#include "types.h"
#include "xcb_help.h"

Functions

static void stack (monitor_t *m)
 Arrange the windows in a stack, whether that be horizontal or vertical is decided by the current_layout. More...
 
static void grid (monitor_t *m)
 Arrange the windows into a grid layout. More...
 
static void zoom (monitor_t *m)
 Have one window at a time taking up the entire screen. More...
 
void arrange_windows (monitor_t *m)
 Call the appropriate layout handler for each layout. More...
 
void change_layout (monitor_t *m, const int layout)
 Change the layout of the current workspace. More...
 
void prev_layout (monitor_t *m)
 Change to the previous layout. More...
 
void next_layout (monitor_t *m)
 Change to the next layout. More...
 
void last_layout (monitor_t *m)
 Change to the last used layout. More...
 

Variables

static void(* layout_handler [])(monitor_t *m)
 

Detailed Description

All of howm's layouts (as well as layout handler) are implemented here.

Author
Harvey Hunt
Date
2015

Function Documentation

void arrange_windows ( monitor_t m)

Call the appropriate layout handler for each layout.

Parameters
mThe monitor to be arranged.
void change_layout ( monitor_t m,
const int  layout 
)

Change the layout of the current workspace.

Parameters
mThe monitor to be arranged.
layoutRepresents the layout that should be used.
static void grid ( monitor_t m)
static

Arrange the windows into a grid layout.

Parameters
mThe monitor to be arranged.
static void stack ( monitor_t m)
static

Arrange the windows in a stack, whether that be horizontal or vertical is decided by the current_layout.

Parameters
mThe monitor to be arranged.
static void zoom ( monitor_t m)
static

Have one window at a time taking up the entire screen.

Sets the geometry of each window in order for the windows to be rendered to take up the entire screen.

Parameters
mThe monitor to be arranged.

Variable Documentation

void(* layout_handler[])(monitor_t *m)
static
Initial value:
= {
[GRID] = grid,
[ZOOM] = zoom,
}
static void grid(monitor_t *m)
Arrange the windows into a grid layout.
Definition: layout.c:52
Definition: layout.h:16
Definition: layout.h:16
Definition: layout.h:16
static void stack(monitor_t *m)
Arrange the windows in a stack, whether that be horizontal or vertical is decided by the current_layo...
Definition: layout.c:126
Definition: layout.h:16
Represents a stack. This stack is going to hold linked lists of clients. An example of the stack is b...
Definition: scratchpad.h:31
static void zoom(monitor_t *m)
Have one window at a time taking up the entire screen.
Definition: layout.c:101