gtk_pipe_int_read(&cseconds);  seconds=cseconds/100; 
gtk_pipe_int_read(&tt);  seconds=max_sec=tt/play_mode->rate; 
handle_input(gpointer client_data, gint source, GdkInputCondition ic){    int message;    gtk_pipe_int_read(&message);    switch (message) {    case REFRESH_MESSAGE:	g_warning("REFRESH MESSAGE IS OBSOLETE !!!");	break;    case TOTALTIME_MESSAGE:	{	    int cseconds;	    int minutes,seconds;	    char local_string[20];	    GtkObject *adj;	    gtk_pipe_int_read(&cseconds);	    seconds=cseconds/100;	    minutes=seconds/60;	    seconds-=minutes*60;	    sprintf(local_string,"/ %i:%02i",minutes,seconds);	    gtk_label_set(GTK_LABEL(tot_lbl), local_string);	    /* Readjust the time scale */	    max_sec=cseconds/100;	    adj = gtk_adjustment_new(0., 0., (gfloat)max_sec,				     1., 10., 0.);	    gtk_signal_connect(GTK_OBJECT(adj), "value_changed",			       GTK_SIGNAL_FUNC(generic_scale_cb),			       (gpointer)GTK_CHANGE_LOCATOR);	    gtk_range_set_adjustment(GTK_RANGE(locator),				     GTK_ADJUSTMENT(adj));	}	break;    case MASTERVOL_MESSAGE:	{	    int volume;	    GtkAdjustment *adj;	    gtk_pipe_int_read(&volume);	    adj = gtk_range_get_adjustment(GTK_RANGE(vol_scale));	    my_adjustment_set_value(adj, MAX_AMPLIFICATION - volume);	}	break;    case FILENAME_MESSAGE:	{	    char filename[255], title[255];	    char *pc;	    gtk_pipe_string_read(filename);	    /* Extract basename of the file */	    pc = strrchr(filename, '/');	    if (pc == NULL)		pc = filename;	    else		pc++;	    sprintf(title, "Timidity %s - %s", timidity_version, pc);	    gtk_window_set_title(GTK_WINDOW(window), title);	    /* Clear the text area. */#ifdef HAVE_GTK_2	    textbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));	    gtk_text_buffer_get_start_iter(textbuf, &start_iter);	    gtk_text_buffer_get_end_iter(textbuf, &end_iter);	    iter = start_iter;#else	    gtk_text_freeze(GTK_TEXT(text));	    gtk_text_set_point(GTK_TEXT(text), 0);	    gtk_text_forward_delete(GTK_TEXT(text),				    gtk_text_get_length(GTK_TEXT(text)));	    gtk_text_thaw(GTK_TEXT(text));#endif	}	break;    case FILE_LIST_MESSAGE:	{	    gchar filename[255], *fnames[2];	    gint i, number_of_files, row;	    /* reset the playing list : play from the start */	    file_number_to_play = -1;	    gtk_pipe_int_read(&number_of_files);	    for (i = 0; i < number_of_files; i++)	    {		gtk_pipe_string_read(filename);		fnames[0] = filename;		fnames[1] = NULL;		row = gtk_clist_append(GTK_CLIST(clist), fnames);	    }	    gtk_clist_columns_autosize(GTK_CLIST(clist));	}	break;    case NEXT_FILE_MESSAGE:    case PREV_FILE_MESSAGE:    case TUNE_END_MESSAGE:	{	    int nbfile;	    /* When a file ends, launch next if auto_next toggle */	    if ( (message==TUNE_END_MESSAGE) &&		 !GTK_CHECK_MENU_ITEM(auto_next)->active )		return;	    /* Total number of file to play in the list */	    nbfile = GTK_CLIST(clist)->rows;	    if (message == PREV_FILE_MESSAGE)		file_number_to_play--;	    else		file_number_to_play++;	    /* Do nothing if requested file is before first one */	    if (file_number_to_play < 0) {		file_number_to_play = 0;		return;	    }	    /* Stop after playing the last file */	    if (file_number_to_play >= nbfile) {		file_number_to_play = nbfile - 1;		return;	    }	    if(gtk_clist_row_is_visible(GTK_CLIST(clist),					file_number_to_play) !=	       GTK_VISIBILITY_FULL) {		gtk_clist_moveto(GTK_CLIST(clist), file_number_to_play,				 -1, 1.0, 0.0);	    }	    gtk_clist_select_row(GTK_CLIST(clist), file_number_to_play, 0);	}	break;    case CURTIME_MESSAGE:	{	    int		seconds, minutes;	    int		nbvoice;	    char	local_string[20];	    gtk_pipe_int_read(&seconds);	    gtk_pipe_int_read(&nbvoice);	    if( is_quitting )		return;	    minutes=seconds/60;	    sprintf(local_string,"%2d:%02d", minutes, (int)(seconds % 60));	    gtk_label_set(GTK_LABEL(cnt_lbl), local_string);	    /* Readjust the time scale if not dragging the scale */	    if( !locating && (seconds <= max_sec)) {		GtkAdjustment *adj;		adj = gtk_range_get_adjustment(GTK_RANGE(locator));		my_adjustment_set_value(adj, (gfloat)seconds);	    }	}	break;    case NOTE_MESSAGE:	{	    int channel;	    int note;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&note);	    g_warning("NOTE chn%i %i", channel, note);	}	break;    case PROGRAM_MESSAGE:	{	    int channel;	    int pgm;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&pgm);	    g_warning("NOTE chn%i %i", channel, pgm);	}	break;    case VOLUME_MESSAGE:	{	    int channel;	    int volume;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&volume);	    g_warning("VOLUME= chn%i %i", channel, volume);	}	break;    case EXPRESSION_MESSAGE:	{	    int channel;	    int express;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&express);	    g_warning("EXPRESSION= chn%i %i", channel, express);	}	break;    case PANNING_MESSAGE:	{	    int channel;	    int pan;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&pan);	    g_warning("PANNING= chn%i %i", channel, pan);	}	break;    case SUSTAIN_MESSAGE:	{	    int channel;	    int sust;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&sust);	    g_warning("SUSTAIN= chn%i %i", channel, sust);	}	break;    case PITCH_MESSAGE:	{	    int channel;	    int bend;	    gtk_pipe_int_read(&channel);	    gtk_pipe_int_read(&bend);	    g_warning("PITCH BEND= chn%i %i", channel, bend);	}	break;    case RESET_MESSAGE:	g_warning("RESET_MESSAGE");	break;    case CLOSE_MESSAGE:	gtk_exit(0);	break;    case CMSG_MESSAGE:	{	    int type;	    char message[1000];#ifdef HAVE_GTK_2	    gchar *message_u8;#endif	    gtk_pipe_int_read(&type);	    gtk_pipe_string_read(message);#ifdef HAVE_GTK_2	    message_u8 = g_locale_to_utf8( message, -1, NULL, NULL, NULL );	    gtk_text_buffer_get_bounds(textbuf, &start_iter, &end_iter);	    gtk_text_buffer_insert(textbuf, &end_iter,			    message_u8, -1);	    gtk_text_buffer_insert(textbuf, &end_iter,			    "\n", 1);	    gtk_text_buffer_get_bounds(textbuf, &start_iter, &end_iter);	    mark = gtk_text_buffer_create_mark(textbuf, NULL, &end_iter, 1);	    gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(text), mark, 0.0, 0, 0.0, 1.0);	    gtk_text_buffer_delete_mark(textbuf, mark);	    g_free( message_u8 );#else	    gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL,			    message, -1);	    gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL,			    "\n", 1);#endif	}	break;    case LYRIC_MESSAGE:	{	    char message[1000];#ifdef HAVE_GTK_2	    gchar *message_u8;#endif	    gtk_pipe_string_read(message);#ifdef HAVE_GTK_2	    message_u8 = g_locale_to_utf8( message, -1, NULL, NULL, NULL );	    gtk_text_buffer_get_bounds(textbuf, &start_iter, &end_iter);	    gtk_text_buffer_insert(textbuf, &iter,			    message_u8, -1);	    gtk_text_buffer_get_bounds(textbuf, &start_iter, &end_iter);	    mark = gtk_text_buffer_create_mark(textbuf, NULL, &end_iter, 1);	    gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(text), mark, 0.0, 0, 0.0, 1.0);	    gtk_text_buffer_delete_mark(textbuf, mark);#else	    gtk_text_insert(GTK_TEXT(text), NULL, NULL, NULL,			    message, -1);#endif	}	break;    default:	g_warning("UNKNOWN Gtk+ MESSAGE %i", message);    }}
4357	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4357/44691c3ffddc61a28b98c46a76a26d06a763d59d/gtk_i.c/clean/interface/gtk_i.c