diff options
author | Benjamin Otte <otte@redhat.com> | 2018-03-18 03:20:02 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-03-18 21:01:23 +0100 |
commit | 04a3b8b6df1d3b58e9187e11c7e77ad259ad9eec (patch) | |
tree | daeac1b4fb0251fc2de3bea6a4335273342f0eba /gtk/gtkmediastream.h | |
parent | 09a21f1cd26d331a43a03a9baa1b8912cbb1b282 (diff) | |
download | gtk+-04a3b8b6df1d3b58e9187e11c7e77ad259ad9eec.tar.gz |
mediastream: Add gtk_media_stream_realize/unrealize()
This allows widget to attach their streams to GdkWindow(s)
The idea is to allow attaching a stream to windowing system(s) so the
stream can make use of its resources, in particular GL contexts.
I am however unsure what to attach to:
- GtkWindow
- GdkWindow
- GtkWidget
- GskRenderer
Each of these provide advantages and disadvantages.
So I'm very much open to better suggestions.
Diffstat (limited to 'gtk/gtkmediastream.h')
-rw-r--r-- | gtk/gtkmediastream.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkmediastream.h b/gtk/gtkmediastream.h index 3029696518..a04fafd8fa 100644 --- a/gtk/gtkmediastream.h +++ b/gtk/gtkmediastream.h @@ -44,6 +44,11 @@ struct _GtkMediaStreamClass void (* update_audio) (GtkMediaStream *self, gboolean muted, double volume); + void (* realize) (GtkMediaStream *self, + GdkWindow *window); + void (* unrealize) (GtkMediaStream *self, + GdkWindow *window); + /* Padding for future expansion */ void (*_gtk_reserved1) (void); void (*_gtk_reserved2) (void); @@ -103,6 +108,12 @@ double gtk_media_stream_get_volume (GtkMediaStream GDK_AVAILABLE_IN_ALL void gtk_media_stream_set_volume (GtkMediaStream *self, double volume); +GDK_AVAILABLE_IN_ALL +void gtk_media_stream_realize (GtkMediaStream *self, + GdkWindow *window); +GDK_AVAILABLE_IN_ALL +void gtk_media_stream_unrealize (GtkMediaStream *self, + GdkWindow *window); /* for implementations only */ GDK_AVAILABLE_IN_ALL |