aboutsummaryrefslogtreecommitdiff
path: root/src/taskbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/taskbar.c')
-rw-r--r--src/taskbar.c108
1 files changed, 81 insertions, 27 deletions
diff --git a/src/taskbar.c b/src/taskbar.c
index 0b9a130..7975d3b 100644
--- a/src/taskbar.c
+++ b/src/taskbar.c
@@ -81,7 +81,9 @@ static void ProcessTaskMotionEvent(TrayComponentType *cp,
/***************************************************************************
***************************************************************************/
-void InitializeTaskBar() {
+void
+InitializeTaskBar()
+{
bars = NULL;
taskBarNodes = NULL;
taskBarNodesTail = NULL;
@@ -90,7 +92,9 @@ void InitializeTaskBar() {
/***************************************************************************
***************************************************************************/
-void StartupTaskBar() {
+void
+StartupTaskBar()
+{
minimizedPixmap = JXCreatePixmapFromBitmapData(display, rootWindow,
minimized_bitmap, 4, 4, colors[COLOR_TASK_FG],
colors[COLOR_TASK_BG], rootDepth);
@@ -98,7 +102,9 @@ void StartupTaskBar() {
/***************************************************************************
***************************************************************************/
-void ShutdownTaskBar() {
+void
+ShutdownTaskBar()
+{
TaskBarType *bp;
@@ -111,7 +117,9 @@ void ShutdownTaskBar() {
/***************************************************************************
***************************************************************************/
-void DestroyTaskBar() {
+void
+DestroyTaskBar()
+{
TaskBarType *bp;
@@ -158,7 +166,9 @@ TrayComponentType *CreateTaskBar() {
/***************************************************************************
***************************************************************************/
-void SetSize(TrayComponentType *cp, int width, int height) {
+void
+SetSize(TrayComponentType *cp, int width, int height)
+{
TaskBarType *tp;
@@ -182,7 +192,9 @@ void SetSize(TrayComponentType *cp, int width, int height) {
/***************************************************************************
***************************************************************************/
-void Create(TrayComponentType *cp) {
+void
+Create(TrayComponentType *cp)
+{
TaskBarType *tp;
@@ -212,7 +224,9 @@ void Create(TrayComponentType *cp) {
/***************************************************************************
***************************************************************************/
-void Resize(TrayComponentType *cp) {
+void
+Resize(TrayComponentType *cp)
+{
TaskBarType *tp;
@@ -246,13 +260,17 @@ void Resize(TrayComponentType *cp) {
/***************************************************************************
***************************************************************************/
-void Destroy(TrayComponentType *cp) {
+void
+Destroy(TrayComponentType *cp)
+{
}
/***************************************************************************
***************************************************************************/
-void ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask) {
+void
+ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask)
+{
TaskBarType *bar = (TaskBarType*)cp->object;
Node *np;
@@ -302,7 +320,9 @@ void ProcessTaskButtonEvent(TrayComponentType *cp, int x, int y, int mask) {
/***************************************************************************
***************************************************************************/
-void ProcessTaskMotionEvent(TrayComponentType *cp, int x, int y, int mask) {
+void
+ProcessTaskMotionEvent(TrayComponentType *cp, int x, int y, int mask)
+{
TaskBarType *bp = (TaskBarType*)cp->object;
@@ -314,7 +334,9 @@ void ProcessTaskMotionEvent(TrayComponentType *cp, int x, int y, int mask) {
/***************************************************************************
***************************************************************************/
-void ShowTaskWindowMenu(TaskBarType *bar, Node *np) {
+void
+ShowTaskWindowMenu(TaskBarType *bar, Node *np)
+{
int x, y;
int mwidth, mheight;
@@ -347,7 +369,9 @@ void ShowTaskWindowMenu(TaskBarType *bar, Node *np) {
/***************************************************************************
***************************************************************************/
-void AddClientToTaskBar(ClientNode *np) {
+void
+AddClientToTaskBar(ClientNode *np)
+{
Node *tp;
@@ -385,7 +409,9 @@ void AddClientToTaskBar(ClientNode *np) {
/***************************************************************************
***************************************************************************/
-void RemoveClientFromTaskBar(ClientNode *np) {
+void
+RemoveClientFromTaskBar(ClientNode *np)
+{
Node *tp;
@@ -416,7 +442,9 @@ void RemoveClientFromTaskBar(ClientNode *np) {
/***************************************************************************
***************************************************************************/
-void UpdateTaskBar() {
+void
+UpdateTaskBar()
+{
TaskBarType *bp;
unsigned int count;
@@ -446,7 +474,9 @@ void UpdateTaskBar() {
/***************************************************************************
***************************************************************************/
-void SignalTaskbar(const TimeType *now, int x, int y) {
+void
+SignalTaskbar(const TimeType *now, int x, int y)
+{
TaskBarType *bp;
Node *np;
@@ -473,7 +503,9 @@ void SignalTaskbar(const TimeType *now, int x, int y) {
/***************************************************************************
***************************************************************************/
-void Render(const TaskBarType *bp) {
+void
+Render(const TaskBarType *bp)
+{
Node *tp;
ButtonNode button;
@@ -583,7 +615,9 @@ void Render(const TaskBarType *bp) {
/***************************************************************************
***************************************************************************/
-void FocusNext() {
+void
+FocusNext()
+{
Node *tp;
@@ -620,7 +654,9 @@ void FocusNext() {
/***************************************************************************
***************************************************************************/
-void FocusPrevious() {
+void
+FocusPrevious()
+{
Node *tp;
@@ -657,7 +693,9 @@ void FocusPrevious() {
/***************************************************************************
***************************************************************************/
-void FocusNextStackedCircular() {
+void
+FocusNextStackedCircular()
+{
ClientNode *ac;
ClientNode *np;
@@ -711,7 +749,9 @@ void FocusNextStackedCircular() {
/***************************************************************************
***************************************************************************/
-void FocusPreviousStackedCircular() {
+void
+FocusPreviousStackedCircular()
+{
ClientNode *ac;
ClientNode *np;
@@ -830,7 +870,9 @@ Node *GetNode(TaskBarType *bar, int x) {
/***************************************************************************
***************************************************************************/
-unsigned int GetItemCount() {
+unsigned int
+GetItemCount()
+{
Node *tp;
unsigned int count;
@@ -848,7 +890,9 @@ unsigned int GetItemCount() {
/***************************************************************************
***************************************************************************/
-int ShouldShowItem(const ClientNode *np) {
+int
+ShouldShowItem(const ClientNode *np)
+{
if(np->state.desktop != currentDesktop
&& !(np->state.status & STAT_STICKY)) {
@@ -874,7 +918,9 @@ int ShouldShowItem(const ClientNode *np) {
/***************************************************************************
***************************************************************************/
-int ShouldFocusItem(const ClientNode *np) {
+int
+ShouldFocusItem(const ClientNode *np)
+{
if(np->state.desktop != currentDesktop
&& !(np->state.status & STAT_STICKY)) {
@@ -899,7 +945,9 @@ int ShouldFocusItem(const ClientNode *np) {
/***************************************************************************
***************************************************************************/
-unsigned int GetItemWidth(const TaskBarType *bp, unsigned int itemCount) {
+unsigned int
+GetItemWidth(const TaskBarType *bp, unsigned int itemCount)
+{
unsigned int itemWidth;
@@ -924,7 +972,9 @@ unsigned int GetItemWidth(const TaskBarType *bp, unsigned int itemCount) {
/***************************************************************************
***************************************************************************/
-void SetMaxTaskBarItemWidth(TrayComponentType *cp, const char *value) {
+void
+SetMaxTaskBarItemWidth(TrayComponentType *cp, const char *value)
+{
int temp;
TaskBarType *bp;
@@ -945,7 +995,9 @@ void SetMaxTaskBarItemWidth(TrayComponentType *cp, const char *value) {
/***************************************************************************
***************************************************************************/
-void SetTaskBarInsertMode(const char *mode) {
+void
+SetTaskBarInsertMode(const char *mode)
+{
if(!mode) {
insertMode = INSERT_RIGHT;
@@ -966,7 +1018,9 @@ void SetTaskBarInsertMode(const char *mode) {
/***************************************************************************
* Maintain the _NET_CLIENT_LIST[_STACKING] properties on the root window.
***************************************************************************/
-void UpdateNetClientList() {
+void
+UpdateNetClientList()
+{
Node *np;
ClientNode *client;