void spice_display_request_resolution(SpiceDisplay *display, int w, int h) { SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); spice_main_update_display(d->main, get_display_id(display), 0, 0, w, h, TRUE); spice_main_set_display_enabled(d->main, -1, TRUE); // TODO: Sending the monitor config right away may be causing guest OS to shut down. /* if (spice_main_send_monitor_config(d->main)) { __android_log_write(ANDROID_LOG_DEBUG, TAG, "Successfully sent monitor config"); } else { __android_log_write(ANDROID_LOG_WARN, TAG, "Failed to send monitor config"); }*/ }
JNIEXPORT void JNICALL Java_com_iiordanov_aSPICE_SpiceCommunicator_SpiceRequestResolution(JNIEnv* env, jobject obj, jint x, jint y) { SpiceDisplay* display = global_display; SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); spice_main_update_display(d->main, get_display_id(display), 0, 0, x, y, TRUE); spice_main_set_display_enabled(d->main, -1, TRUE); // TODO: Sending the monitor config right away may be causing guest OS to shut down. /* if (spice_main_send_monitor_config(d->main)) { __android_log_write(6, "android-io", "Successfully sent monitor config"); } else { __android_log_write(6, "android-io", "Failed to send monitor config"); }*/ }
static void primary_create(SpiceChannel *channel, gint format, gint width, gint height, gint stride, gint shmid, gpointer imgdata, gpointer data) { __android_log_write(6, "android-spice", "primary_create"); SpiceDisplay *display = data; SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); // TODO: For now, don't do anything for secondary monitors if (get_display_id(display) > 0) { return; } d->format = format; d->stride = stride; d->shmid = shmid; d->width = width; d->height = height; d->data_origin = d->data = imgdata; uiCallbackSettingsChanged (0, width, height, 4); }
static void primary_create(SpiceChannel *channel, gint format, gint width, gint height, gint stride, gint shmid, gpointer imgdata, gpointer data) { //__android_log_write(ANDROID_LOG_DEBUG, TAG, "primary_create"); SpiceDisplay *display = data; SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); // TODO: For now, don't do anything for secondary monitors if (get_display_id(display) > 0) { return; } d->format = format; d->stride = stride; d->width = width; d->height = height; d->data_origin = d->data = imgdata; d->convert = (format == SPICE_SURFACE_FMT_16_555 || format == SPICE_SURFACE_FMT_16_565); if (d->convert) d->data = g_malloc0(height * stride); uiCallbackSettingsChanged(d->ctx, width, height); }
void Instruction::write_to_stream( std::ostream &os ) const { os << "(" << get_display_id() << ") "; write_dot( os ); }