Beispiel #1
0
static void menu_release_gr(WMenu *menu)
{
    if(menu->entry_brush!=NULL){
        grbrush_release(menu->entry_brush);
        menu->entry_brush=NULL;
    }
    if(menu->brush!=NULL){
        grbrush_release(menu->brush);
        menu->brush=NULL;
    }
}
Beispiel #2
0
static void dock_brush_release(WDock *dock)
{

    if(dock->brush){
        grbrush_release(dock->brush);
        dock->brush=NULL;
    }

}
Beispiel #3
0
void panehandle_deinit(WPaneHandle *pwin)
{
    assert(pwin->splitfloat==NULL);
    
    if(pwin->brush!=NULL){
        grbrush_release(pwin->brush);
        pwin->brush=NULL;
    }
    
    window_deinit(&(pwin->wwin));
}
Beispiel #4
0
static bool menu_init_gr(WMenu *menu, WRootWin *rootwin, Window win)
{
    GrBrush *brush, *entry_brush;
    char *st;
    const char *style=(menu->big_mode 
                       ? "input-menu-big"
                       : (menu->pmenu_mode
                          ? "input-menu-pmenu"
                          : "input-menu-normal"));

    const char *entry_style=(menu->big_mode
                                   ? "tab-menuentry-big"
                                   : (menu->pmenu_mode
                                      ? "tab-menuentry-pmenu"
                                      : "tab-menuentry-normal"));
    
    brush=gr_get_brush(win, rootwin, style);
    
    if(brush==NULL)
        return FALSE;

    entry_brush=grbrush_get_slave(brush, rootwin, entry_style);
    
    if(entry_brush==NULL){
        grbrush_release(brush);
        return FALSE;
    }
    
    if(menu->entry_brush!=NULL)
        grbrush_release(menu->entry_brush);
    if(menu->brush!=NULL)
        grbrush_release(menu->brush);

    menu->brush=brush;
    menu->entry_brush=entry_brush;
    
    calc_entry_dimens(menu);
    
    return TRUE;
}
Beispiel #5
0
static void panehandle_getbrush(WPaneHandle *pwin)
{
    GrBrush *brush=gr_get_brush(pwin->wwin.win, 
                                region_rootwin_of((WRegion*)pwin), 
                                "pane");

    if(brush!=NULL){
        if(pwin->brush!=NULL)
            grbrush_release(pwin->brush);
        
        pwin->brush=brush;
        
        grbrush_get_border_widths(brush, &(pwin->bdw));
        grbrush_enable_transparency(brush, GR_TRANSPARENCY_YES);
    }
}
Beispiel #6
0
void infowin_updategr(WInfoWin *p)
{
    GrBrush *nbrush;
    
    assert(p->style!=NULL);
    
    nbrush=gr_get_brush(p->wwin.win, 
                        region_rootwin_of((WRegion*)p),
                        p->style);
    if(nbrush==NULL)
        return;
    
    if(p->brush!=NULL)
        grbrush_release(p->brush);
    
    p->brush=nbrush;
    
    window_draw(&(p->wwin), TRUE);
}
Beispiel #7
0
void infowin_deinit(WInfoWin *p)
{
    if(p->buffer!=NULL){
        free(p->buffer);
        p->buffer=NULL;
    }

    if(p->style!=NULL){
        free(p->style);
        p->style=NULL;
    }
    
    if(p->brush!=NULL){
        grbrush_release(p->brush);
        p->brush=NULL;
    }
    
    gr_stylespec_unalloc(&p->attr);
    
    window_deinit(&(p->wwin));
}