| 3838 | } |
| 3839 | |
| 3840 | void Config::addVirtualDisplayView(const char * view, |
| 3841 | const char * viewTransform, |
| 3842 | const char * colorSpace, |
| 3843 | const char * looks, |
| 3844 | const char * rule, |
| 3845 | const char * description) |
| 3846 | { |
| 3847 | if (!view || !*view) |
| 3848 | { |
| 3849 | throw Exception("View could not be added to virtual_display in config: a non-empty view " |
| 3850 | "name is needed."); |
| 3851 | } |
| 3852 | |
| 3853 | if (!colorSpace || !*colorSpace) |
| 3854 | { |
| 3855 | throw Exception("View could not be added to virtual_display in config: a non-empty color " |
| 3856 | "space name is needed."); |
| 3857 | } |
| 3858 | |
| 3859 | ViewVec::const_iterator iter = FindView(getImpl()->m_virtualDisplay.m_views, view); |
| 3860 | if (iter != getImpl()->m_virtualDisplay.m_views.end()) |
| 3861 | { |
| 3862 | std::ostringstream oss; |
| 3863 | oss << "View could not be added to virtual_display in config: View '" |
| 3864 | << view |
| 3865 | << "' already exists."; |
| 3866 | throw Exception(oss.str().c_str()); |
| 3867 | } |
| 3868 | |
| 3869 | getImpl()->m_virtualDisplay.m_views.push_back( |
| 3870 | View(view, viewTransform, colorSpace, looks, rule, description)); |
| 3871 | |
| 3872 | AutoMutex lock(getImpl()->m_cacheidMutex); |
| 3873 | getImpl()->resetCacheIDs(); |
| 3874 | } |
| 3875 | |
| 3876 | void Config::addVirtualDisplaySharedView(const char * sharedView) |
| 3877 | { |