Changeset 104 for trunk/classes/c
- Timestamp:
- Oct 2, 2023, 11:34:35 PM (23 months ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/v2.9 merged eligible /branches/v2.9_Lars merged eligible
-
Property svn:mergeinfo
set to
-
trunk/classes/c/c_audio/cwaudio.c
r93 r104 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 /* … … 664 671 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype: 665 672 */ 673 674 /* 675 * SOM_Scope BOOL SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 676 * char* chrString, 677 * ULONG ulValue, 678 * int iWhich) 679 */ 680 681 /* 682 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype: 683 */ 666 684 SOM_Scope BOOL SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf, 667 685 char* chrString, 668 686 ULONG ulValue, 669 intiWhich)687 ULONG iWhich) 670 688 { 671 689 ULONG ulError; … … 939 957 /* successful completion. */ 940 958 /*!!******************************************************/ 959 960 /* 961 * SOM_Scope ULONG SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 962 * PSZ chrString, 963 * ULONG ulSize, 964 * int iWhich) 965 */ 966 967 /* 968 * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype: 969 */ 941 970 SOM_Scope ULONG SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf, 942 971 PSZ chrString, 943 972 ULONG ulSize, 944 intiWhich)973 ULONG iWhich) 945 974 { 946 975 MMAudioData *somThis = MMAudioGetData(somSelf); -
trunk/classes/c/c_audio/cwcdtrack.c
r2 r104 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 /* … … 207 214 MMCDTrackMethodDebug("MMCDTrack","cwcdtrack_wpFilterPopupMenu"); 208 215 209 return CTXT_SETTINGS | CTXT_HELP ;216 return CTXT_SETTINGS | CTXT_HELP | CTXT_DELETE; 210 217 211 218 /* We don't want to have XFolder or WPS-Wizard menus here. These are useless … … 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); -
trunk/classes/c/c_audio/cwmp3.c
r72 r104 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 … … 853 861 * cwmmAddTrackNamePage : override; 854 862 */ 863 864 /* 865 * SOM_Scope ULONG SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 866 * PSZ chrString, 867 * ULONG ulSize, 868 * int iWhich) 869 */ 870 871 /* 872 * The prototype for cwmp3_cwmmQueryTrackInfo was replaced by the following prototype: 873 */ 855 874 SOM_Scope ULONG SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf, 856 875 PSZ chrString, 857 876 ULONG ulSize, 858 intiWhich)877 ULONG iWhich) 859 878 { 860 879 somId id; -
trunk/classes/c/c_audio/cwogg.c
r2 r104 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); */ -
trunk/classes/c/c_common/except.c
r41 r104 130 130 USHORT SS; 131 131 } DbgBuf; 132 /*-------------------------------------*/ 133 APIRET APIENTRY DOSQUERYMODFROMEIP( HMODULE *phMod, 134 ULONG *pObjNum, 135 ULONG BuffLen, 136 PCHAR pBuff, 137 ULONG *pOffset, 138 PVOID Address ); 139 /*APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod, 140 ULONG *pObjNum, 141 ULONG BuffLen, 142 PCHAR pBuff, 143 ULONG *pOffset, 144 PVOID Address );*/ 145 146 /*-------------------------------------*/ 132 147 133 /* CW 148 134 #define DBG_O_OBJMTE 0x10000000L*/ … … 459 445 460 446 return 'c'; 461 } 447 } 462 448 463 449 ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec, … … 515 501 { 516 502 ULONG rc = XCPT_CONTINUE_SEARCH; 517 503 518 504 if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND) 519 505 return (XCPT_CONTINUE_SEARCH); … … 522 508 if (pERepRec->fHandlerFlags & EH_NESTED_CALL) 523 509 return (XCPT_CONTINUE_SEARCH); 524 510 525 511 if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION) 526 512 { … … 655 641 } 656 642 #endif 657 643 658 644 fAlreadyTrapped = TRUE; 659 645 /* end John Currier's recursion prevention */ … … 663 649 (Version[0]>=20) && 664 650 (Version[1]>=10) ) { 665 /* version must be over 2.1 for D OSQUERYMODFROMEIP */651 /* version must be over 2.1 for DosQueryModFromEIP */ 666 652 fprintf(hTrap,"OS/2 Version %d.%d\n",Version[0]/10,Version[1]); 667 rc=D OSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,653 rc=DosQueryModFromEIP( &hMod, &ObjNum, CCHMAXPATH, 668 654 Name, &Offset, pERepRec->ExceptionAddress); 669 655 if (rc==0) { … … 814 800 if ((AllocationFlags&PAG_EXECUTE)&& 815 801 (AllocationFlags&PAG_BASE)) { 816 rc=D OSQUERYMODFROMEIP( &hMod, &ObjNum, CCHMAXPATH,802 rc=DosQueryModFromEIP( &hMod, &ObjNum, CCHMAXPATH, 817 803 Name, &Offset, BaseAddress); 818 804 if (rc==0) { … … 1038 1024 break; /* avoid infinite loops */ 1039 1025 } else { 1040 rc = D OSQUERYMODFROMEIP(&hMod, &ObjNum, sizeof(Name),1026 rc = DosQueryModFromEIP(&hMod, &ObjNum, sizeof(Name), 1041 1027 Name, &Offset, (PVOID)RetAddr); 1042 1028 if (rc == NO_ERROR && ObjNum != -1) … … 1181 1167 } 1182 1168 1183 #include <exe.h>1184 1169 #include <newexe.h> 1185 1170 #define FOR_EXEHDR 1 /* avoid define conflicts between newexe.h and exe386.h */ … … 1835 1820 do { 1836 1821 read(fh,(void *)&FirstLine,sizeof(FirstLine)); 1837 1822 1838 1823 if (FirstLine.LineNum!=0) { 1839 1824 fprintf(hTrap,"Missing Line table information\n"); … … 1864 1849 } 1865 1850 break; 1866 1851 1867 1852 case 1: 1868 1853 lseek(fh, sizeof(struct linlist_rec), SEEK_CUR); 1869 1854 break; 1870 1855 1871 1856 case 2: 1872 1857 lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR); 1873 1858 break; 1874 1859 1875 1860 case 3: 1876 1861 lseek(fh, sizeof(struct filenam_rec), SEEK_CUR); 1877 1862 break; 1878 1863 1879 1864 case 4: 1880 1865 lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR); 1881 1866 break; 1882 1867 1883 1868 } 1884 1869 } -
trunk/classes/c/c_common/helper.c
r57 r104 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/ 24 24 */ 25 #define INCL_BASE 25 26 #define INCL_WIN 26 27 #define INCL_DOS … … 41 42 42 43 #ifndef BS_NOTEBOOKBUTTON 43 #define BS_NOTEBOOKBUTTON 8L /* Warp 4 notebook style */ 44 #define BS_NOTEBOOKBUTTON 8L /* Warp 4 notebook style */ 44 45 #endif 45 46 … … 66 67 67 68 68 memset(&pDetails, 0, sizeof(pDetails)); 69 memset(&pDetails, 0, sizeof(pDetails)); 69 70 pDetails.Length = sizeof(PROGDETAILS); 70 71 pDetails.progt.progc = PROG_DEFAULT; … … 81 82 } 82 83 pDetails.pszExecutable = wrapperExe; 83 84 84 85 pDetails.pszEnvironment = NULLHANDLE; 85 86 pDetails.swpInitial.fl = SWP_ACTIVATE|SWP_ZORDER; /* window positioning */ … … 92 93 // pDetails.swpInitial.ulReserved1 = 0; 93 94 // pDetails.swpInitial.ulReserved2 = 0; 94 95 95 96 /* Create an object window which will process the WM_APPTERMINATE message. While processing of this 96 97 message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */ … … 150 151 if(!hModule) 151 152 { 152 153 153 154 if(queryModuleHandle()) 154 155 { … … 170 171 if(NO_ERROR!=DosScanEnv("LANG", &pszLang)) 171 172 break; 172 173 173 174 /* Skip leading spaces */ 174 175 chrPtr=pszLang; 175 176 while(*chrPtr==' ') 176 177 chrPtr++; 177 178 178 179 /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */ 179 180 if(strlen(chrPtr)<5) 180 181 break; 181 182 /* Extract the first two chars */ 182 183 /* Extract the first two chars */ 183 184 sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]); 184 185 strcat(resDLLPath,buf); … … 187 188 // HlpWriteToTrapLog(resDLLPath); 188 189 // HlpWriteToTrapLog("\n"); 189 190 190 191 rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule); 191 192 if(rc==NO_ERROR) 192 193 break; 193 194 194 195 /* Insert message in Logfile */ 195 196 // writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (CDFLD001.DLL).\n"); 196 197 197 198 /* NLS DLL not found. Try to load default */ 198 199 found=strrchr(resDLLPath,'\\'); 199 200 if(!found) 200 201 break; 201 202 202 203 *found=0; 203 204 … … 206 207 // HlpWriteToTrapLog(resDLLPath); 207 208 // HlpWriteToTrapLog("\n"); 208 209 209 210 rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule); 210 211 if(rc!=NO_ERROR) { … … 215 216 //writeLog("Ressource DLL loaded.\n"); 216 217 } 217 218 218 219 break; 219 220 }while(TRUE); … … 223 224 } 224 225 225 /*APIRET APIENTRY DosQueryModFromEIP( HMODULE *phMod,226 ULONG *pObjNum,227 ULONG BuffLen,228 PCHAR pBuff,229 ULONG *pOffset,230 PVOID Address );*/231 232 226 /* Get the HMODULE of the MM class DLL */ 233 227 HMODULE queryModuleHandle(void) … … 242 236 ULONG ulObj, ulBufLen, ulOffset; 243 237 char thePath[CCHMAXPATH]; 244 238 245 239 if(DosQueryModFromEIP( &hModule, 246 240 &ulObj, … … 248 242 thePath, 249 243 &ulOffset, 250 ( PVOID)queryModuleHandle )!=NO_ERROR) {244 (ULONG)queryModuleHandle )!=NO_ERROR) { 251 245 SysWriteToTrapLog("Can't get module handle for CWMM class DLL!\n"); 252 246 hModule=0; … … 291 285 strncpy(classDLLPath,moduleName, sizeof(classDLLPath)); 292 286 classDLLPath[sizeof(classDLLPath)-1]=0; 293 287 294 288 /* Get install dir */ 295 289 strncpy(chrInstallDir,moduleName, sizeof(chrInstallDir)); … … 303 297 strncpy(classDLLPath,chrInstallDir, sizeof(classDLLPath)); 304 298 classDLLPath[sizeof(classDLLPath)-1]=0; 305 299 306 300 /* Get install dir */ 307 301 if((chrPtr=strrchr(chrInstallDir,'\\'))!=NULLHANDLE) … … 352 346 HENUM henum; 353 347 HWND hwnd; 354 348 355 349 /* Move the default notebook buttons */ 356 350 if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) { … … 396 390 { 397 391 snprintf(setup, sizeof(setup), "LOCATOR=%s;%s", chrUrl, "OPEN=DEFAULT"); 398 WinCreateObject("WPUrl","tempUrl", setup, tempDir, 392 WinCreateObject("WPUrl","tempUrl", setup, tempDir, 399 393 CO_UPDATEIFEXISTS); 400 394 /* WinDestroyObject(hObject); Don't use it, blocks PM */ … … 402 396 } 403 397 404 /* This function checks if the given file exists */ 398 /* This function checks if the given file exists */ 405 399 ULONG checkFileSize(char* chrFileName) 406 400 { … … 410 404 if(stat(chrFileName , &statBuf)==-1) 411 405 return 0; 412 406 413 407 return statBuf.st_size; 414 408 } -
trunk/classes/c/c_mm/mmfolder.c
r71 r104 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); … … 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 { -
trunk/classes/c/cwmm.DEF
r3 r104 1 1 ; CWMM.DEF: DEF-file for CWMM.dll 2 2 ; 3 ; (C) Chris Wohlgemuth 2002-20 053 ; (C) Chris Wohlgemuth 2002-2020 4 4 ;/* 5 5 ; * This program is free software; you can redistribute it and/or modify … … 25 25 26 26 LIBRARY CWMM INITGLOBAL 27 DESCRIPTION '$@#(C) C. Wohlgemuth 20 05:0.2 #@##1## 11/05/05 17:35:09My ;-) ::::9::@@CWMM-classes V0.2.9'27 DESCRIPTION '$@#(C) C. Wohlgemuth 2020:0.2 #@##1## 18/07/20 19:38:26 My ;-) ::::9::@@CWMM-classes V0.2.9' 28 28 29 29 PROTMODE
Note:
See TracChangeset
for help on using the changeset viewer.