X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Finterfaces%2Fvmm_graphics_console.c;h=ab6ecd0a5ff9fbbbefeaea51d3298aefb4ca7fed;hb=f41eb8ea81fe04856e0939d0f6a7bec9564a8043;hp=9eba2dea3b7b99168452bba9eb4a1d3a7b8623a5;hpb=ba178554a5f6714e5ceb7b77df462ac72de90b0c;p=palacios.git diff --git a/palacios/src/interfaces/vmm_graphics_console.c b/palacios/src/interfaces/vmm_graphics_console.c index 9eba2de..ab6ecd0 100644 --- a/palacios/src/interfaces/vmm_graphics_console.c +++ b/palacios/src/interfaces/vmm_graphics_console.c @@ -30,24 +30,24 @@ v3_graphics_console_t v3_graphics_console_open(struct v3_vm_info * vm, struct v3_frame_buffer_spec *desired_spec, struct v3_frame_buffer_spec *actual_spec) { - V3_ASSERT(graphics_console_hooks != NULL); - V3_ASSERT(graphics_console_hooks->open != NULL); + V3_ASSERT(vm, VCORE_NONE, graphics_console_hooks != NULL); + V3_ASSERT(vm, VCORE_NONE, graphics_console_hooks->open != NULL); return graphics_console_hooks->open(vm->host_priv_data, desired_spec, actual_spec); } void v3_graphics_console_close(v3_graphics_console_t cons) { - V3_ASSERT(graphics_console_hooks); - V3_ASSERT(graphics_console_hooks->close); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->close); graphics_console_hooks->close(cons); } void * v3_graphics_console_get_frame_buffer_data_read(v3_graphics_console_t cons, struct v3_frame_buffer_spec *spec) { - V3_ASSERT(graphics_console_hooks != NULL); - V3_ASSERT(graphics_console_hooks->get_data_read != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->get_data_read != NULL); return graphics_console_hooks->get_data_read(cons, spec); } @@ -55,24 +55,24 @@ void * v3_graphics_console_get_frame_buffer_data_read(v3_graphics_console_t cons void v3_graphics_console_release_frame_buffer_data_read(v3_graphics_console_t cons) { - V3_ASSERT(graphics_console_hooks != NULL); - V3_ASSERT(graphics_console_hooks->release_data_read != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->release_data_read != NULL); return graphics_console_hooks->release_data_read(cons); } void * v3_graphics_console_get_frame_buffer_data_rw(v3_graphics_console_t cons, struct v3_frame_buffer_spec *spec) { - V3_ASSERT(graphics_console_hooks != NULL); - V3_ASSERT(graphics_console_hooks->get_data_rw != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->get_data_rw != NULL); return graphics_console_hooks->get_data_rw(cons, spec); } void v3_graphics_console_release_frame_buffer_data_rw(v3_graphics_console_t cons) { - V3_ASSERT(graphics_console_hooks != NULL); - V3_ASSERT(graphics_console_hooks->release_data_rw != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->release_data_rw != NULL); return graphics_console_hooks->release_data_rw(cons); } @@ -80,15 +80,40 @@ void v3_graphics_console_release_frame_buffer_data_rw(v3_graphics_console_t cons int v3_graphics_console_inform_update(v3_graphics_console_t cons) { - V3_ASSERT(graphics_console_hooks != NULL); - V3_ASSERT(graphics_console_hooks->changed != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks != NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->changed != NULL); return graphics_console_hooks->changed(cons); } +int v3_graphics_console_register_render_request( + v3_graphics_console_t cons, + int (*render_request)(v3_graphics_console_t cons, + void *priv_data), + void *priv_data) +{ + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks!=NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->register_render_request!=NULL); + + return graphics_console_hooks->register_render_request(cons,render_request,priv_data); +} + +int v3_graphics_console_register_update_inquire( + v3_graphics_console_t cons, + int (*update_inquire)(v3_graphics_console_t cons, + void *priv_data), + void *priv_data) +{ + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks!=NULL); + V3_ASSERT(VM_NONE, VCORE_NONE, graphics_console_hooks->register_update_inquire!=NULL); + + return graphics_console_hooks->register_update_inquire(cons,update_inquire,priv_data); +} + + void V3_Init_Graphics_Console(struct v3_graphics_console_hooks * hooks) { graphics_console_hooks = hooks; - PrintDebug("V3 graphics console inited\n"); + PrintDebug(VM_NONE, VCORE_NONE, "V3 graphics console inited\n"); return; }