From e96f9f3869c6ea5803f5759bf1737547a46be22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 19 Jul 2021 11:32:34 +0200 Subject: Change function declaration style This is a very sweeping change, but I feel that it is necessary. --- src/popup.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'src/popup.c') diff --git a/src/popup.c b/src/popup.c index c9caafc..3a9fae2 100644 --- a/src/popup.c +++ b/src/popup.c @@ -33,14 +33,18 @@ static void DrawPopup(); /**************************************************************************** ****************************************************************************/ -void InitializePopup() { +void +InitializePopup() +{ popupDelay = DEFAULT_POPUP_DELAY; popupEnabled = 1; } /**************************************************************************** ****************************************************************************/ -void StartupPopup() { +void +StartupPopup() +{ popup.isActive = 0; popup.text = NULL; popup.window = None; @@ -48,7 +52,9 @@ void StartupPopup() { /**************************************************************************** ****************************************************************************/ -void ShutdownPopup() { +void +ShutdownPopup() +{ if(popup.text) { Release(popup.text); popup.text = NULL; @@ -61,7 +67,9 @@ void ShutdownPopup() { /**************************************************************************** ****************************************************************************/ -void DestroyPopup() { +void +DestroyPopup() +{ } /**************************************************************************** @@ -70,7 +78,9 @@ void DestroyPopup() { * y - The y coordinate of the popup window. * text - The text to display in the popup. ****************************************************************************/ -void ShowPopup(int x, int y, const char *text) { +void +ShowPopup(int x, int y, const char *text) +{ unsigned long attrMask; XSetWindowAttributes attr; @@ -162,13 +172,17 @@ void ShowPopup(int x, int y, const char *text) { /**************************************************************************** ****************************************************************************/ -void SetPopupEnabled(int e) { +void +SetPopupEnabled(int e) +{ popupEnabled = e; } /**************************************************************************** ****************************************************************************/ -void SetPopupDelay(const char *str) { +void +SetPopupDelay(const char *str) +{ int temp; @@ -188,7 +202,9 @@ void SetPopupDelay(const char *str) { /**************************************************************************** ****************************************************************************/ -void SignalPopup(const TimeType *now, int x, int y) { +void +SignalPopup(const TimeType *now, int x, int y) +{ if(popup.isActive) { if(abs(popup.mx - x) > 2 || abs(popup.my - y) > 2) { @@ -201,7 +217,9 @@ void SignalPopup(const TimeType *now, int x, int y) { /**************************************************************************** ****************************************************************************/ -int ProcessPopupEvent(const XEvent *event) { +int +ProcessPopupEvent(const XEvent *event) +{ if(popup.isActive && event->xany.window == popup.window) { if(event->type == Expose) { @@ -220,7 +238,9 @@ int ProcessPopupEvent(const XEvent *event) { /**************************************************************************** ****************************************************************************/ -void DrawPopup() { +void +DrawPopup() +{ Assert(popup.isActive); -- cgit v1.2.3