Cleanup indentation with clang-format and changed a few variable names

This commit is contained in:
o9000
2015-11-20 23:28:37 +01:00
parent c0e62e2e79
commit 4a6937826c
51 changed files with 4145 additions and 3789 deletions

View File

@@ -13,19 +13,25 @@
#include "common.h"
#include "timer.h"
typedef enum TaskState {
TASK_NORMAL = 0,
TASK_ACTIVE,
TASK_ICONIFIED,
TASK_URGENT,
TASK_STATE_COUNT,
} TaskState;
enum { TASK_NORMAL, TASK_ACTIVE, TASK_ICONIFIED, TASK_URGENT, TASK_STATE_COUNT };
extern timeout* urgent_timeout;
extern GSList* urgent_list;
extern timeout *urgent_timeout;
extern GSList *urgent_list;
// --------------------------------------------------
// global task parameter
typedef struct {
typedef struct GlobalTask {
Area area;
int text;
int icon;
int centered;
gboolean text;
gboolean icon;
gboolean centered;
int icon_posy;
int icon_size1;
@@ -35,7 +41,7 @@ typedef struct {
int saturation[TASK_STATE_COUNT];
int brightness[TASK_STATE_COUNT];
int config_asb_mask;
Background* background[TASK_STATE_COUNT];
Background *background[TASK_STATE_COUNT];
int config_background_mask;
// starting position for text ~ task_padding + task_border + icon_size
double text_posx, text_height;
@@ -43,10 +49,8 @@ typedef struct {
PangoFontDescription *font_desc;
Color font[TASK_STATE_COUNT];
int config_font_mask;
int tooltip_enabled;
} Global_task;
gboolean tooltip_enabled;
} GlobalTask;
typedef struct {
// always start with area
@@ -54,8 +58,8 @@ typedef struct {
// TODO: group task with list of windows here
Window win;
int desktop;
int current_state;
int desktop;
TaskState current_state;
Imlib_Image icon[TASK_STATE_COUNT];
Imlib_Image icon_hover[TASK_STATE_COUNT];
Imlib_Image icon_press[TASK_STATE_COUNT];
@@ -71,25 +75,23 @@ typedef struct {
int win_h;
} Task;
Task *add_task(Window win);
void remove_task(Task *task);
Task *add_task (Window win);
void remove_task (Task *tsk);
void draw_task(void *obj, cairo_t *c);
void on_change_task(void *obj);
void draw_task (void *obj, cairo_t *c);
void on_change_task (void *obj);
void get_icon (Task *tsk);
int get_title(Task *tsk);
void get_icon(Task *task);
gboolean get_title(Task *task);
void active_task();
void set_task_state(Task* tsk, int state);
void set_task_redraw(Task* tsk);
void set_task_state(Task *task, TaskState state);
void set_task_redraw(Task *task);
Task *find_active_task(Task *current_task, Task *active_task);
Task *next_task (Task *tsk);
Task *prev_task (Task *tsk);
Task *next_task(Task *task);
Task *prev_task(Task *task);
void add_urgent(Task *tsk);
void del_urgent(Task *tsk);
void add_urgent(Task *task);
void del_urgent(Task *task);
#endif