示例#1
0
XImlib2Background::XImlib2Background(AbstractContainer * c, AbstractConfig * con): TimerControl(), 
                                                    container(c), config(con),delay(0), mode(0),  save(NULL), show(NULL),
						    srctime(0), images(""), directory(""), OneShot(false)
{
     cmap = imlib_context_get_colormap();
     visual = imlib_context_get_visual();
     
     DesktopConfig * dConfig =
		    dynamic_cast<DesktopConfig *>(config);
    
     if( !show) {
		 show = &data[0];
	     	 save = &data[1];
     }
	
     int d = dConfig->getDelayBackground();
     directory = dConfig->getSourceBackground();

	
     if(d == 0 || directory == "None"){
	     OneShot = true;
     }
     
     srand( (unsigned)time(0) );
     
     if(OneShot){
		SetOneImage();
     }else{
		ScanImages();
		SetDelay( d );
     }
	
}
示例#2
0
void XImlib2Image::configure()
{
    x = iconParent->getX();
    y = iconParent->getY();

    DesktopIconConfig * dIconConfig =
        dynamic_cast<DesktopIconConfig *>(iconConfig);
	
    DesktopConfig * dConfig =
		    dynamic_cast<DesktopConfig *>(config);

    transparency = dConfig->getTransparency();

    width = dIconConfig->getWidth();
    height = dIconConfig->getHeight();
    
    glowing = false;
    glowChange = true;

    colorMod = imlib_create_color_modifier();
    
    fillStyle = dIconConfig->getFillStyle();
    
    XDesktopContainer * xContainer =
		    dynamic_cast<XDesktopContainer *>(container);  
	
    rootWindow = xContainer->getRootWindow();
    widthOfScreen = xContainer->widthOfScreen();
    heightOfScreen = xContainer->heightOfScreen();
    display = xContainer->getDisplay();
    visual = imlib_context_get_visual();
    cmap = imlib_context_get_colormap();
    screen = DefaultScreen(display);
    depth =  DefaultDepth(display,screen);
}
示例#3
0
XImlib2Caption::XImlib2Caption(AbstractContainer * c, AbstractIcon * iParent,
                   AbstractConfig * con, AbstractIconConfig * iConfig) 
           : AbstractCaption(c, iParent, con, iConfig),
             XImlib2Image(c, iParent, con, iConfig), FONTSHIFT(4)
{
    XDesktopContainer * xContainer =
        dynamic_cast<XDesktopContainer *>(AbstractImage::container);

    visual = imlib_context_get_visual();
    cmap = imlib_context_get_colormap();
    configure();
    createFont();
}