summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@beryl-project.org>2007-03-26 18:17:34 +0200
committerDennis Kasprzyk <onestone@beryl-project.org>2007-03-26 18:17:34 +0200
commit304c6d960b56c10887cdc146f98a20190e765aab (patch)
tree22e8b87960a71a585905eca8353cb354a1ca90a3
parent48cd1a0bb9716d8b2fec87c525417eab5e2fe7c8 (diff)
downloadberyl-bcop-304c6d960b56c10887cdc146f98a20190e765aab.tar.gz
beryl-bcop-304c6d960b56c10887cdc146f98a20190e765aab.tar.bz2
pass screen/display pinter to the notify function
-rw-r--r--src/code_generator.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/code_generator.c b/src/code_generator.c
index b1ab28c..79b7f45 100644
--- a/src/code_generator.c
+++ b/src/code_generator.c
@@ -843,8 +843,9 @@ void addOption(Option *o)
}
addString(outs,"\t\t\tif (%s->notify[%s])\n"
- "\t\t\t\t(*%s->notify[%s])(o, %s);\n", (o->screen)?"os":"od",
- o->temp,(o->screen)?"os":"od",o->temp,o->temp);
+ "\t\t\t\t(*%s->notify[%s])(%s, o, %s);\n", (o->screen)?"os":"od",
+ o->temp,(o->screen)?"os":"od",o->temp,
+ (o->screen)?"screen":"display",o->temp);
addString(outs,"\t\t\treturn TRUE;\n"
"\t\t}\n"
@@ -932,7 +933,7 @@ void addDisplayOptions()
addString(&hdefines,"} %sDisplayOptions;\n\n",data.fUName);
addString(&hdefines,"typedef void (*%sDisplayOptionChangeNotifyProc)"
- "(CompOption *opt, %sDisplayOptions num);\n\n",
+ "(CompDisplay *display, CompOption *opt, %sDisplayOptions num);\n\n",
data.name,data.fUName);
addString(&displayStruct,"\tCompOption opt[%sDisplayOptionNum];\n",data.fUName);
@@ -1058,7 +1059,7 @@ void addScreenOptions()
addString(&hdefines,"} %sScreenOptions;\n\n",data.fUName);
addString(&hdefines,"typedef void (*%sScreenOptionChangeNotifyProc)"
- "(CompOption *opt, %sScreenOptions num);\n\n",
+ "(CompScreen *screen, CompOption *opt, %sScreenOptions num);\n\n",
data.name,data.fUName);
addString(&screenStruct,"\tCompOption opt[%sScreenOptionNum];\n",data.fUName);