mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-29 23:32:33 +00:00
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:
parent
fe917f5b13
commit
d0cfa2dabd
4 changed files with 51 additions and 2 deletions
|
@ -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>
|
2001-08-15 Arik Devens <arik@gnome.org>
|
||||||
|
|
||||||
* gstmediaplay.c (gst_media_play_set_fullscreen): Added a hacky
|
* gstmediaplay.c (gst_media_play_set_fullscreen): Added a hacky
|
||||||
|
|
|
@ -316,7 +316,7 @@ on_load_file_selected (GtkWidget *button,
|
||||||
gst_media_play_start_uri (play, file_name);
|
gst_media_play_start_uri (play, file_name);
|
||||||
gdk_threads_enter();
|
gdk_threads_enter();
|
||||||
|
|
||||||
gst_media_play_addto_playlist (play, file_name);
|
//gst_media_play_addto_playlist (play, file_name);
|
||||||
|
|
||||||
g_free (data);
|
g_free (data);
|
||||||
}
|
}
|
||||||
|
@ -506,6 +506,19 @@ gst_media_play_set_fullscreen (GstMediaPlay *mplay)
|
||||||
gint width, height, source_width, source_height;
|
gint width, height, source_width, source_height;
|
||||||
GstPlay *play;
|
GstPlay *play;
|
||||||
GtkWidget *video_widget;
|
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;
|
gdk_window = mplay->window->window;
|
||||||
play = mplay->play;
|
play = mplay->play;
|
||||||
|
@ -530,6 +543,16 @@ gst_media_play_set_fullscreen (GstMediaPlay *mplay)
|
||||||
gtk_widget_set_usize (video_widget, gdk_screen_width () + 1,
|
gtk_widget_set_usize (video_widget, gdk_screen_width () + 1,
|
||||||
gdk_screen_height () + 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->x = root_x - client_x;
|
||||||
mplay->y = root_y - client_y;
|
mplay->y = root_y - client_y;
|
||||||
mplay->width = width;
|
mplay->width = width;
|
||||||
|
@ -551,6 +574,8 @@ gst_media_play_set_fullscreen (GstMediaPlay *mplay)
|
||||||
gtk_widget_set_usize (video_widget, source_width,
|
gtk_widget_set_usize (video_widget, source_width,
|
||||||
source_height);
|
source_height);
|
||||||
|
|
||||||
|
gdk_window_set_cursor (mplay->window->window, NULL);
|
||||||
|
|
||||||
gtk_signal_disconnect (GTK_OBJECT (mplay->window), mplay->fullscreen_connection_id);
|
gtk_signal_disconnect (GTK_OBJECT (mplay->window), mplay->fullscreen_connection_id);
|
||||||
|
|
||||||
fullscreen_active = FALSE;
|
fullscreen_active = FALSE;
|
||||||
|
|
|
@ -428,6 +428,14 @@
|
||||||
<icon>stop.xpm</icon>
|
<icon>stop.xpm</icon>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
<widget>
|
||||||
|
<class>GtkButton</class>
|
||||||
|
<child_name>Toolbar:button</child_name>
|
||||||
|
<name>button1</name>
|
||||||
|
<label>button1</label>
|
||||||
|
<icon>play.xpm</icon>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
@ -513,6 +521,7 @@ Arik Devens <arik@gnome.org>
|
||||||
<last_modification_time>Sun, 06 Aug 2000 15:55:52 GMT</last_modification_time>
|
<last_modification_time>Sun, 06 Aug 2000 15:55:52 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
|
||||||
|
<relief>GTK_RELIEF_NORMAL</relief>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
|
@ -528,6 +537,7 @@ Arik Devens <arik@gnome.org>
|
||||||
<last_modification_time>Sun, 06 Aug 2000 15:53:48 GMT</last_modification_time>
|
<last_modification_time>Sun, 06 Aug 2000 15:53:48 GMT</last_modification_time>
|
||||||
</signal>
|
</signal>
|
||||||
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
|
||||||
|
<relief>GTK_RELIEF_NORMAL</relief>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ main (int argc, char *argv[])
|
||||||
gst_media_play_start_uri (play, argv[1]);
|
gst_media_play_start_uri (play, argv[1]);
|
||||||
|
|
||||||
for (i=1;i<argc;i++) {
|
for (i=1;i<argc;i++) {
|
||||||
gst_media_play_addto_playlist (play, argv[i]);
|
//gst_media_play_addto_playlist (play, argv[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue