changeset 35639:2e7f2ecaaf0b

Don't define a function by a macro. Use a proper function definition.
author ib
date Thu, 10 Jan 2013 20:52:37 +0000
parents 78d9cfd68b34
children 5cc5f1acfc4f
files gui/wm/ws.c gui/wm/ws.h
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gui/wm/ws.c	Thu Jan 10 19:23:37 2013 +0000
+++ b/gui/wm/ws.c	Thu Jan 10 20:52:37 2013 +0000
@@ -1536,6 +1536,16 @@
     return 0;
 }
 
+/**
+ * @brief Clear the entire area in a window.
+ *
+ * @param win pointer to a ws window structure
+ */
+void wsClearWindow(wsTWindow *win)
+{
+    XClearWindow(wsDisplay, win->WindowID);
+}
+
 void wsSetTitle(wsTWindow *win, char *name)
 {
     XStoreName(wsDisplay, win->WindowID, name);
--- a/gui/wm/ws.h	Thu Jan 10 19:23:37 2013 +0000
+++ b/gui/wm/ws.h	Thu Jan 10 20:52:37 2013 +0000
@@ -242,7 +242,7 @@
 void wsSetBackground(wsTWindow *win, int color);
 void wsSetForegroundRGB(wsTWindow *win, int r, int g, int b);
 void wsSetBackgroundRGB(wsTWindow *win, int r, int g, int b);
-#define wsClearWindow(win) XClearWindow(wsDisplay, (win)->WindowID)
+void wsClearWindow(wsTWindow *win);
 void wsSetTitle(wsTWindow *win, char *name);
 void wsVisibleWindow(wsTWindow *win, int show);
 void wsWindowDecoration(wsTWindow *win, Bool decor);