filename | src/video.c |
changeset | 31:495e480360d7 |
prev | 1:eea311cfd33e |
next | 65:9f124c245fc6 |
author | nkeynes |
date | Tue Dec 27 08:41:22 2005 +0000 (18 years ago) |
permissions | -rw-r--r-- |
last change | Fix output list click Fix mmr column widths Fix run-to for ARM |
view | annotate | diff | log | raw |
1 /**
2 * $Id: video.c,v 1.2 2005-12-25 08:24:07 nkeynes Exp $
3 *
4 * The PC side of the video support (responsible for actually displaying /
5 * rendering frames)
6 *
7 * Copyright (c) 2005 Nathan Keynes.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 */
20 #include <gnome.h>
22 GdkImage *img;
23 GtkWindow *video_win;
24 GtkWidget *video_area;
25 char *video_data;
27 void video_open( void )
28 {
29 img = gdk_image_new( GDK_IMAGE_FASTEST, gdk_visual_get_system(),
30 640, 480 );
31 video_win = GTK_WINDOW(gtk_window_new( GTK_WINDOW_TOPLEVEL ));
32 video_area = gtk_image_new_from_image(img, NULL);
33 gtk_widget_show( video_area );
34 gtk_container_add( GTK_CONTAINER(video_win), video_area );
35 video_data = img->mem;
37 gtk_window_set_title( video_win, "DreamOn! - Emulation Window" );
38 gtk_window_set_policy( video_win, FALSE, FALSE, FALSE );
39 gtk_window_set_default_size( video_win, 640, 480 );
41 gtk_widget_show( GTK_WIDGET(video_win) );
42 }
44 void video_update_frame( void )
45 {
46 gtk_widget_queue_draw( video_area );
47 }
49 void video_update_size( int hres, int vres, int colmode )
50 {
51 /* do something intelligent */
52 }
.