Added some simple code to hide the cursor on fullscreen, also got rid of some warnings. this is a small update before...

Original commit message from CVS:
Added some simple code to hide the cursor on fullscreen, also got rid of some warnings. this is a small update before the new gstplay lands.
This commit is contained in:
Arik Devens 2001-12-04 15:16:01 +00:00
parent fe917f5b13
commit d0cfa2dabd
4 changed files with 51 additions and 2 deletions

View file

@ -1,3 +1,17 @@
2001-12-04 Arik Devens <arik@gnome.org>
This is a minor update on a few things while i work on getting the
new gstplay into cvs. Enjoy :-)
* gstmediaplay.c (on_load_file_selected): As below, commented out
the addto_playlist line to get rid of GtkCList warnings.
(gst_media_play_set_fullscreen): Added setting and unsetting of
the GdkCursor on fullscreen to hide the cursor while playing
video.
* main.c (main): Commented out adding to the playlist for now to
get rid of the GtkCList warning.
2001-08-15 Arik Devens <arik@gnome.org>
* gstmediaplay.c (gst_media_play_set_fullscreen): Added a hacky

View file

@ -316,7 +316,7 @@ on_load_file_selected (GtkWidget *button,
gst_media_play_start_uri (play, file_name);
gdk_threads_enter();
gst_media_play_addto_playlist (play, file_name);
//gst_media_play_addto_playlist (play, file_name);
g_free (data);
}
@ -506,6 +506,19 @@ gst_media_play_set_fullscreen (GstMediaPlay *mplay)
gint width, height, source_width, source_height;
GstPlay *play;
GtkWidget *video_widget;
GdkCursor* cursor;
GdkPixmap *source;
GdkPixmap *mask;
GdkColor fg = {0, 0, 0, 0};
GdkColor bg = {0, 0, 0, 0};
static unsigned char cursor_bits[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
static unsigned char cursormask_bits[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
gdk_window = mplay->window->window;
play = mplay->play;
@ -530,6 +543,16 @@ gst_media_play_set_fullscreen (GstMediaPlay *mplay)
gtk_widget_set_usize (video_widget, gdk_screen_width () + 1,
gdk_screen_height () + 1);
source = gdk_bitmap_create_from_data (NULL, cursor_bits,
16, 16);
mask = gdk_bitmap_create_from_data (NULL, cursormask_bits,
16, 16);
cursor = gdk_cursor_new_from_pixmap (source, mask, &fg, &bg, 8, 8);
gdk_pixmap_unref (source);
gdk_pixmap_unref (mask);
gdk_window_set_cursor (mplay->window->window, cursor);
mplay->x = root_x - client_x;
mplay->y = root_y - client_y;
mplay->width = width;
@ -550,6 +573,8 @@ gst_media_play_set_fullscreen (GstMediaPlay *mplay)
gdk_window_move (gdk_window, mplay->x, mplay->y);
gtk_widget_set_usize (video_widget, source_width,
source_height);
gdk_window_set_cursor (mplay->window->window, NULL);
gtk_signal_disconnect (GTK_OBJECT (mplay->window), mplay->fullscreen_connection_id);

View file

@ -428,6 +428,14 @@
<icon>stop.xpm</icon>
<active>False</active>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>button1</name>
<label>button1</label>
<icon>play.xpm</icon>
</widget>
</widget>
</widget>
@ -513,6 +521,7 @@ Arik Devens &lt;arik@gnome.org&gt;
<last_modification_time>Sun, 06 Aug 2000 15:55:52 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@ -528,6 +537,7 @@ Arik Devens &lt;arik@gnome.org&gt;
<last_modification_time>Sun, 06 Aug 2000 15:53:48 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>

View file

@ -21,7 +21,7 @@ main (int argc, char *argv[])
gst_media_play_start_uri (play, argv[1]);
for (i=1;i<argc;i++) {
gst_media_play_addto_playlist (play, argv[i]);
//gst_media_play_addto_playlist (play, argv[i]);
}
}