Example #1
0
 static void realize(GtkWidget *widget, void *t)
 {
 	gint width, height;
	cairo_t	*cr			= gdk_cairo_create(terminal->window);
	gchar	*fontname	= GetString("Terminal","Font","Courier");

    Trace("Realizing %p",widget);

	// Configure im context
    gtk_im_context_set_client_window(input_method,widget->window);

#ifdef MOUSE_POINTER_CHANGE
    gdk_window_set_cursor(widget->window,wCursor[0]);
#endif

	update_font_info(cr, fontname, &terminal_font_info);

	gtk_widget_set_size_request(terminal, screen->cols*terminal_font_info.width, ((screen->rows+2)*terminal_font_info.height));

	g_free(fontname);
	cairo_destroy(cr);

	// Set terminal size
	gdk_drawable_get_size(widget->window,&width,&height);

	ResizeTerminal(widget, width, height);

 }
void GTerm::pc_end( void )
{
    //  printf("pc_end...\n");
    clear_mode_flag(PC);

    ResizeTerminal(pc_oldWidth, pc_oldHeight);
    update_changes();
}
void GTerm::pc_begin( void )
{
    //printf("pc_begin...\n");
    set_mode_flag(PC);

    //printf("pc_begin: mode_flags = %x\n", mode_flags);
    ProcessOutput((unsigned int)strlen(pc_machinename) + 1, (unsigned char * )pc_machinename);
    pc_oldWidth = Width();
    pc_oldHeight = Height();
    ResizeTerminal(80, 25);
    update_changes();
}
Example #4
0
 static void size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data)
 {
// 	Trace("Terminal changes to %dx%d pixels",allocation->width,allocation->height);
    if(widget->window)
		ResizeTerminal(widget,allocation->width,allocation->height);
 }
Example #5
0
 static void configure(GtkWidget *widget, GdkEventConfigure *event, void *t)
 {
    if(widget->window)
		ResizeTerminal(widget,event->width,event->height);
 }