static void remmina_rdp_call_feature(RemminaProtocolWidget* gp, const RemminaProtocolFeature* feature) { RemminaFile* remminafile; rfContext* rfi; rfi = GET_DATA(gp); remminafile = remmina_plugin_service->protocol_plugin_get_file(gp); switch (feature->id) { case REMMINA_RDP_FEATURE_UNFOCUS: remmina_rdp_event_unfocus(gp); break; case REMMINA_RDP_FEATURE_SCALE: rfi->scale = remmina_plugin_service->file_get_int(remminafile, "scale", FALSE); remmina_rdp_event_update_scale(gp); break; case REMMINA_RDP_FEATURE_TOOL_REFRESH: gtk_widget_queue_draw_area(rfi->drawing_area, 0, 0, remmina_plugin_service->protocol_plugin_get_width(gp), remmina_plugin_service->protocol_plugin_get_height(gp)); break; default: break; } }
static void remmina_rdp_event_connected(RemminaProtocolWidget* gp, RemminaPluginRdpUiObject* ui) { rfContext* rfi; int stride; rfi = GET_DATA(gp); gtk_widget_realize(rfi->drawing_area); stride = cairo_format_stride_for_width(rfi->cairo_format, rfi->width); rfi->surface = cairo_image_surface_create_for_data((unsigned char*) rfi->primary_buffer, rfi->cairo_format, rfi->width, rfi->height, stride); gtk_widget_queue_draw_area(rfi->drawing_area, 0, 0, rfi->width, rfi->height); remmina_rdp_event_update_scale(gp); }
static void rf_desktop_resize(rdpContext* context) { RemminaProtocolWidget* gp; rfContext* rfi; rfi = (rfContext*) context; gp = rfi->protocol_widget; LOCK_BUFFER(TRUE) remmina_plugin_service->protocol_plugin_set_width(gp, rfi->settings->DesktopWidth); remmina_plugin_service->protocol_plugin_set_height(gp, rfi->settings->DesktopHeight); UNLOCK_BUFFER(TRUE) THREADS_ENTER remmina_rdp_event_update_scale(gp); THREADS_LEAVE remmina_plugin_service->protocol_plugin_emit_signal(gp, "desktop-resize"); }