|
From: <kar...@us...> - 2006-04-05 22:01:33
|
Revision: 1197 Author: karstenw Date: 2006-04-05 15:01:22 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1197&view=rev Log Message: ----------- parameter unused & name conflict fixes Modified Paths: -------------- Frontier/trunk/Common/IOAToolkit/ioa.c Frontier/trunk/Common/IOAToolkit/ioabutton.c Frontier/trunk/Common/IOAToolkit/ioacheckbox.c Frontier/trunk/Common/IOAToolkit/ioacolorpopup.c Frontier/trunk/Common/IOAToolkit/ioaedittext.c Frontier/trunk/Common/IOAToolkit/ioaframe.c Frontier/trunk/Common/IOAToolkit/ioaicon.c Frontier/trunk/Common/IOAToolkit/ioapicture.c Frontier/trunk/Common/IOAToolkit/ioapopup.c Frontier/trunk/Common/IOAToolkit/ioaradio.c Frontier/trunk/Common/IOAToolkit/ioarect.c Frontier/trunk/Common/IOAToolkit/ioascrollbar.c Frontier/trunk/Common/IOAToolkit/ioastatic.c Modified: Frontier/trunk/Common/IOAToolkit/ioa.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioa.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioa.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -478,7 +478,8 @@ boolean IOAincolorwindow (hdlobject h) { - +#pragma unused(h) + return (true); /*need to fill this in*/ } /*IOAincolorwindow*/ @@ -509,7 +510,8 @@ static boolean defaultDebugObjectCallback (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + IOAcopystring ("\pbad object type", errorstring); return (false); @@ -517,37 +519,43 @@ static boolean defaultRecalcObjectCallback (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(h, flmajorrecalc) + return (true); } /*defaultRecalcObjectCallback*/ static boolean defaultClickObjectCallback (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(h, listhead, pt, flshiftkey, fl2click) + return (false); /*don't do a minor recalc*/ } /*defaultClickObjectCallback*/ static boolean defaultSetObjectCursorCallback (hdlobject h, Point pt) { - +#pragma unused(h, pt) + return (false); /*we accept the default cursor*/ } /*defaultSetObjectCursorCallback*/ static boolean defaultCatchReturnCallback (hdlobject h) { - +#pragma unused(h) + return (false); /*we don't want to intercept the Return key*/ } /*defaultCatchReturnCallback*/ static boolean defaultUnpackDataCallback (hdlobject h) { - +#pragma unused(h) + return (true); /*do nothing*/ } /*defaultUnpackDataCallback*/ static boolean defaultAppleEventCallback (hdlobject h, AppleEvent *event) { - +#pragma unused(h, event) + return (true); /*do nothing*/ } /*defaultAppleEventCallback*/ @@ -564,46 +572,47 @@ static boolean defaultDisposeDataCallback (hdlobject h) { +#pragma unused(h) return (true); } /*defaultDisposeDataCallback*/ -static void callsetuproutine (setupcallback callback, tyioaconfigrecord *config) { +static void callsetuproutine (setupcallback pcallback, tyioaconfigrecord *pconfig) { +// 2006-04-03 - kw --- renamed parameter config -> pconfig + IOAclearbytes (pconfig, longsizeof (tyioaconfigrecord)); - IOAclearbytes (config, longsizeof (tyioaconfigrecord)); + (*pconfig).setValueFromScriptCallback = IOAsetobjectvalue; - (*config).setValueFromScriptCallback = IOAsetobjectvalue; + (*pconfig).getObjectInvalRectCallback = defaultGetObjectInvalRectCallback; - (*config).getObjectInvalRectCallback = defaultGetObjectInvalRectCallback; + (*pconfig).recalcObjectCallback = defaultRecalcObjectCallback; - (*config).recalcObjectCallback = defaultRecalcObjectCallback; + (*pconfig).debugObjectCallback = defaultDebugObjectCallback; - (*config).debugObjectCallback = defaultDebugObjectCallback; + (*pconfig).clickObjectCallback = defaultClickObjectCallback; - (*config).clickObjectCallback = defaultClickObjectCallback; + (*pconfig).setObjectCursorCallback = defaultSetObjectCursorCallback; - (*config).setObjectCursorCallback = defaultSetObjectCursorCallback; + (*pconfig).catchReturnCallback = defaultCatchReturnCallback; - (*config).catchReturnCallback = defaultCatchReturnCallback; + (*pconfig).getAttributesCallback = defaultAppleEventCallback; - (*config).getAttributesCallback = defaultAppleEventCallback; + (*pconfig).setAttributesCallback = defaultAppleEventCallback; - (*config).setAttributesCallback = defaultAppleEventCallback; + (*pconfig).packDataCallback = defaultPackDataCallback; - (*config).packDataCallback = defaultPackDataCallback; + (*pconfig).unpackDataCallback = defaultUnpackDataCallback; - (*config).unpackDataCallback = defaultUnpackDataCallback; + (*pconfig).disposeDataCallback = defaultDisposeDataCallback; - (*config).disposeDataCallback = defaultDisposeDataCallback; + (*pconfig).handlesMouseTrack = false; - (*config).handlesMouseTrack = false; + (*pconfig).editableInRunMode = false; - (*config).editableInRunMode = false; + (*pconfig).isFontAware = true; - (*config).isFontAware = true; - - (*callback) (config); + (*pcallback) (pconfig); } /*callsetuproutine*/ @@ -625,7 +634,8 @@ static pascal ComponentResult IOAclose (ComponentInstance self) { - +#pragma unused(self) + return (noErr); } /*IOAclose*/ @@ -1276,7 +1286,8 @@ //Code change by Timothy Paustian Saturday, July 8, 2000 8:23:29 AM //I changed this to plain pascal instead of static. Will this shoot things? static pascal ComponentResult IOAmain (ComponentParameters *params, Handle hstorage) { - +#pragma unused (hstorage) + #endif ComponentResult result; @@ -1793,13 +1804,13 @@ } /*scrollbarmain*/ - static boolean IOAregister (short ixarray, OSType subtype, ComponentRoutine main, setupcallback callback) { + static boolean IOAregister (short ixarray, OSType subtype, ComponentRoutine main, setupcallback pcallback) { ComponentDescription desc; Component comp; ComponentRoutineUPP routinePtr; - callsetuproutine (callback, &configarray [ixarray]); + callsetuproutine (pcallback, &configarray [ixarray]); IOAclearbytes (&desc, longsizeof (desc)); Modified: Frontier/trunk/Common/IOAToolkit/ioabutton.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioabutton.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioabutton.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -67,7 +67,8 @@ static boolean canreplicatebutton (hdlobject h) { - +#pragma unused(h) + return (true); /*it can be replicated*/ } /*canreplicatebutton*/ @@ -99,7 +100,8 @@ static boolean debugbutton (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -108,13 +110,21 @@ #if TARGET_API_MAC_CARBON == 1 - static void MyThemeButtonDrawCallback (const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, - UInt32 refcon, SInt16 depth, Boolean isColorDev) { +static void +MyThemeButtonDrawCallback ( + const Rect *bounds, + ThemeButtonKind kind, + const ThemeButtonDrawInfo *info, + UInt32 refcon, + SInt16 depth, + Boolean isColorDev) +{ +#pragma unused(kind, info, depth, isColorDev) + + /* + 7.0b48 PBS: draw the label for a popup menu. + */ - /* - 7.0b48 PBS: draw the label for a popup menu. - */ - Handle htext = (Handle) refcon; ThemeFontID idfont; bigstring fontname, bs; @@ -293,7 +303,8 @@ static boolean recalcbutton (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + bigstring errorstring; Handle hvalue; @@ -309,7 +320,8 @@ static boolean clickbutton (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, pt, flshiftkey, fl2click) + IOArunbuttonscript (h); return (true); /*do a minor recalc*/ Modified: Frontier/trunk/Common/IOAToolkit/ioacheckbox.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioacheckbox.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioacheckbox.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -79,7 +79,8 @@ static boolean canreplicatecheckbox (hdlobject h) { - +#pragma unused(h) + return (true); /*it can be replicated*/ } /*canreplicatecheckbox*/ @@ -107,7 +108,8 @@ static boolean debugcheckbox (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -166,13 +168,15 @@ static boolean initcheckbox (tyobject *obj) { - +#pragma unused(obj) + return (true); /*nothing special, we do want to edit it*/ } /*initcheckbox*/ static boolean recalccheckbox (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + bigstring errorstring; Handle hboolvalue; @@ -186,7 +190,8 @@ static boolean clickcheckbox (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, pt, flshiftkey, fl2click) + (**h).objectflag = !(**h).objectflag; (**(**h).owningcard).runtimevaluechanged = true; /*DW 9/19/95*/ Modified: Frontier/trunk/Common/IOAToolkit/ioacolorpopup.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioacolorpopup.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioacolorpopup.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -436,7 +436,8 @@ static boolean clickcolorpopup (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, flshiftkey, fl2click) + hdlcolordata hdata = (hdlcolordata) (**h).objectdata; RGBColor rgb; @@ -474,7 +475,7 @@ static boolean canreplicatecolorpopup (hdlobject h) { - +#pragma unused(h) return (true); } /*canreplicatecolorpopup*/ @@ -592,7 +593,7 @@ static boolean debugcolorpopup (hdlobject h, bigstring errorstring) { - +#pragma unused(h) setstringlength (errorstring, 0); return (true); @@ -726,7 +727,8 @@ static boolean recalccolorpopup (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + bigstring errorstring; Handle hrgbvalue; Modified: Frontier/trunk/Common/IOAToolkit/ioaedittext.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioaedittext.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioaedittext.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -213,7 +213,8 @@ static boolean debugedittext (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -256,7 +257,8 @@ static boolean recalcedittext (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + hdltextdata hdata = (hdltextdata) (**h).objectdata; if (!(**hdata).bullets) @@ -301,7 +303,8 @@ static boolean clickedittext (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, fl2click) + hdlcard hc = (**h).owningcard; if (h != (**hc).activetextobject) { @@ -318,7 +321,8 @@ static boolean setcursoredittext (hdlobject h, Point pt) { - +#pragma unused(h, pt) + CursHandle hcursor; hcursor = GetCursor (iBeamCursor); @@ -355,6 +359,7 @@ static boolean idleedittext (hdlobject h) { +#pragma unused(h) IOAeditidle (IOAgetactiveeditrecord ()); Modified: Frontier/trunk/Common/IOAToolkit/ioaframe.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioaframe.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioaframe.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -174,7 +174,8 @@ static boolean debugframe (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -268,7 +269,8 @@ static boolean recalcframe (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + return (IOArecalcobjectvalue (h)); } /*recalcframe*/ Modified: Frontier/trunk/Common/IOAToolkit/ioaicon.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioaicon.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioaicon.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -94,7 +94,8 @@ static boolean canreplicateicon (hdlobject h) { - +#pragma unused(h) + return (true); /*it can be replicated*/ } /*canreplicateicon*/ @@ -106,7 +107,8 @@ static boolean debugicon (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -209,7 +211,8 @@ static boolean recalciconobject (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + return (IOArecalcobjectvalue (h)); } /*recalciconobject*/ @@ -326,12 +329,13 @@ static boolean clickicon (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, pt, flshiftkey) + hdlicondata hdata = (hdlicondata) (**h).objectdata; - tyiconclickcallback callback = (**hdata).iconclick; + tyiconclickcallback lcallback = (**hdata).iconclick; - if (callback != nil) - return ((*callback) (h, fl2click)); + if (lcallback != nil) + return ((*lcallback) (h, fl2click)); if (fl2click) IOArunbuttonscript (h); Modified: Frontier/trunk/Common/IOAToolkit/ioapicture.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioapicture.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioapicture.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -65,25 +65,29 @@ static boolean canreplicatepicture (hdlobject h) { - +#pragma unused(h) + return (true); /*it can be replicated*/ } /*canreplicatepicture*/ static boolean getpictureeditrect (hdlobject h, Rect *r) { +#pragma unused(h, r) return (false); /*text of object can't be edited*/ } /*getpictureeditrect*/ static boolean getpicturevalue (hdlobject h, Handle *hvalue) { - +#pragma unused(h, hvalue) + return (false); /*picture doesn't have a value for a script*/ } /*getpicturevalue*/ static boolean debugpicture (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); Modified: Frontier/trunk/Common/IOAToolkit/ioapopup.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioapopup.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioapopup.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -387,9 +387,9 @@ /*side-effect -- we use the popup width when drawing the object*/ { - hdlpopupdata hdata = (hdlpopupdata) (**h).objectdata; + hdlpopupdata lhdata = (hdlpopupdata) (**h).objectdata; - (**hdata).popupwidth = popupwidth; + (**lhdata).popupwidth = popupwidth; } return (true); @@ -420,7 +420,8 @@ static boolean clickpopup (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, flshiftkey, fl2click) + hdlpopupdata hdata = (hdlpopupdata) (**h).objectdata; hdlcard hc = (**h).owningcard; MenuHandle hmenu; @@ -518,7 +519,8 @@ static void MyThemeButtonDrawCallback (const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, UInt32 refcon, SInt16 depth, Boolean isColorDev) { - +#pragma unused(kind, info, depth, isColorDev) + /* 7.0b48 PBS: draw the label for a popup menu. */ @@ -670,13 +672,14 @@ return (true); /*we do want to edit it*/ } /*initpopup*/ - - + + static boolean recalcpopup (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + bigstring errorstring; Handle htoss; - + if (!IOAevalscript (h, (**h).objectrecalcscript, &htoss, (**h).objectlanguage, errorstring)) return (false); @@ -725,14 +728,15 @@ return (true); } /*getpopupinvalrect*/ - - + + static boolean canreplicatepopup (hdlobject h) { - +#pragma unused(h) + return (true); } /*canreplicatepopup*/ - + static boolean getpopupeditrect (hdlobject h, Rect *redit) { hdlpopupdata hdata = (hdlpopupdata) (**h).objectdata; @@ -765,7 +769,8 @@ static boolean debugpopup (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); Modified: Frontier/trunk/Common/IOAToolkit/ioaradio.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioaradio.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioaradio.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -80,7 +80,8 @@ static boolean canreplicateradio (hdlobject h) { - +#pragma unused(h) + return (true); /*it can be replicated*/ } /*canreplicateradio*/ @@ -108,7 +109,8 @@ static boolean debugradio (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -119,7 +121,8 @@ static void MyThemeButtonDrawCallback (const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, UInt32 refcon, SInt16 depth, Boolean isColorDev) { - +#pragma unused(bounds, kind, info, refcon, depth, isColorDev) + //StringPtr bs = (StringPtr) refcon; //pushstyle (geneva, 10, 0); @@ -218,13 +221,15 @@ static boolean initradio (tyobject *obj) { - +#pragma unused(obj) + return (true); /*nothing special, we do want to edit it*/ } /*initradio*/ static boolean recalcradio (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + bigstring errorstring; Handle hboolvalue; @@ -238,7 +243,8 @@ static boolean clickradio (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(pt, flshiftkey, fl2click) + /* the one you hit goes on, all others go off */ Modified: Frontier/trunk/Common/IOAToolkit/ioarect.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioarect.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioarect.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -82,13 +82,15 @@ static boolean canreplicaterect (hdlobject h) { - +#pragma unused(h) + return (false); /*it can't be replicated*/ } /*canreplicaterect*/ static boolean getrecteditrect (hdlobject h, Rect *r) { - +#pragma unused(h, r) + return (false); /*can't be edited*/ } /*getrecteditrect*/ @@ -100,7 +102,8 @@ static boolean debugrectobject (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -181,7 +184,8 @@ static boolean clickrect (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, pt, flshiftkey, fl2click) + IOArunbuttonscript (h); return (true); /*do a minor recalc*/ Modified: Frontier/trunk/Common/IOAToolkit/ioascrollbar.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioascrollbar.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioascrollbar.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -81,7 +81,8 @@ static boolean cleanscrollbar (hdlobject h, short textheight, short textwidth, Rect *r) { - +#pragma unused(textwidth, textheight) + short height, width; if (!checkcontrolexists (h)) @@ -175,7 +176,9 @@ #endif static boolean clickscrollbar (hdlobject listhead, hdlobject h, Point pt, boolean flshiftkey, boolean fl2click) { - +#pragma unused(listhead, flshiftkey, fl2click) + + // hdlscrollbardata hdata = (hdlscrollbardata) (**h).objectdata; hdlcard hc = (**h).owningcard; if (!checkcontrolexists (h)) @@ -297,7 +300,8 @@ static boolean recalcscrollbar (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + return (IOArecalcobjectvalue (h)); } /*recalcscrollbar*/ @@ -311,13 +315,15 @@ static boolean canreplicatescrollbar (hdlobject h) { - +#pragma unused(h) + return (true); } /*canreplicatescrollbar*/ static boolean getscrollbareditrect (hdlobject h, Rect *r) { - +#pragma unused(h, r) + return (false); /*can't be edited*/ } /*getscrollbareditrect*/ @@ -343,7 +349,8 @@ static boolean debugscrollbar (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); Modified: Frontier/trunk/Common/IOAToolkit/ioastatic.c =================================================================== --- Frontier/trunk/Common/IOAToolkit/ioastatic.c 2006-04-05 21:50:20 UTC (rev 1196) +++ Frontier/trunk/Common/IOAToolkit/ioastatic.c 2006-04-05 22:01:22 UTC (rev 1197) @@ -105,7 +105,8 @@ static boolean debugstatic (hdlobject h, bigstring errorstring) { - +#pragma unused(h) + setstringlength (errorstring, 0); return (true); @@ -133,13 +134,15 @@ static boolean initstatic (tyobject *obj) { - +#pragma unused(obj) + return (true); /*we do want to edit it*/ } /*initstatic*/ static boolean recalcstatic (hdlobject h, boolean flmajorrecalc) { - +#pragma unused(flmajorrecalc) + return (IOArecalcobjectvalue (h)); } /*recalcstatic*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |