Search
lxdream.org :: lxdream/src/video.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/video.c
changeset 1:eea311cfd33e
next31:495e480360d7
author nkeynes
date Sat Mar 13 00:03:32 2004 +0000 (15 years ago)
permissions -rw-r--r--
last change This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
file annotate diff log raw
nkeynes@1
     1
#include <gnome.h>
nkeynes@1
     2
nkeynes@1
     3
GdkImage *img;
nkeynes@1
     4
GtkWindow *video_win;
nkeynes@1
     5
GtkWidget *video_area;
nkeynes@1
     6
char *video_data;
nkeynes@1
     7
nkeynes@1
     8
void video_open( void )
nkeynes@1
     9
{
nkeynes@1
    10
    img = gdk_image_new( GDK_IMAGE_FASTEST, gdk_visual_get_system(),
nkeynes@1
    11
                         640, 480 );
nkeynes@1
    12
    video_win = GTK_WINDOW(gtk_window_new( GTK_WINDOW_TOPLEVEL ));
nkeynes@1
    13
    video_area = gtk_image_new_from_image(img, NULL);
nkeynes@1
    14
    gtk_widget_show( video_area );
nkeynes@1
    15
    gtk_container_add( GTK_CONTAINER(video_win), video_area );
nkeynes@1
    16
    video_data = img->mem;
nkeynes@1
    17
    
nkeynes@1
    18
    gtk_window_set_title( video_win, "DreamOn! - Emulation Window" );
nkeynes@1
    19
    gtk_window_set_policy( video_win, FALSE, FALSE, FALSE );
nkeynes@1
    20
    gtk_window_set_default_size( video_win, 640, 480 );
nkeynes@1
    21
    
nkeynes@1
    22
    gtk_widget_show( GTK_WIDGET(video_win) );
nkeynes@1
    23
}
nkeynes@1
    24
nkeynes@1
    25
void video_update_frame( void )
nkeynes@1
    26
{
nkeynes@1
    27
    gtk_widget_queue_draw( video_area );
nkeynes@1
    28
}
nkeynes@1
    29
nkeynes@1
    30
void video_update_size( int hres, int vres, int colmode )
nkeynes@1
    31
{
nkeynes@1
    32
    /* do something intelligent */
nkeynes@1
    33
}
.