Changeset 74 for branches/v2.9_Lars/classes/c
- Timestamp:
- Sep 30, 2023, 11:06:42 PM (23 months ago)
- Location:
- branches/v2.9_Lars
- Files:
-
- 7 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/v2.9_Lars/classes/c/c_audio/cwaudio.c
r60 r74 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 1 8 2 9 /* … … 666 673 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype: 667 674 */ 675 676 /* 677 * SOM_Scope BOOL SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 678 * char* chrString, 679 * ULONG ulValue, 680 * int iWhich) 681 */ 682 683 /* 684 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype: 685 */ 668 686 SOM_Scope BOOL SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 669 687 char* chrString, 670 688 ULONG ulValue, 671 intiWhich)689 ULONG iWhich) 672 690 { 673 691 ULONG ulError; … … 941 959 /* successful completion. */ 942 960 /*!!******************************************************/ 961 962 /* 963 * SOM_Scope ULONG SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 964 * PSZ chrString, 965 * ULONG ulSize, 966 * int iWhich) 967 */ 968 969 /* 970 * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype: 971 */ 943 972 SOM_Scope ULONG SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 944 973 PSZ chrString, 945 974 ULONG ulSize, 946 intiWhich)975 ULONG iWhich) 947 976 { 948 977 MMAudioData *somThis = MMAudioGetData(somSelf); -
branches/v2.9_Lars/classes/c/c_audio/cwcdtrack.c
r2 r74 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 1 8 2 9 /* … … 281 288 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype: 282 289 */ 290 291 /* 292 * SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf, 293 * PSZ chrString, 294 * ULONG ulSize, 295 * int iWhich) 296 */ 297 298 /* 299 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype: 300 */ 283 301 SOM_Scope ULONG SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf, 284 302 PSZ chrString, 285 303 ULONG ulSize, 286 intiWhich)304 ULONG iWhich) 287 305 { 288 306 MMCDTrackData *somThis = MMCDTrackGetData(somSelf); -
branches/v2.9_Lars/classes/c/c_audio/cwmp3.c
r2 r74 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 8 1 9 /* 2 10 * (C) Chris Wohlgemuth 2002-2004 … … 847 855 * cwmmAddTrackNamePage : override; 848 856 */ 857 858 /* 859 * SOM_Scope ULONG SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 860 * PSZ chrString, 861 * ULONG ulSize, 862 * int iWhich) 863 */ 864 865 /* 866 * The prototype for cwmp3_cwmmQueryTrackInfo was replaced by the following prototype: 867 */ 849 868 SOM_Scope ULONG SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 850 869 PSZ chrString, 851 870 ULONG ulSize, 852 intiWhich)871 ULONG iWhich) 853 872 { 854 873 somId id; -
branches/v2.9_Lars/classes/c/c_audio/cwogg.c
r2 r74 1 2 /* 3 * This file was generated by the SOM Compiler. 4 * Generated using: 5 * SOM incremental update: 2.47 6 */ 7 8 1 9 /* 2 10 * (C) Chris Wohlgemuth 2002-2004 … … 88 96 * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype: 89 97 */ 98 99 /* 100 * SOM_Scope ULONG SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf, 101 * PSZ chrString, 102 * ULONG ulSize, 103 * int iWhich) 104 */ 105 106 /* 107 * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype: 108 */ 90 109 SOM_Scope ULONG SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf, 91 110 PSZ chrString, 92 111 ULONG ulSize, 93 intiWhich)112 ULONG iWhich) 94 113 { 95 114 /* MMOGGData *somThis = MMOGGGetData(somSelf); */ -
branches/v2.9_Lars/classes/c/c_common/except.c
r41 r74 459 459 460 460 return 'c'; 461 } 461 } 462 462 463 463 ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec, … … 515 515 { 516 516 ULONG rc = XCPT_CONTINUE_SEARCH; 517 517 518 518 if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND) 519 519 return (XCPT_CONTINUE_SEARCH); … … 522 522 if (pERepRec->fHandlerFlags & EH_NESTED_CALL) 523 523 return (XCPT_CONTINUE_SEARCH); 524 524 525 525 if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION) 526 526 { … … 655 655 } 656 656 #endif 657 657 658 658 fAlreadyTrapped = TRUE; 659 659 /* end John Currier's recursion prevention */ … … 1181 1181 } 1182 1182 1183 #include <exe.h>1184 1183 #include <newexe.h> 1185 1184 #define FOR_EXEHDR 1 /* avoid define conflicts between newexe.h and exe386.h */ … … 1835 1834 do { 1836 1835 read(fh,(void *)&FirstLine,sizeof(FirstLine)); 1837 1836 1838 1837 if (FirstLine.LineNum!=0) { 1839 1838 fprintf(hTrap,"Missing Line table information\n"); … … 1864 1863 } 1865 1864 break; 1866 1865 1867 1866 case 1: 1868 1867 lseek(fh, sizeof(struct linlist_rec), SEEK_CUR); 1869 1868 break; 1870 1869 1871 1870 case 2: 1872 1871 lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR); 1873 1872 break; 1874 1873 1875 1874 case 3: 1876 1875 lseek(fh, sizeof(struct filenam_rec), SEEK_CUR); 1877 1876 break; 1878 1877 1879 1878 case 4: 1880 1879 lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR); 1881 1880 break; 1882 1881 1883 1882 } 1884 1883 } -
branches/v2.9_Lars/classes/c/c_common/helper.c
r57 r74 19 19 /* 20 20 * If you need another license for your prject/product contact me at 21 * 21 * 22 22 * http://www.os2world.com/cdwriting 23 23 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 41 41 42 42 #ifndef BS_NOTEBOOKBUTTON 43 #define BS_NOTEBOOKBUTTON 8L /* Warp 4 notebook style */ 43 #define BS_NOTEBOOKBUTTON 8L /* Warp 4 notebook style */ 44 44 #endif 45 45 … … 66 66 67 67 68 memset(&pDetails, 0, sizeof(pDetails)); 68 memset(&pDetails, 0, sizeof(pDetails)); 69 69 pDetails.Length = sizeof(PROGDETAILS); 70 70 pDetails.progt.progc = PROG_DEFAULT; … … 81 81 } 82 82 pDetails.pszExecutable = wrapperExe; 83 83 84 84 pDetails.pszEnvironment = NULLHANDLE; 85 85 pDetails.swpInitial.fl = SWP_ACTIVATE|SWP_ZORDER; /* window positioning */ … … 92 92 // pDetails.swpInitial.ulReserved1 = 0; 93 93 // pDetails.swpInitial.ulReserved2 = 0; 94 94 95 95 /* Create an object window which will process the WM_APPTERMINATE message. While processing of this 96 96 message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */ … … 150 150 if(!hModule) 151 151 { 152 152 153 153 if(queryModuleHandle()) 154 154 { … … 170 170 if(NO_ERROR!=DosScanEnv("LANG", &pszLang)) 171 171 break; 172 172 173 173 /* Skip leading spaces */ 174 174 chrPtr=pszLang; 175 175 while(*chrPtr==' ') 176 176 chrPtr++; 177 177 178 178 /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */ 179 179 if(strlen(chrPtr)<5) 180 180 break; 181 182 /* Extract the first two chars */ 181 182 /* Extract the first two chars */ 183 183 sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]); 184 184 strcat(resDLLPath,buf); … … 187 187 // HlpWriteToTrapLog(resDLLPath); 188 188 // HlpWriteToTrapLog("\n"); 189 189 190 190 rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule); 191 191 if(rc==NO_ERROR) 192 192 break; 193 193 194 194 /* Insert message in Logfile */ 195 195 // writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (CDFLD001.DLL).\n"); 196 196 197 197 /* NLS DLL not found. Try to load default */ 198 198 found=strrchr(resDLLPath,'\\'); 199 199 if(!found) 200 200 break; 201 201 202 202 *found=0; 203 203 … … 206 206 // HlpWriteToTrapLog(resDLLPath); 207 207 // HlpWriteToTrapLog("\n"); 208 208 209 209 rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule); 210 210 if(rc!=NO_ERROR) { … … 215 215 //writeLog("Ressource DLL loaded.\n"); 216 216 } 217 217 218 218 break; 219 219 }while(TRUE); … … 242 242 ULONG ulObj, ulBufLen, ulOffset; 243 243 char thePath[CCHMAXPATH]; 244 244 245 245 if(DosQueryModFromEIP( &hModule, 246 246 &ulObj, … … 248 248 thePath, 249 249 &ulOffset, 250 ( PVOID)queryModuleHandle )!=NO_ERROR) {250 (ULONG)queryModuleHandle )!=NO_ERROR) { 251 251 SysWriteToTrapLog("Can't get module handle for CWMM class DLL!\n"); 252 252 hModule=0; … … 291 291 strncpy(classDLLPath,moduleName, sizeof(classDLLPath)); 292 292 classDLLPath[sizeof(classDLLPath)-1]=0; 293 293 294 294 /* Get install dir */ 295 295 strncpy(chrInstallDir,moduleName, sizeof(chrInstallDir)); … … 303 303 strncpy(classDLLPath,chrInstallDir, sizeof(classDLLPath)); 304 304 classDLLPath[sizeof(classDLLPath)-1]=0; 305 305 306 306 /* Get install dir */ 307 307 if((chrPtr=strrchr(chrInstallDir,'\\'))!=NULLHANDLE) … … 352 352 HENUM henum; 353 353 HWND hwnd; 354 354 355 355 /* Move the default notebook buttons */ 356 356 if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) { … … 396 396 { 397 397 snprintf(setup, sizeof(setup), "LOCATOR=%s;%s", chrUrl, "OPEN=DEFAULT"); 398 WinCreateObject("WPUrl","tempUrl", setup, tempDir, 398 WinCreateObject("WPUrl","tempUrl", setup, tempDir, 399 399 CO_UPDATEIFEXISTS); 400 400 /* WinDestroyObject(hObject); Don't use it, blocks PM */ … … 402 402 } 403 403 404 /* This function checks if the given file exists */ 404 /* This function checks if the given file exists */ 405 405 ULONG checkFileSize(char* chrFileName) 406 406 { … … 410 410 if(stat(chrFileName , &statBuf)==-1) 411 411 return 0; 412 412 413 413 return statBuf.st_size; 414 414 } -
branches/v2.9_Lars/classes/c/c_mm/mmfolder.c
r69 r74 17 17 * along with this program; see the file COPYING. If not, write to 18 18 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 19 */ 19 */ 20 20 /* 21 21 * If you need another license for your project/product (commercial, 22 22 * noncommercial, whatever) contact me at 23 * 23 * 24 24 * http://www.os2world.com/cdwriting 25 25 * http://www.geocities.com/SiliconValley/Sector/5785/ … … 28 28 /* 29 29 * This file was generated by the SOM Compiler and Emitter Framework. 30 * Generated using: 30 * Generated using: 31 31 * SOM Emitter emitctm: 2.42 32 32 */ … … 77 77 somId mySomId; 78 78 static SOMClass * mWPFolderClass=NULLHANDLE; 79 79 80 80 if(!mWPFolderClass) { 81 81 if((mySomId=somIdFromString("WPFolder"))!=NULLHANDLE) { … … 107 107 somId mySomId; 108 108 static SOMClass *mWPImgClass=NULL; 109 109 110 110 if(!mWPImgClass) { 111 111 if((mySomId=somIdFromString("MMBitmap"))!=NULLHANDLE) { … … 117 117 } 118 118 119 MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 119 MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 120 120 { 121 121 HWND hwndStore; … … 136 136 137 137 if(pCnrInfo) { 138 // writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n", 138 // writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n", 139 139 // pCnrInfo->flWindowAttr, LONGFROMMP(mp2), pCnrInfo->cxTreeIndent, pCnrInfo->cyLineSpacing); 140 140 … … 147 147 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 148 148 if(somIsObj(somSelf)) { 149 MMFolderData *somThis = MMFolderGetData(somSelf); 150 149 MMFolderData *somThis = MMFolderGetData(somSelf); 150 151 151 pCnrInfo->flWindowAttr&=~CA_DRAWICON; 152 152 pCnrInfo->flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW; 153 153 pCnrInfo->slBitmapOrIcon.cx=_ulCurrentSize; 154 154 pCnrInfo->slBitmapOrIcon.cy=_ulCurrentSize; 155 155 156 156 mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR); 157 157 } … … 183 183 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 184 184 if(somIsObj(somSelf)) { 185 MMFolderData *somThis = MMFolderGetData(somSelf); 185 MMFolderData *somThis = MMFolderGetData(somSelf); 186 186 if(_oldContainerProc) 187 187 return _oldContainerProc(hwnd, msg, mp1, mp2); 188 188 } 189 189 } 190 } 190 } 191 191 return WinDefWindowProc(hwnd, msg, mp1, mp2); 192 192 } … … 239 239 HPOINTER hptrTemplate; 240 240 HMODULE hmodTemplate; 241 241 242 242 if(!DosQueryModuleHandle("PMWP",&hmodTemplate)) 243 243 { 244 244 ULONG ulIconSize; 245 245 246 246 hptrTemplate=WinLoadPointer(HWND_DESKTOP, hmodTemplate, 20); 247 247 WinDrawPointer(hps, rcl->xLeft, rcl->yBottom, hptrTemplate, (flCnr & CV_MINI ? DP_MINI:DP_NORMAL)); … … 255 255 return DP_MINI; 256 256 } 257 257 258 258 return DP_NORMAL; 259 259 } 260 260 261 261 262 MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 262 MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 263 263 { 264 264 HWND hwndStore; … … 273 273 { 274 274 POWNERITEM pOwnerItem=(POWNERITEM)PVOIDFROMMP(mp2); 275 275 276 276 277 277 /* We only draw icons not text */ … … 299 299 POINTL pointl; 300 300 301 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 301 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 302 302 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2); 303 303 pointl.x = rclTemp.xLeft; … … 307 307 pointl.y = rclTemp.yTop - 1; 308 308 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 309 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 310 309 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 310 311 311 } 312 312 /* Check if record is in use */ … … 314 314 POINTL pointl; 315 315 316 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 316 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 317 317 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1); 318 318 pointl.x = rclTemp.xLeft; … … 322 322 pointl.y = rclTemp.yTop - 1; 323 323 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 324 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 324 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 325 325 } 326 326 /* or is it only selected? */ … … 330 330 else 331 331 WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE); 332 /* Emphasis drawn */ 332 /* Emphasis drawn */ 333 333 334 334 /********************************************/ … … 340 340 WPObject *wpObject; 341 341 ULONG ulIconSize=150;/* Default if query fails */ 342 342 343 343 wpObject=(WPObject*)OBJECT_FROM_PREC(mrc); // Get object 344 344 wpObject=somGetFileSystemObject(wpObject); // Get Filesystem object … … 356 356 SysWriteToTrapLog("Object is an image. (%s line: %d)\n", __FUNCTION__, __LINE__); 357 357 #endif 358 /* Get object pointer of lighttable folder */ 358 /* Get object pointer of lighttable folder */ 359 359 if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE) 360 360 { 361 361 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 362 362 if(somIsObj(somSelf)) { 363 MMFolderData *somThis = MMFolderGetData(somSelf); 363 MMFolderData *somThis = MMFolderGetData(somSelf); 364 364 ulIconSize=_ulCurrentSize; 365 365 } … … 423 423 /* And now draw the bitmap */ 424 424 #if 0 425 if(pBmpInfoHeader2->cclrUsed==2) { 425 if(pBmpInfoHeader2->cclrUsed==2) { 426 426 WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem, 427 427 CLR_WHITE, CLR_BLACK, DBM_STRETCH /*| DBM_IMAGEATTRS*/); … … 437 437 /* Done */ 438 438 if(_somIsA(wpObject, cwImageClass)) { 439 440 441 442 MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject);439 MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject); 440 } 441 else { 442 MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject); 443 443 } 444 444 return (MRESULT) TRUE; … … 474 474 { 475 475 SOMClass* wpFolderClass=queryWpFolderClass(); 476 476 477 477 if(somIsObj(wpFolderClass)) { 478 if(_somIsA(wpObject, wpFolderClass)) { 478 if(_somIsA(wpObject, wpFolderClass)) { 479 479 /* It's a folder */ 480 480 HPOINTER hptr; 481 481 482 482 pOwnerItem->rclItem.xLeft=rcl.xLeft; 483 483 pOwnerItem->rclItem.yBottom=rcl.yBottom; 484 484 485 485 /* The following is only for Warp 4 but Warp 3 isn't supported anyway...*/ 486 486 hptr=_wpQueryIconN(wpObject,1); … … 489 489 return (MRESULT) TRUE; 490 490 } 491 491 492 492 } 493 493 }/* if(somIsObj(wpFolderClass)) */ 494 494 }/* if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) */ 495 495 496 496 if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, mrc->hptrIcon, ulMiniOrNormal)) { 497 497 cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY); … … 508 508 /*************************/ 509 509 PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem; 510 510 511 511 if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) { 512 512 PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord; … … 517 517 HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT); 518 518 RECTL rclTemp=pOwnerItem->rclItem; 519 519 520 520 wpObjToRefresh=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object 521 521 wpObject=somGetFileSystemObject(wpObjToRefresh); 522 522 523 523 /* Draw Background */ 524 524 rclTemp.xLeft+=2; … … 526 526 rclTemp.yBottom+=2; 527 527 rclTemp.yTop-=2; 528 528 529 529 /* Check if record is selected and in use... */ 530 530 if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) 531 531 && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) { 532 532 POINTL pointl; 533 533 534 534 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2); 535 535 pointl.x = rclTemp.xLeft; … … 539 539 pointl.y = rclTemp.yTop - 1; 540 540 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 541 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 542 541 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 542 543 543 } 544 544 /* or only in use... */ 545 545 else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) { 546 546 POINTL pointl; 547 547 548 548 GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1); 549 549 pointl.x = rclTemp.xLeft; … … 553 553 pointl.y = rclTemp.yTop - 1; 554 554 GpiSetColor(pOwnerItem->hps, CLR_BLACK); 555 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 555 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1); 556 556 } 557 557 /* or only selected. */ … … 564 564 SOMClass* cwBitmapClass=queryCWBitmapFileClass(); 565 565 SOMClass* cwImageClass=queryCWImageFileClass(); 566 566 567 567 if(somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) { 568 568 HBITMAP hbm=NULLHANDLE; 569 569 PBITMAPINFOHEADER2 pBmpInfoHeader2; 570 570 571 571 /* Query object pointer */ 572 572 if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE) … … 574 574 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 575 575 if(somIsObj(somSelf)) { 576 MMFolderData *somThis = MMFolderGetData(somSelf); 576 MMFolderData *somThis = MMFolderGetData(somSelf); 577 577 ulIconSize=_ulCurrentSize; 578 578 } 579 579 } 580 /* Get the small bitmap from the object */ 580 /* Get the small bitmap from the object */ 581 581 if(_somIsA(wpObject, cwImageClass)) { 582 582 hbm=MMImage_cwmmQuerySmallBitmapHandle( (MMImage*) wpObject, ulIconSize, mrc, hwndCnr); … … 584 584 } 585 585 else if(_somIsA(wpObject, cwBitmapClass)) { 586 hbm=MMBitmap_cwmmQuerySmallBitmapHandle( (MM Image*) wpObject, ulIconSize);586 hbm=MMBitmap_cwmmQuerySmallBitmapHandle( (MMBitmap*) wpObject, ulIconSize); 587 587 pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((MMBitmap*)wpObject); 588 588 } … … 636 636 } 637 637 if(_somIsA(wpObject, cwImageClass)) { 638 639 640 641 642 }638 MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject); 639 } 640 else { 641 MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject); 642 } 643 643 return (MRESULT) TRUE; 644 644 }/* hbm */ … … 684 684 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 685 685 if(somIsObj(somSelf)) { 686 MMFolderData *somThis = MMFolderGetData(somSelf); 686 MMFolderData *somThis = MMFolderGetData(somSelf); 687 687 switch(_usLastSelMenuItem) 688 688 { … … 701 701 /* insert separator */ 702 702 menuInsertMenuSeparator( HWNDFROMMP(mp2), NULLHANDLE, MIT_END); 703 703 704 704 /* Load the menu from the resource */ 705 705 hwndMenu=WinLoadMenu(hwnd,queryResModuleHandle(), ID_MENUICONSIZE); 706 706 707 707 /* Fill the MENUITEM structure */ 708 708 mi.iPosition=MIT_END; 709 709 mi.afStyle=MIS_TEXT|MIS_SUBMENU; 710 710 mi.id=ID_MENUICONSIZE; 711 mi.afAttribute=NULLHANDLE; 711 mi.afAttribute=NULLHANDLE; 712 712 mi.hwndSubMenu=hwndMenu; 713 713 mi.hItem=NULLHANDLE; … … 715 715 strcpy(text, "Icon ~size");; 716 716 menuInsertMenuItem(HWNDFROMMP(mp2), hwndMenu, MIT_END, ID_MENUICONSIZE, text); 717 717 718 718 /* check current menuitem */ 719 719 switch(_ulCurrentSize) … … 738 738 break; 739 739 default: 740 break; 740 break; 741 741 } 742 742 } … … 755 755 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 756 756 if(somIsObj(somSelf)) { 757 MMFolderData *somThis = MMFolderGetData(somSelf); 757 MMFolderData *somThis = MMFolderGetData(somSelf); 758 758 _usLastSelMenuItem=SHORT1FROMMP(mp1); 759 759 } … … 768 768 somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER); 769 769 if(somIsObj(somSelf)) { 770 MMFolderData *somThis = MMFolderGetData(somSelf); 770 MMFolderData *somThis = MMFolderGetData(somSelf); 771 771 if(_oldFrameProc) 772 772 return _oldFrameProc(hwnd, msg, mp1, mp2); 773 773 } 774 774 } 775 775 776 776 return WinDefWindowProc(hwnd, msg, mp1, mp2); 777 777 } … … 781 781 */ 782 782 783 SOM_Scope HWND SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 783 SOM_Scope HWND SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 784 784 ULONG ulView, ULONG param) 785 785 { 786 786 HWND hwnd; 787 787 788 MMFolderData *somThis = MMFolderGetData(somSelf); 788 MMFolderData *somThis = MMFolderGetData(somSelf); 789 789 MMFolderMethodDebug("MMFolder","mmfldr_wpOpen"); 790 790 791 hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 791 hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 792 792 ulView, param)); 793 793 794 794 /* Only subclass folder frames, not settings notebooks */ 795 if(ulView!=OPEN_SETTINGS){ 795 if(ulView!=OPEN_SETTINGS){ 796 796 HWND hwndStore; 797 797 … … 799 799 hwnd, HWND_BOTTOM, STOREWINDOWID, NULLHANDLE, NULLHANDLE))!=NULLHANDLE) 800 800 { 801 HWND hwndContainer; 801 HWND hwndContainer; 802 802 803 803 WinSetWindowULong(hwndStore, QWL_USER, (ULONG)somSelf); 804 804 _oldFrameProc=WinSubclassWindow(hwnd, mmFolderFrameProc); 805 805 806 806 if(hwnd) 807 807 { 808 808 CNRINFO cnrInfo; 809 809 HWND hwndContainer=WinWindowFromID(hwnd,FID_CLIENT); 810 810 811 811 /* Change the containerflags */ 812 812 if(WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo), 813 813 MPFROMSHORT(sizeof(cnrInfo)))) 814 814 { 815 if(cnrInfo.flWindowAttr & CV_ICON) { 815 if(cnrInfo.flWindowAttr & CV_ICON) { 816 816 cnrInfo.slBitmapOrIcon.cx=_ulCurrentSize; 817 817 cnrInfo.slBitmapOrIcon.cy=_ulCurrentSize; … … 834 834 835 835 #if 0 836 SOM_Scope BOOL SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 836 SOM_Scope BOOL SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 837 837 PSZ pszSetupString) 838 838 { … … 859 859 #endif 860 860 861 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 861 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 862 862 ULONG ulReserved) 863 863 { … … 870 870 } 871 871 872 return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 872 return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 873 873 ulReserved)); 874 874 } 875 875 876 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf, 877 PSZ pszClass, ULONG ulKey, 876 SOM_Scope BOOL SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf, 877 PSZ pszClass, ULONG ulKey, 878 878 PBYTE pValue, PULONG pcbValue) 879 879 { … … 882 882 MMFolderMethodDebug("MMFolder","mmfldr_wpRestoreData"); 883 883 884 rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass, 885 ulKey, pValue, 884 rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass, 885 ulKey, pValue, 886 886 pcbValue)); 887 887 switch(ulKey) … … 919 919 MMFolderData *somThis = MMFolderGetData(somSelf); 920 920 MMFolderMethodDebug("MMFolder","mmfldr_wpSaveState"); 921 921 922 922 _wpSaveLong( somSelf, "MMFolder", KEY_ICONSIZE, _ulCurrentSize); 923 923 … … 926 926 927 927 928 SOM_Scope BOOL SOMLINK mmfldr_wpSaveData(MMFolder *somSelf, 929 PSZ pszClass, ULONG ulKey, 928 SOM_Scope BOOL SOMLINK mmfldr_wpSaveData(MMFolder *somSelf, 929 PSZ pszClass, ULONG ulKey, 930 930 PBYTE pValue, ULONG cbValue) 931 931 { … … 937 937 the address of the instance data containing grid spacing and view. So 938 938 we force the object to save the instance data and in wpSaveData we 939 finally get the right addresses to change the object view to gridded. 939 finally get the right addresses to change the object view to gridded. 940 940 This change is done in wpObjectReady() where we called wpSaveImmediate(). */ 941 941 … … 946 946 Check ID for NULL to prevent crash in stricmp(). 947 947 */ 948 psz=_wpQueryObjectID(somSelf); 948 psz=_wpQueryObjectID(somSelf); 949 949 // if(!stricmp(_wpQueryObjectID(somSelf), "<MMPM2_MMFOLDERTEMPLATE>")) 950 950 if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>")) … … 982 982 } 983 983 984 return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass, 985 ulKey, pValue, 984 return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass, 985 ulKey, pValue, 986 986 cbValue)); 987 987 } 988 988 989 SOM_Scope BOOL SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 990 HWND hwndFrame, 989 SOM_Scope BOOL SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 990 HWND hwndFrame, 991 991 ULONG ulMenuId) 992 992 { … … 1004 1004 char text[200]; 1005 1005 CNRINFO cnrInfo2=cnrInfo; 1006 1006 1007 1007 switch(ulMenuId) 1008 1008 { … … 1054 1054 } 1055 1055 1056 _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */ 1056 _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */ 1057 1057 _wpSetup(somSelf, "MENUITEMSELECTED=309");/* Arrange */ 1058 1058 … … 1062 1062 } 1063 1063 }/* if() */ 1064 return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 1065 hwndFrame, 1064 return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 1065 hwndFrame, 1066 1066 ulMenuId)); 1067 1067 } … … 1071 1071 *wpSetup:override; 1072 1072 */ 1073 SOM_Scope void SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 1073 SOM_Scope void SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 1074 1074 ULONG ulCode, WPObject* refObject) 1075 1075 { … … 1100 1100 1101 1101 /* If no ID result is NULL */ 1102 psz=_wpQueryObjectID(somSelf); 1102 psz=_wpQueryObjectID(somSelf); 1103 1103 if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>")) { 1104 1104 /* When the template is created wpRestoreData() isn't called so we don't have … … 1106 1106 we force the object to save the instance data and in wpSaveData we 1107 1107 finally get the right addresses to change the object view to gridded. */ 1108 1108 1109 1109 _wpSaveImmediate(somSelf); 1110 1110 /* Set default view to gridded */ 1111 1111 1112 1112 if(_pFldrLongArray!=NULLHANDLE) { 1113 1113 *_pFldrLongArray=0x80; … … 1120 1120 *(_pulGridSpacing--)=_ulCurrentSize+MMFLDR_SPACINGDELTA_Y; 1121 1121 } 1122 1122 1123 1123 } 1124 1124 break; … … 1137 1137 MMFolderMethodDebug("MMFolder","mmfldr_wpSetup"); 1138 1138 1139 bufferSize=sizeof(buffer); 1139 bufferSize=sizeof(buffer); 1140 1140 if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMTHUMBSIZE, buffer, &bufferSize)) 1141 1141 { … … 1180 1180 pViewItem=_wpFindViewItem(somSelf,VIEW_CONTENTS|VIEW_TREE|VIEW_DETAILS, pViewItem)) 1181 1181 { 1182 _wpMenuItemSelected(somSelf, 1183 pViewItem->handle, 1182 _wpMenuItemSelected(somSelf, 1183 pViewItem->handle, 1184 1184 ulMenuId); 1185 1185 } … … 1189 1189 1190 1190 1191 SOM_Scope BOOL SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf, 1191 SOM_Scope BOOL SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf, 1192 1192 WPObject* Folder) 1193 1193 { … … 1205 1205 wpFolder=_wpclsQueryFolder(somSelf, MMTEMPLATE_FOLDER_ID, FALSE); 1206 1206 _wpclsNew(somSelf, _wpclsQueryTitle(somSelf), chrSetup, wpFolder,FALSE); 1207 1207 1208 1208 return TRUE; 1209 1209 } … … 1224 1224 1225 1225 1226 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 1226 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 1227 1227 PICONINFO pIconInfo) 1228 1228 { … … 1246 1246 1247 1247 1248 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 1249 ICONINFO* pIconInfo, 1248 SOM_Scope ULONG SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 1249 ICONINFO* pIconInfo, 1250 1250 ULONG ulIconIndex) 1251 1251 {
Note:
See TracChangeset
for help on using the changeset viewer.