Search
lxdream.org :: lxdream/src/video.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/video.c
changeset 1:eea311cfd33e
next31:495e480360d7
author nkeynes
date Thu Dec 08 13:38:00 2005 +0000 (18 years ago)
permissions -rw-r--r--
last change Generalise the core debug window to allow multiple instances.
Add cpu description structure to define different cpus for use by the
debug window, in preparation for ARM implementation
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/video.c Thu Dec 08 13:38:00 2005 +0000
1.3 @@ -0,0 +1,33 @@
1.4 +#include <gnome.h>
1.5 +
1.6 +GdkImage *img;
1.7 +GtkWindow *video_win;
1.8 +GtkWidget *video_area;
1.9 +char *video_data;
1.10 +
1.11 +void video_open( void )
1.12 +{
1.13 + img = gdk_image_new( GDK_IMAGE_FASTEST, gdk_visual_get_system(),
1.14 + 640, 480 );
1.15 + video_win = GTK_WINDOW(gtk_window_new( GTK_WINDOW_TOPLEVEL ));
1.16 + video_area = gtk_image_new_from_image(img, NULL);
1.17 + gtk_widget_show( video_area );
1.18 + gtk_container_add( GTK_CONTAINER(video_win), video_area );
1.19 + video_data = img->mem;
1.20 +
1.21 + gtk_window_set_title( video_win, "DreamOn! - Emulation Window" );
1.22 + gtk_window_set_policy( video_win, FALSE, FALSE, FALSE );
1.23 + gtk_window_set_default_size( video_win, 640, 480 );
1.24 +
1.25 + gtk_widget_show( GTK_WIDGET(video_win) );
1.26 +}
1.27 +
1.28 +void video_update_frame( void )
1.29 +{
1.30 + gtk_widget_queue_draw( video_area );
1.31 +}
1.32 +
1.33 +void video_update_size( int hres, int vres, int colmode )
1.34 +{
1.35 + /* do something intelligent */
1.36 +}
.