mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
test: Added a few comments to explain things
As this code may be used as an example, we'd better do things clear Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
c13236c2e6
commit
dcd08355ed
18
test/wtest.c
18
test/wtest.c
@@ -31,13 +31,16 @@ WMAppContext *app;
|
|||||||
|
|
||||||
static void callback(int item)
|
static void callback(int item)
|
||||||
{
|
{
|
||||||
(void) item;
|
|
||||||
|
|
||||||
printf("pushed item %i\n", item);
|
printf("pushed item %i\n", item);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void quit(int item)
|
static void quit(int item)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* This parameter is not used, but because we're a call-back we have a fixed
|
||||||
|
* prototype, so we tell the compiler it is ok to avoid a spurious unused
|
||||||
|
* variable warning
|
||||||
|
*/
|
||||||
(void) item;
|
(void) item;
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
@@ -45,6 +48,11 @@ static void quit(int item)
|
|||||||
|
|
||||||
static void hide(int item)
|
static void hide(int item)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* This parameter is not used, but because we're a call-back we have a fixed
|
||||||
|
* prototype, so we tell the compiler it is ok to avoid a spurious unused
|
||||||
|
* variable warning
|
||||||
|
*/
|
||||||
(void) item;
|
(void) item;
|
||||||
|
|
||||||
WMHideApplication(app);
|
WMHideApplication(app);
|
||||||
@@ -63,6 +71,12 @@ static void newwin(int item)
|
|||||||
Window win;
|
Window win;
|
||||||
XClassHint classhint;
|
XClassHint classhint;
|
||||||
char title[100];
|
char title[100];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This parameter is not used, but because we're a call-back we have a fixed
|
||||||
|
* prototype, so we tell the compiler it is ok to avoid a spurious unused
|
||||||
|
* variable warning
|
||||||
|
*/
|
||||||
(void) item;
|
(void) item;
|
||||||
|
|
||||||
wincount++;
|
wincount++;
|
||||||
|
|||||||
Reference in New Issue
Block a user