Example #1
0
void SetSampleInfo( sio_data *curr_sio )
/**************************************/
{
    void            *cursor_type;

    cursor_type = WndHourGlass( NULL );
    if( curr_sio->dip_process != NULL ) {
        WPDipDestroyProc( curr_sio->dip_process );
        curr_sio->dip_process = NULL;
    }
    CurrSIOData = curr_sio;
    SetCurrentMAD( CurrSIOData->config.mad );
    if( CurrSIOData->samples != NULL ) {
        if( !CurrSIOData->massaged_mapped || CurrSIOData->massaged_sample == NULL ) {
            calcAggregates();
        }
    }
    loadSampleImages();
    resolveImageSamples();
    GatherSetAll( curr_sio, false );
    AbsSetAll( curr_sio, true );
    RelSetAll( curr_sio, true );
    SortSetAll( curr_sio, SORT_COUNT );
    WndHourGlass( cursor_type );
}
Example #2
0
STATIC bool sampleEventProc( a_window *wnd, gui_event gui_ev, void *parm )
/************************************************************************/
{
    sio_data        *curr_sio;

    parm=parm;
    switch( gui_ev ) {
    case GUI_INIT_WINDOW:
        return( true );
    case GUI_FONT_CHANGED:
        WPSetRowHeight( wnd );
        return( true );
    case GUI_RESIZE:
        WPAdjustRowHeight( wnd, false );
        return( true );
    case GUI_NOW_ACTIVE:
        curr_sio = WndExtra( wnd );
        curr_sio->curr_proc_row = -WND_MAX_ROW;
        curr_sio->curr_display_row = -WND_MAX_ROW;
        WPDipSetProc( curr_sio->dip_process );
        SetCurrentMAD( curr_sio->config.mad );
        CurrSIOData = curr_sio;
        return( true );
    case WND_CURRENT_CHANGED:
        sampFixDirtyCurr( wnd );
        return( true );
    case GUI_DESTROY:
        curr_sio = WndExtra( wnd );
        if( curr_sio != NULL ) {
            ClearSample( curr_sio );
        }
        return( false );
    }
    return( false );
}
Example #3
0
STATIC void procInfoBlock( clicks_t ticks, samp_data *data )
/**********************************************************/
{
    /* is this for backward compatability */
//    if( pref->length >= SIZE_INFO + SIZE_PREFIX &&
//                               data->info.count[ SAMP_CALLGRAPH ].number ) {
//        CallGraph = true;     /* sample file includes callgraph records */
//    } else {
//        CallGraph = false;    /* sample file doesn't have callgraph info */
//    }
    if( ticks == 0 ) {
        ticks = 1;
    }
    if( CurrSIOData->header.major_ver == 2 && CurrSIOData->header.minor_ver < 2 ) {
        /* pre-MAD sample file */
        CurrSIOData->config = DefSysConfig;
    } else {
        CurrSIOData->config = data->info.config;
        /* sanity check for non-MADified sampler */
        if( CurrSIOData->config.mad == MAD_NIL ) {
            CurrSIOData->config = DefSysConfig;
        }
    }
    SetCurrentMAD( CurrSIOData->config.mad );

    CurrSIOData->timer_rate = data->info.timer_rate;
}