/** * \brief Populates the OIL state variables with PMS system data. * * This function retrieves the PMS system information and copies essential data * from it into the OIL's global variables. This includes: * \arg The size of the memory allocated for RIP usage; * \arg The custom configuration data; * \arg The active paper selection mode; * \arg The width of traps to be applied; * \arg The active color management method, and * \arg The active probe trace options. */ void GetPMSSystemInfo() { PMS_TySystem ptPMSSysInfo; OIL_ProbeLog(SW_TRACE_OIL_GETPMSSYSTEMINFO, SW_TRACETYPE_ENTER, (intptr_t)0); PMS_GetSystemInfo(&ptPMSSysInfo , PMS_CurrentSettings); g_SystemState.cbRIPMemory = ptPMSSysInfo.cbRIPMemory; g_SystemState.nOILconfig = ptPMSSysInfo.nOILconfig; g_SystemState.nOutputType = ptPMSSysInfo.eOutputType; #ifdef PMS_OIL_MERGE_DISABLE switch(ptPMSSysInfo.ePaperSelectMode) { case PMS_PaperSelNone: g_ConfigurableFeatures.g_ePaperSelectMode = OIL_PaperSelNone; break; case PMS_PaperSelRIP: g_ConfigurableFeatures.g_ePaperSelectMode = OIL_PaperSelRIP; break; case PMS_PaperSelPMS: g_ConfigurableFeatures.g_ePaperSelectMode = OIL_PaperSelPMS; break; default: HQFAILV(("GetPMSSystemInfo: Unsupported paper select mode (%d), setting default None", ptPMSSysInfo.ePaperSelectMode)); g_ConfigurableFeatures.g_ePaperSelectMode = OIL_PaperSelNone; break; } #else g_ConfigurableFeatures.g_ePaperSelectMode = ptPMSSysInfo.ePaperSelectMode; #endif g_ConfigurableFeatures.ePrintableMode = ptPMSSysInfo.nPrintableMode; g_ConfigurableFeatures.nStrideBoundaryBytes = ptPMSSysInfo.nStrideBoundaryBytes; g_ConfigurableFeatures.fEbdTrapping = ptPMSSysInfo.fTrapWidth; g_ConfigurableFeatures.uColorManagement = ptPMSSysInfo.uColorManagement; strcpy(g_ConfigurableFeatures.szProbeTrace, ptPMSSysInfo.szProbeTraceOption); g_ConfigurableFeatures.nRendererThreads = ptPMSSysInfo.nRendererThreads; #ifdef DIRECTPRINTPCLOUT if((ptPMSSysInfo.eOutputType == PMS_DIRECT_PRINT) || (ptPMSSysInfo.eOutputType == PMS_DIRECT_PRINTXL)) { g_ConfigurableFeatures.bPixelInterleaving = TRUE; /* now protect the direct print mode as it does not handle the direct raster band delivery mode*/ ptPMSSysInfo.eBandDeliveryType = PMS_PUSH_PAGE; /* copy local setting to PMS job setting */ PMS_SetSystemInfo(&ptPMSSysInfo , PMS_CurrentSettings); } #endif g_ConfigurableFeatures.eBandDeliveryType = ptPMSSysInfo.eBandDeliveryType; OIL_ProbeLog(SW_TRACE_OIL_GETPMSSYSTEMINFO, SW_TRACETYPE_EXIT, (intptr_t)0); }
/** * \brief Register an RDR resource type with the RIP. * * This function registers resources required for UFST-5 use with the RIP. * * \return This function returns TRUE if the resource is successfully registered, * or FALSE otherwise. */ static int RegisterResourceType( int eResourceType, sw_rdr_class rdr_class, sw_rdr_type rdr_type ) { int index = 0; PMS_TyResource resource; while( PMS_GetResource( eResourceType, index, &resource ) == 0 ) { sw_rdr_priority priority = MapPriority( resource.ePriority ); sw_rdr_result result = SwRegisterRDR( rdr_class, rdr_type, resource.id, resource.pData, resource.length, priority ); if( result != SW_RDR_SUCCESS ) { HQFAILV(("RegisterResourceType: SwRegisterRDR() failed: %d", result)); return FALSE; } index++; } return TRUE; }
/** * \brief Converts PMS priority values into RDR priorities. * * This function maps the high, normal and low priority values defined in the PMS * to the equivalent, but numerically different, values defined in the ROM data * resource (RDR) API. If an unrecognised priority value is supplied, an error message * is generated and the function returns \c SW_RDR_NORMAL. * * \param[in] ePriority The priority value as defined by the PMS. * \return Returns a \c sw_rdr_priority value which is equivalent to the PMS priority supplied. If the supplied value is not recognised, \c SW_RDR_NORMAL is returned. */ static sw_rdr_priority MapPriority( int ePriority ) { int ripPriority; switch( ePriority ) { case EPMS_Priority_Low: ripPriority = SW_RDR_DEFAULT; break; case EPMS_Priority_Normal: ripPriority = SW_RDR_NORMAL; break; case EPMS_Priority_High: ripPriority = SW_RDR_OVERRIDE; break; default: HQFAILV(("MapPriority: Unknown priority %d", ePriority)); ripPriority = SW_RDR_NORMAL; break; } return ripPriority; }
/** * \brief Register RIP modules * * Register available halftone, color management and font modules. */ int RegisterRIPModules(void) { #ifdef PMS_OIL_MERGE_DISABLE #if defined(SDK_SUPPORT_2BPP_EXT_EG) sw_htm_api *pHtm2bpp; #endif #if defined(SDK_SUPPORT_4BPP_EXT_EG) sw_htm_api *pHtm4bpp; #endif #endif sw_cmm_api *pCMM; #if defined(USE_UFST5) || defined(USE_UFST7) int nRetVal; pfin_ufst5_fns ufst5FnTable = { NULL }; ufst5FnTable.pfnCGIFfco_Access = (CGIFfco_AccessFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFfco_Access]; ufst5FnTable.pfnCGIFfco_Plugin = (CGIFfco_PluginFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFfco_Plugin]; ufst5FnTable.pfnCGIFfco_Open = (CGIFfco_OpenFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFfco_Open]; ufst5FnTable.pfnCGIFinitRomInfo = (CGIFinitRomInfoFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFinitRomInfo]; ufst5FnTable.pfnCGIFenter = (CGIFenterFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFenter]; ufst5FnTable.pfnCGIFconfig = (CGIFconfigFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFconfig]; ufst5FnTable.pfnCGIFinit = (CGIFinitFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFinit]; ufst5FnTable.pfnCGIFfco_Close = (CGIFfco_CloseFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFfco_Close]; ufst5FnTable.pfnCGIFmakechar = (CGIFmakecharFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFmakechar]; ufst5FnTable.pfnCGIFchar_size = (CGIFchar_sizeFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFchar_size]; ufst5FnTable.pfnCGIFfont = (CGIFfontFn *) (*g_apfn_pms_calls)[EPMS_FN_CGIFfont]; ufst5FnTable.pfnPCLswapHdr = (PCLswapHdrFn *) (*g_apfn_pms_calls)[EPMS_FN_PCLswapHdr]; ufst5FnTable.pfnPCLswapChar = (PCLswapCharFn *) (*g_apfn_pms_calls)[EPMS_FN_PCLswapChar]; #ifdef USEUFSTCALLBACKS ufst5FnTable.pfnUFSTSetCallbacks = (UFSTSetCallbacksFn *) (*g_apfn_pms_calls)[EPMS_FN_UFSTSetCallbacks]; #endif #ifdef USEPMSDATAPTRFNS ufst5FnTable.pfnUFSTGetPS3FontDataPtr = (UFSTGetPS3FontDataPtrFn *) (*g_apfn_pms_calls)[EPMS_FN_UFSTGetPS3FontDataPtr]; ufst5FnTable.pfnUFSTGetWingdingFontDataPtr = (UFSTGetWingdingFontDataPtrFn *) (*g_apfn_pms_calls)[EPMS_FN_UFSTGetWingdingFontDataPtr]; ufst5FnTable.pfnUFSTGetSymbolSetDataPtr = (UFSTGetSymbolSetDataPtrFn *) (*g_apfn_pms_calls)[EPMS_FN_UFSTGetSymbolSetDataPtr]; ufst5FnTable.pfnUFSTGetPluginDataPtr = (UFSTGetPluginDataPtrFn *) (*g_apfn_pms_calls)[EPMS_FN_UFSTGetPluginDataPtr]; #endif nRetVal = pfin_ufst5_module(&ufst5FnTable); if(nRetVal) { HQFAILV(("RegisterRIPModules: Failed to start initialise pfin ufst5 module %d", nRetVal)); return FALSE; } #endif #ifdef USE_FF { int nRetVal; pfin_ff_fns ffFnTable = {0}; /* No FontFusion functions defined yet. */ nRetVal = pfin_ff_module(&ffFnTable); if (nRetVal) { HQFAILV(("RegisterRIPModules: Failed to start initialise pfin ff module %d\n", nRetVal)); } } #endif #ifdef PMS_OIL_MERGE_DISABLE #if defined(SDK_SUPPORT_4BPP_EXT_EG) /* Register example simple 4-bit screening */ pHtm4bpp = htm4bpp_getInstance(); if (SwRegisterHTM (pHtm4bpp) != SW_API_REGISTERED) return FALSE; #endif #if defined(SDK_SUPPORT_2BPP_EXT_EG) /* Register example simple 2-bit screening */ pHtm2bpp = htm2bpp_getInstance(); if (SwRegisterHTM (pHtm2bpp) != SW_API_REGISTERED) return FALSE; #endif #endif /* Register example CMM */ pCMM = oilccs_getInstance(); if (SwRegisterCMM (pCMM) != SW_API_REGISTERED) return FALSE; return TRUE; }