aboutsummaryrefslogtreecommitdiff
path: root/src/popup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/popup.c')
-rw-r--r--src/popup.c40
1 files changed, 30 insertions, 10 deletions
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);