| 1 | /* |
| 2 | * Copyright © 2018 Benjamin Otte |
| 3 | * |
| 4 | * This library is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU Lesser General Public |
| 6 | * License as published by the Free Software Foundation; either |
| 7 | * version 2.1 of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This library is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | * Lesser General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU Lesser General Public |
| 15 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 | * |
| 17 | * Authors: Benjamin Otte <[email protected]> |
| 18 | */ |
| 19 | |
| 20 | #include "config.h"cxx . . $ `<file>/build/config.h`/ |
| 21 | |
| 22 | #include "gtkvideo.h"cxx . . $ `<file>/gtk/gtkvideo.h`/ |
| 23 | |
| 24 | #include "gtkbinlayout.h"cxx . . $ `<file>/gtk/gtkbinlayout.h`/ |
| 25 | #include "gtkgraphicsoffload.h"cxx . . $ `<file>/gtk/gtkgraphicsoffload.h`/ |
| 26 | #include "gtkeventcontrollermotion.h"cxx . . $ `<file>/gtk/gtkeventcontrollermotion.h`/ |
| 27 | #include "gtkimage.h"cxx . . $ `<file>/gtk/gtkimage.h`/ |
| 28 | #include <glib/gi18n-lib.h> |
| 29 | #include "gtkmediacontrols.h"cxx . . $ `<file>/gtk/gtkmediacontrols.h`/ |
| 30 | #include "gtkmediafile.h"cxx . . $ `<file>/gtk/gtkmediafile.h`/ |
| 31 | #include "gtknative.h"cxx . . $ `<file>/gtk/gtknative.h`/ |
| 32 | #include "gtkpicture.h"cxx . . $ `<file>/gtk/gtkpicture.h`/ |
| 33 | #include "gtkrevealer.h"cxx . . $ `<file>/gtk/gtkrevealer.h`/ |
| 34 | #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/ |
| 35 | #include "gtkgestureclick.h"cxx . . $ `<file>/gtk/gtkgestureclick.h`/ |
| 36 | #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/ |
| 37 | #include "gtktypebuiltins.h"cxx . . $ `<file>/build/gtk/gtktypebuiltins.h`/ |
| 38 | |
| 39 | /** |
| 40 | * GtkVideo: |
| 41 | * |
| 42 | * Shows a `GtkMediaStream` with media controls. |
| 43 | * |
| 44 | * <picture> |
| 45 | * <source srcset="video-dark.png" media="(prefers-color-scheme: dark)"> |
| 46 | * <img alt="An example GtkVideo" src="video.png"> |
| 47 | * </picture> |
| 48 | * |
| 49 | * The controls are available separately as [[email protected]]. |
| 50 | * If you just want to display a video without controls, you can treat it |
| 51 | * like any other paintable and for example put it into a [[email protected]]. |
| 52 | * |
| 53 | * `GtkVideo` aims to cover use cases such as previews, embedded animations, |
| 54 | * etc. It supports autoplay, looping, and simple media controls. It does |
| 55 | * not have support for video overlays, multichannel audio, device |
| 56 | * selection, or input. If you are writing a full-fledged video player, |
| 57 | * you may want to use the [[email protected]] API and a media framework |
| 58 | * such as Gstreamer directly. |
| 59 | */ |
| 60 | |
| 61 | struct _GtkVideocxx . . $ _GtkVideo# |
| 62 | { |
| 63 | GtkWidgetcxx . . $ GtkWidget# parent_instancecxx . . $ _GtkVideo#parent_instance.; |
| 64 | |
| 65 | GFilecxx . . $ GFile# *filecxx . . $ _GtkVideo#file.; |
| 66 | GtkMediaStreamcxx . . $ GtkMediaStream# *media_streamcxx . . $ _GtkVideo#media_stream.; |
| 67 | |
| 68 | GtkWidgetcxx . . $ GtkWidget# *boxcxx . . $ _GtkVideo#box.; |
| 69 | GtkWidgetcxx . . $ GtkWidget# *video_picturecxx . . $ _GtkVideo#video_picture.; |
| 70 | GtkWidgetcxx . . $ GtkWidget# *overlay_iconcxx . . $ _GtkVideo#overlay_icon.; |
| 71 | GtkWidgetcxx . . $ GtkWidget# *controls_revealercxx . . $ _GtkVideo#controls_revealer.; |
| 72 | GtkWidgetcxx . . $ GtkWidget# *controlscxx . . $ _GtkVideo#controls.; |
| 73 | GtkWidgetcxx . . $ GtkWidget# *graphics_offloadcxx . . $ _GtkVideo#graphics_offload.; |
| 74 | guintcxx . . $ guint# controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source.; |
| 75 | guintcxx . . $ guint# cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source.; |
| 76 | double last_xcxx . . $ _GtkVideo#last_x.; |
| 77 | double last_ycxx . . $ _GtkVideo#last_y.; |
| 78 | |
| 79 | guintcxx . . $ guint# autoplaycxx . . $ _GtkVideo#autoplay. : 1; |
| 80 | guintcxx . . $ guint# loopcxx . . $ _GtkVideo#loop. : 1; |
| 81 | guintcxx . . $ guint# grabbedcxx . . $ _GtkVideo#grabbed. : 1; |
| 82 | guintcxx . . $ guint# fullscreencxx . . $ _GtkVideo#fullscreen. : 1; |
| 83 | guintcxx . . $ guint# cursor_hiddencxx . . $ _GtkVideo#cursor_hidden. : 1; |
| 84 | }; |
| 85 | |
| 86 | enumcxx . . $ $anonymous_type_a442e3d03e78b9fd_0# |
| 87 | { |
| 88 | PROP_0cxx . . $ PROP_0., |
| 89 | PROP_AUTOPLAYcxx . . $ PROP_AUTOPLAY., |
| 90 | PROP_FILEcxx . . $ PROP_FILE., |
| 91 | PROP_LOOPcxx . . $ PROP_LOOP., |
| 92 | PROP_MEDIA_STREAMcxx . . $ PROP_MEDIA_STREAM., |
| 93 | PROP_GRAPHICS_OFFLOADcxx . . $ PROP_GRAPHICS_OFFLOAD., |
| 94 | |
| 95 | N_PROPScxx . . $ N_PROPS. |
| 96 | }; |
| 97 | |
| 98 | G_DEFINE_TYPEcxx . . $ `<external>/9567554376676449156/gtype.h:1834:9`! (GtkVideo, gtk_video, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!) |
| 99 | |
| 100 | static GParamSpeccxx . . $ GParamSpec# *propertiescxx . . $ properties.[N_PROPScxx . . $ N_PROPS.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, }; |
| 101 | |
| 102 | static gbooleancxx . . $ gboolean# |
| 103 | gtk_video_get_playingcxx . . $ gtk_video_get_playing(3499eadb4deb99fc). (GtkVideocxx . . $ GtkVideo# *self) |
| 104 | { |
| 105 | if (self->media_streamcxx . . $ _GtkVideo#media_stream. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 106 | return gtk_media_stream_get_playingcxx . . $ gtk_media_stream_get_playing(85802d43861b59f2). (self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 107 | |
| 108 | return FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 109 | } |
| 110 | |
| 111 | static gbooleancxx . . $ gboolean# |
| 112 | gtk_video_hide_controlscxx . . $ gtk_video_hide_controls(dedf1e9b1c614a07). (gpointercxx . . $ gpointer# data) |
| 113 | { |
| 114 | GtkVideocxx . . $ GtkVideo# *self = data; |
| 115 | |
| 116 | if (gtk_video_get_playingcxx . . $ gtk_video_get_playing(3499eadb4deb99fc). (self)) |
| 117 | gtk_revealer_set_reveal_childcxx . . $ gtk_revealer_set_reveal_child(ff879eb0a1838655). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (self->controls_revealer), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 118 | |
| 119 | self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source. = 0; |
| 120 | |
| 121 | return G_SOURCE_REMOVEcxx . . $ `<external>/1856471541377536744/gmain.h:475:9`!; |
| 122 | } |
| 123 | |
| 124 | static void |
| 125 | gtk_video_reveal_controlscxx . . $ gtk_video_reveal_controls(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 126 | { |
| 127 | gtk_revealer_set_reveal_childcxx . . $ gtk_revealer_set_reveal_child(ff879eb0a1838655). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (self->controls_revealer), TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!); |
| 128 | if (self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source.) |
| 129 | g_source_removecxx . . $ g_source_remove(4c679297bf94b9eb). (self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source.); |
| 130 | self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source. = g_timeout_addcxx . . $ g_timeout_add(ec6d13059821d355). (3 * 1000, |
| 131 | gtk_video_hide_controlscxx . . $ gtk_video_hide_controls(dedf1e9b1c614a07)., |
| 132 | self); |
| 133 | gdk_source_set_static_name_by_idcxx . . $ gdk_source_set_static_name_by_id(d7adf5cfafc0e15a). (self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source., "[gtk] gtk_video_hide_controls"); |
| 134 | } |
| 135 | |
| 136 | static gbooleancxx . . $ gboolean# |
| 137 | gtk_video_hide_cursorcxx . . $ gtk_video_hide_cursor(dedf1e9b1c614a07). (gpointercxx . . $ gpointer# data) |
| 138 | { |
| 139 | GtkVideocxx . . $ GtkVideo# *self = data; |
| 140 | |
| 141 | if (self->fullscreencxx . . $ _GtkVideo#fullscreen. && gtk_video_get_playingcxx . . $ gtk_video_get_playing(3499eadb4deb99fc). (self) && !self->cursor_hiddencxx . . $ _GtkVideo#cursor_hidden.) |
| 142 | { |
| 143 | gtk_widget_set_cursor_from_namecxx . . $ gtk_widget_set_cursor_from_name(3e0616a87a6c51e5). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), "none"); |
| 144 | self->cursor_hiddencxx . . $ _GtkVideo#cursor_hidden. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!; |
| 145 | } |
| 146 | |
| 147 | self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source. = 0; |
| 148 | |
| 149 | return G_SOURCE_REMOVEcxx . . $ `<external>/1856471541377536744/gmain.h:475:9`!; |
| 150 | } |
| 151 | |
| 152 | static void |
| 153 | gtk_video_reveal_cursorcxx . . $ gtk_video_reveal_cursor(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 154 | { |
| 155 | gtk_widget_set_cursorcxx . . $ gtk_widget_set_cursor(ccca0ca28f2292d8). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 156 | self->cursor_hiddencxx . . $ _GtkVideo#cursor_hidden. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 157 | if (self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source.) |
| 158 | g_source_removecxx . . $ g_source_remove(4c679297bf94b9eb). (self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source.); |
| 159 | self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source. = g_timeout_addcxx . . $ g_timeout_add(ec6d13059821d355). (3 * 1000, |
| 160 | gtk_video_hide_cursorcxx . . $ gtk_video_hide_cursor(dedf1e9b1c614a07)., |
| 161 | self); |
| 162 | gdk_source_set_static_name_by_idcxx . . $ gdk_source_set_static_name_by_id(d7adf5cfafc0e15a). (self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source., "[gtk] gtk_video_hide_cursor"); |
| 163 | } |
| 164 | |
| 165 | static void |
| 166 | gtk_video_motioncxx . . $ gtk_video_motion(c9dc41fb7efa2212). (GtkEventControllerMotioncxx . . $ GtkEventControllerMotion# *motion, |
| 167 | double x, |
| 168 | double y, |
| 169 | GtkVideocxx . . $ GtkVideo# *self) |
| 170 | { |
| 171 | if (self->last_xcxx . . $ _GtkVideo#last_x. == x && self->last_ycxx . . $ _GtkVideo#last_y. == y) |
| 172 | return; |
| 173 | |
| 174 | self->last_xcxx . . $ _GtkVideo#last_x. = x; |
| 175 | self->last_ycxx . . $ _GtkVideo#last_y. = y; |
| 176 | |
| 177 | gtk_video_reveal_cursorcxx . . $ gtk_video_reveal_cursor(e5ce6d98d3d3a3f2). (self); |
| 178 | gtk_video_reveal_controlscxx . . $ gtk_video_reveal_controls(e5ce6d98d3d3a3f2). (self); |
| 179 | } |
| 180 | |
| 181 | static void |
| 182 | gtk_video_pressedcxx . . $ gtk_video_pressed(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 183 | { |
| 184 | gtk_video_reveal_controlscxx . . $ gtk_video_reveal_controls(e5ce6d98d3d3a3f2). (self); |
| 185 | } |
| 186 | |
| 187 | static void |
| 188 | overlay_clicked_cbcxx . . $ overlay_clicked_cb(fb86acfcc4f5248d). (GtkGestureClickcxx . . $ GtkGestureClick# *gesture, |
| 189 | unsigned int n_press, |
| 190 | double x, |
| 191 | double y, |
| 192 | gpointercxx . . $ gpointer# data) |
| 193 | { |
| 194 | GtkVideocxx . . $ GtkVideo# *self = data; |
| 195 | |
| 196 | if (self->media_streamcxx . . $ _GtkVideo#media_stream.) |
| 197 | gtk_media_stream_set_playingcxx . . $ gtk_media_stream_set_playing(5df63d5845b9d046). (self->media_streamcxx . . $ _GtkVideo#media_stream., !gtk_media_stream_get_playingcxx . . $ gtk_media_stream_get_playing(85802d43861b59f2). (self->media_streamcxx . . $ _GtkVideo#media_stream.)); |
| 198 | } |
| 199 | |
| 200 | static void |
| 201 | gtk_video_realizecxx . . $ gtk_video_realize(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 202 | { |
| 203 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (widget); |
| 204 | |
| 205 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->realizecxx . . $ _GtkWidgetClass#realize. (widget); |
| 206 | |
| 207 | if (self->media_streamcxx . . $ _GtkVideo#media_stream.) |
| 208 | { |
| 209 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 210 | |
| 211 | surface = gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (widget)); |
| 212 | gtk_media_stream_realizecxx . . $ gtk_media_stream_realize(14ab850b56344d23). (self->media_streamcxx . . $ _GtkVideo#media_stream., surface); |
| 213 | } |
| 214 | |
| 215 | if (self->filecxx . . $ _GtkVideo#file.) |
| 216 | gtk_media_file_set_filecxx . . $ gtk_media_file_set_file(1f2b7d72eeb990c8). (GTK_MEDIA_FILEcxx . . $ GTK_MEDIA_FILE(1db77882be31162d). (self->media_streamcxx . . $ _GtkVideo#media_stream.), self->filecxx . . $ _GtkVideo#file.); |
| 217 | } |
| 218 | |
| 219 | static void |
| 220 | gtk_video_unrealizecxx . . $ gtk_video_unrealize(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 221 | { |
| 222 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (widget); |
| 223 | |
| 224 | if (self->autoplaycxx . . $ _GtkVideo#autoplay. && self->media_streamcxx . . $ _GtkVideo#media_stream.) |
| 225 | gtk_media_stream_pausecxx . . $ gtk_media_stream_pause(54e5f97b21b96fd6). (self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 226 | |
| 227 | if (self->media_streamcxx . . $ _GtkVideo#media_stream.) |
| 228 | { |
| 229 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 230 | |
| 231 | surface = gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (widget)); |
| 232 | gtk_media_stream_unrealizecxx . . $ gtk_media_stream_unrealize(14ab850b56344d23). (self->media_streamcxx . . $ _GtkVideo#media_stream., surface); |
| 233 | } |
| 234 | |
| 235 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->unrealizecxx . . $ _GtkWidgetClass#unrealize. (widget); |
| 236 | } |
| 237 | |
| 238 | static void |
| 239 | gtk_video_mapcxx . . $ gtk_video_map(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 240 | { |
| 241 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (widget); |
| 242 | |
| 243 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->mapcxx . . $ _GtkWidgetClass#map. (widget); |
| 244 | |
| 245 | if (self->autoplaycxx . . $ _GtkVideo#autoplay. && |
| 246 | self->media_streamcxx . . $ _GtkVideo#media_stream. && |
| 247 | gtk_media_stream_is_preparedcxx . . $ gtk_media_stream_is_prepared(85802d43861b59f2). (self->media_streamcxx . . $ _GtkVideo#media_stream.)) |
| 248 | gtk_media_stream_playcxx . . $ gtk_media_stream_play(54e5f97b21b96fd6). (self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 249 | |
| 250 | gtk_video_reveal_cursorcxx . . $ gtk_video_reveal_cursor(e5ce6d98d3d3a3f2). (GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (widget)); |
| 251 | } |
| 252 | |
| 253 | static void |
| 254 | gtk_video_unmapcxx . . $ gtk_video_unmap(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 255 | { |
| 256 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (widget); |
| 257 | |
| 258 | if (self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source.) |
| 259 | { |
| 260 | g_source_removecxx . . $ g_source_remove(4c679297bf94b9eb). (self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source.); |
| 261 | self->controls_hide_sourcecxx . . $ _GtkVideo#controls_hide_source. = 0; |
| 262 | gtk_revealer_set_reveal_childcxx . . $ gtk_revealer_set_reveal_child(ff879eb0a1838655). (GTK_REVEALERcxx . . $ `gtk/gtkrevealer.h:30:9`! (self->controls_revealer), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 263 | } |
| 264 | |
| 265 | if (self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source.) |
| 266 | { |
| 267 | g_source_removecxx . . $ g_source_remove(4c679297bf94b9eb). (self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source.); |
| 268 | self->cursor_hide_sourcecxx . . $ _GtkVideo#cursor_hide_source. = 0; |
| 269 | gtk_widget_set_cursorcxx . . $ gtk_widget_set_cursor(ccca0ca28f2292d8). (widget, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 270 | } |
| 271 | |
| 272 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->unmapcxx . . $ _GtkWidgetClass#unmap. (widget); |
| 273 | } |
| 274 | |
| 275 | static void |
| 276 | gtk_video_hidecxx . . $ gtk_video_hide(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 277 | { |
| 278 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (widget); |
| 279 | |
| 280 | if (self->autoplaycxx . . $ _GtkVideo#autoplay. && self->media_streamcxx . . $ _GtkVideo#media_stream.) |
| 281 | gtk_media_stream_pausecxx . . $ gtk_media_stream_pause(54e5f97b21b96fd6). (self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 282 | |
| 283 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->hidecxx . . $ _GtkWidgetClass#hide. (widget); |
| 284 | } |
| 285 | |
| 286 | static void |
| 287 | gtk_video_disposecxx . . $ gtk_video_dispose(6087475fa43034d3). (GObjectcxx . . $ GObject# *object) |
| 288 | { |
| 289 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (object); |
| 290 | |
| 291 | gtk_video_set_media_streamcxx . . $ gtk_video_set_media_stream(e1aa8d45c780b9b4). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 292 | |
| 293 | g_clear_pointercxx . . $ `<external>/1123956534522462559/gmem.h:135:9`! (&self->box, gtk_widget_unparent); |
| 294 | g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&self->file); |
| 295 | |
| 296 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_video_parent_class)->disposecxx . . $ _GObjectClass#dispose. (object); |
| 297 | } |
| 298 | |
| 299 | static void |
| 300 | gtk_video_get_propertycxx . . $ gtk_video_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *object, |
| 301 | guintcxx . . $ guint# property_id, |
| 302 | GValuecxx . . $ GValue# *value, |
| 303 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 304 | { |
| 305 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (object); |
| 306 | |
| 307 | switch (property_id) |
| 308 | { |
| 309 | case PROP_AUTOPLAYcxx . . $ PROP_AUTOPLAY.: |
| 310 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->autoplaycxx . . $ _GtkVideo#autoplay.); |
| 311 | break; |
| 312 | |
| 313 | case PROP_FILEcxx . . $ PROP_FILE.: |
| 314 | g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, self->filecxx . . $ _GtkVideo#file.); |
| 315 | break; |
| 316 | |
| 317 | case PROP_LOOPcxx . . $ PROP_LOOP.: |
| 318 | g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, self->loopcxx . . $ _GtkVideo#loop.); |
| 319 | break; |
| 320 | |
| 321 | case PROP_MEDIA_STREAMcxx . . $ PROP_MEDIA_STREAM.: |
| 322 | g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 323 | break; |
| 324 | |
| 325 | case PROP_GRAPHICS_OFFLOADcxx . . $ PROP_GRAPHICS_OFFLOAD.: |
| 326 | g_value_set_enumcxx . . $ g_value_set_enum(b698c61e8e30c4ea). (value, gtk_video_get_graphics_offloadcxx . . $ gtk_video_get_graphics_offload(576cf71276b2b213). (self)); |
| 327 | break; |
| 328 | |
| 329 | default: |
| 330 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, property_id, pspec); |
| 331 | break; |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | static void |
| 336 | gtk_video_set_propertycxx . . $ gtk_video_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *object, |
| 337 | guintcxx . . $ guint# property_id, |
| 338 | const GValuecxx . . $ GValue# *value, |
| 339 | GParamSpeccxx . . $ GParamSpec# *pspec) |
| 340 | { |
| 341 | GtkVideocxx . . $ GtkVideo# *self = GTK_VIDEOcxx . . $ GTK_VIDEO(e95614d4f39d66c9). (object); |
| 342 | |
| 343 | switch (property_id) |
| 344 | { |
| 345 | case PROP_AUTOPLAYcxx . . $ PROP_AUTOPLAY.: |
| 346 | gtk_video_set_autoplaycxx . . $ gtk_video_set_autoplay(c47bcb96cf3af04f). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 347 | break; |
| 348 | |
| 349 | case PROP_FILEcxx . . $ PROP_FILE.: |
| 350 | gtk_video_set_filecxx . . $ gtk_video_set_file(bb4ef7266e6d12be). (self, g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce). (value)); |
| 351 | break; |
| 352 | |
| 353 | case PROP_LOOPcxx . . $ PROP_LOOP.: |
| 354 | gtk_video_set_loopcxx . . $ gtk_video_set_loop(c47bcb96cf3af04f). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value)); |
| 355 | break; |
| 356 | |
| 357 | case PROP_MEDIA_STREAMcxx . . $ PROP_MEDIA_STREAM.: |
| 358 | gtk_video_set_media_streamcxx . . $ gtk_video_set_media_stream(e1aa8d45c780b9b4). (self, g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce). (value)); |
| 359 | break; |
| 360 | |
| 361 | case PROP_GRAPHICS_OFFLOADcxx . . $ PROP_GRAPHICS_OFFLOAD.: |
| 362 | gtk_video_set_graphics_offloadcxx . . $ gtk_video_set_graphics_offload(4319f640569dd833). (self, g_value_get_enumcxx . . $ g_value_get_enum(f890c5c75ead5b21). (value)); |
| 363 | break; |
| 364 | |
| 365 | default: |
| 366 | G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (object, property_id, pspec); |
| 367 | break; |
| 368 | } |
| 369 | } |
| 370 | |
| 371 | static void |
| 372 | fullscreen_changedcxx . . $ fullscreen_changed(587e94020936df5d). (GtkWindowcxx . . $ GtkWindow# *window, |
| 373 | GParamSpeccxx . . $ GParamSpec# *pspec, |
| 374 | GtkVideocxx . . $ GtkVideo# *self) |
| 375 | { |
| 376 | self->fullscreencxx . . $ _GtkVideo#fullscreen. = gtk_window_is_fullscreencxx . . $ gtk_window_is_fullscreen(b9ada049f487cdbd). (window); |
| 377 | } |
| 378 | |
| 379 | static void |
| 380 | gtk_video_rootcxx . . $ gtk_video_root(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 381 | { |
| 382 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->rootcxx . . $ _GtkWidgetClass#root. (widget); |
| 383 | |
| 384 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (gtk_widget_get_root (widget), "notify::fullscreened", |
| 385 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (fullscreen_changed), widget); |
| 386 | } |
| 387 | |
| 388 | static void |
| 389 | gtk_video_unrootcxx . . $ gtk_video_unroot(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget) |
| 390 | { |
| 391 | g_signal_handlers_disconnect_by_funccxx . . $ `<external>/15952772511652638895/gsignal.h:629:9`! (gtk_widget_get_root (widget), |
| 392 | fullscreen_changed, widget); |
| 393 | |
| 394 | GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_video_parent_class)->unrootcxx . . $ _GtkWidgetClass#unroot. (widget); |
| 395 | } |
| 396 | |
| 397 | static void |
| 398 | gtk_video_class_initcxx . . $ gtk_video_class_init(237386a147f05288). (GtkVideoClasscxx . . $ GtkVideoClass# *klass) |
| 399 | { |
| 400 | GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (klass); |
| 401 | GObjectClasscxx . . $ GObjectClass# *gobject_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass); |
| 402 | |
| 403 | widget_class->realizecxx . . $ _GtkWidgetClass#realize. = gtk_video_realizecxx . . $ gtk_video_realize(d7cf858254b37903).; |
| 404 | widget_class->unrealizecxx . . $ _GtkWidgetClass#unrealize. = gtk_video_unrealizecxx . . $ gtk_video_unrealize(d7cf858254b37903).; |
| 405 | widget_class->mapcxx . . $ _GtkWidgetClass#map. = gtk_video_mapcxx . . $ gtk_video_map(d7cf858254b37903).; |
| 406 | widget_class->unmapcxx . . $ _GtkWidgetClass#unmap. = gtk_video_unmapcxx . . $ gtk_video_unmap(d7cf858254b37903).; |
| 407 | widget_class->hidecxx . . $ _GtkWidgetClass#hide. = gtk_video_hidecxx . . $ gtk_video_hide(d7cf858254b37903).; |
| 408 | widget_class->rootcxx . . $ _GtkWidgetClass#root. = gtk_video_rootcxx . . $ gtk_video_root(d7cf858254b37903).; |
| 409 | widget_class->unrootcxx . . $ _GtkWidgetClass#unroot. = gtk_video_unrootcxx . . $ gtk_video_unroot(d7cf858254b37903).; |
| 410 | |
| 411 | gobject_class->disposecxx . . $ _GObjectClass#dispose. = gtk_video_disposecxx . . $ gtk_video_dispose(6087475fa43034d3).; |
| 412 | gobject_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_video_get_propertycxx . . $ gtk_video_get_property(cee2c52f22407c66).; |
| 413 | gobject_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_video_set_propertycxx . . $ gtk_video_set_property(d7c4bb29f36c0dc4).; |
| 414 | |
| 415 | /** |
| 416 | * GtkVideo:autoplay: |
| 417 | * |
| 418 | * If the video should automatically begin playing. |
| 419 | */ |
| 420 | propertiescxx . . $ properties.[PROP_AUTOPLAYcxx . . $ PROP_AUTOPLAY.] = |
| 421 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("autoplay", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 422 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 423 | G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 424 | |
| 425 | /** |
| 426 | * GtkVideo:file: |
| 427 | * |
| 428 | * The file played by this video if the video is playing a file. |
| 429 | */ |
| 430 | propertiescxx . . $ properties.[PROP_FILEcxx . . $ PROP_FILE.] = |
| 431 | g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("file", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 432 | G_TYPE_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:34:9`!, |
| 433 | G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 434 | |
| 435 | /** |
| 436 | * GtkVideo:loop: |
| 437 | * |
| 438 | * If new media files should be set to loop. |
| 439 | */ |
| 440 | propertiescxx . . $ properties.[PROP_LOOPcxx . . $ PROP_LOOP.] = |
| 441 | g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("loop", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 442 | FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 443 | G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 444 | |
| 445 | /** |
| 446 | * GtkVideo:media-stream: |
| 447 | * |
| 448 | * The media-stream played |
| 449 | */ |
| 450 | propertiescxx . . $ properties.[PROP_MEDIA_STREAMcxx . . $ PROP_MEDIA_STREAM.] = |
| 451 | g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("media-stream", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 452 | GTK_TYPE_MEDIA_STREAMcxx . . $ `gtk/gtkmediastream.h:30:9`!, |
| 453 | G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 454 | |
| 455 | /** |
| 456 | * GtkVideo:graphics-offload: |
| 457 | * |
| 458 | * Whether to enable graphics offload. |
| 459 | * |
| 460 | * Since: 4.14 |
| 461 | */ |
| 462 | propertiescxx . . $ properties.[PROP_GRAPHICS_OFFLOADcxx . . $ PROP_GRAPHICS_OFFLOAD.] = |
| 463 | g_param_spec_enumcxx . . $ g_param_spec_enum(bfeb217b5dc6c0ac). ("graphics-offload", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 464 | GTK_TYPE_GRAPHICS_OFFLOAD_ENABLEDcxx . . $ `build/gtk/gtktypebuiltins.h:270:9`!, |
| 465 | GTK_GRAPHICS_OFFLOAD_DISABLEDcxx . . $ GTK_GRAPHICS_OFFLOAD_DISABLED., |
| 466 | G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. | G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY. | G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!); |
| 467 | |
| 468 | g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (gobject_class, N_PROPScxx . . $ N_PROPS., propertiescxx . . $ properties.); |
| 469 | |
| 470 | gtk_widget_class_set_template_from_resourcecxx . . $ gtk_widget_class_set_template_from_resource(6333614c746ab65a). (widget_class, "/org/gtk/libgtk/ui/gtkvideo.ui"); |
| 471 | gtk_widget_class_bind_template_childcxx . . $ `gtk/gtkwidget.h:762:9`! (widget_class, GtkVideo, box); |
| 472 | gtk_widget_class_bind_template_childcxx . . $ `gtk/gtkwidget.h:762:9`! (widget_class, GtkVideo, video_picture); |
| 473 | gtk_widget_class_bind_template_childcxx . . $ `gtk/gtkwidget.h:762:9`! (widget_class, GtkVideo, overlay_icon); |
| 474 | gtk_widget_class_bind_template_childcxx . . $ `gtk/gtkwidget.h:762:9`! (widget_class, GtkVideo, controls); |
| 475 | gtk_widget_class_bind_template_childcxx . . $ `gtk/gtkwidget.h:762:9`! (widget_class, GtkVideo, controls_revealer); |
| 476 | gtk_widget_class_bind_template_childcxx . . $ `gtk/gtkwidget.h:762:9`! (widget_class, GtkVideo, graphics_offload); |
| 477 | gtk_widget_class_bind_template_callbackcxx . . $ `gtk/gtkwidget.h:743:9`! (widget_class, gtk_video_motion); |
| 478 | gtk_widget_class_bind_template_callbackcxx . . $ `gtk/gtkwidget.h:743:9`! (widget_class, gtk_video_pressed); |
| 479 | gtk_widget_class_bind_template_callbackcxx . . $ `gtk/gtkwidget.h:743:9`! (widget_class, overlay_clicked_cb); |
| 480 | |
| 481 | gtk_widget_class_set_layout_manager_typecxx . . $ gtk_widget_class_set_layout_manager_type(2a839cbf4b1b4191). (widget_class, GTK_TYPE_BIN_LAYOUTcxx . . $ `gtk/gtkbinlayout.h:23:9`!); |
| 482 | gtk_widget_class_set_css_namecxx . . $ gtk_widget_class_set_css_name(6333614c746ab65a). (widget_class, I_cxx . . $ `gdk/gdkprivate.h:35:9`!("video")); |
| 483 | } |
| 484 | |
| 485 | static void |
| 486 | gtk_video_initcxx . . $ gtk_video_init(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 487 | { |
| 488 | gtk_widget_init_templatecxx . . $ gtk_widget_init_template(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self)); |
| 489 | } |
| 490 | |
| 491 | /** |
| 492 | * gtk_video_new: |
| 493 | * |
| 494 | * Creates a new empty `GtkVideo`. |
| 495 | * |
| 496 | * Returns: a new `GtkVideo` |
| 497 | */ |
| 498 | GtkWidgetcxx . . $ GtkWidget# * |
| 499 | gtk_video_newcxx . . $ gtk_video_new(2369ce5e9f2c7dfd). (void) |
| 500 | { |
| 501 | return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_VIDEOcxx . . $ `gtk/gtkvideo.h:32:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 502 | } |
| 503 | |
| 504 | /** |
| 505 | * gtk_video_new_for_media_stream: |
| 506 | * @stream: (nullable): a `GtkMediaStream` |
| 507 | * |
| 508 | * Creates a `GtkVideo` to play back the given @stream. |
| 509 | * |
| 510 | * Returns: a new `GtkVideo` |
| 511 | */ |
| 512 | GtkWidgetcxx . . $ GtkWidget# * |
| 513 | gtk_video_new_for_media_streamcxx . . $ gtk_video_new_for_media_stream(1ab9f463d90da060). (GtkMediaStreamcxx . . $ GtkMediaStream# *stream) |
| 514 | { |
| 515 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (stream == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || GTK_IS_MEDIA_STREAM (stream), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 516 | |
| 517 | return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_VIDEOcxx . . $ `gtk/gtkvideo.h:32:9`!, |
| 518 | "media-stream", stream, |
| 519 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 520 | } |
| 521 | |
| 522 | /** |
| 523 | * gtk_video_new_for_file: |
| 524 | * @file: (nullable): a `GFile` |
| 525 | * |
| 526 | * Creates a `GtkVideo` to play back the given @file. |
| 527 | * |
| 528 | * Returns: a new `GtkVideo` |
| 529 | */ |
| 530 | GtkWidgetcxx . . $ GtkWidget# * |
| 531 | gtk_video_new_for_filecxx . . $ gtk_video_new_for_file(c889c96e2f4d8f5d). (GFilecxx . . $ GFile# *file) |
| 532 | { |
| 533 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (file == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || G_IS_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:36:9`! (file), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 534 | |
| 535 | return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_VIDEOcxx . . $ `gtk/gtkvideo.h:32:9`!, |
| 536 | "file", file, |
| 537 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 538 | } |
| 539 | |
| 540 | /** |
| 541 | * gtk_video_new_for_filename: |
| 542 | * @filename: (nullable) (type filename): filename to play back |
| 543 | * |
| 544 | * Creates a `GtkVideo` to play back the given @filename. |
| 545 | * |
| 546 | * This is a utility function that calls [[email protected]_for_file], |
| 547 | * See that function for details. |
| 548 | * |
| 549 | * Returns: a new `GtkVideo` |
| 550 | */ |
| 551 | GtkWidgetcxx . . $ GtkWidget# * |
| 552 | gtk_video_new_for_filenamecxx . . $ gtk_video_new_for_filename(6d90f3ec8782e10d). (const char *filename) |
| 553 | { |
| 554 | GtkWidgetcxx . . $ GtkWidget# *result; |
| 555 | GFilecxx . . $ GFile# *file; |
| 556 | |
| 557 | if (filename) |
| 558 | file = g_file_new_for_pathcxx . . $ g_file_new_for_path(ba1fd5950b7d7bd5). (filename); |
| 559 | else |
| 560 | file = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 561 | |
| 562 | result = gtk_video_new_for_filecxx . . $ gtk_video_new_for_file(c889c96e2f4d8f5d). (file); |
| 563 | |
| 564 | if (file) |
| 565 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (file); |
| 566 | |
| 567 | return result; |
| 568 | } |
| 569 | |
| 570 | /** |
| 571 | * gtk_video_new_for_resource: |
| 572 | * @resource_path: (nullable): resource path to play back |
| 573 | * |
| 574 | * Creates a `GtkVideo` to play back the resource at the |
| 575 | * given @resource_path. |
| 576 | * |
| 577 | * This is a utility function that calls [[email protected]_for_file]. |
| 578 | * |
| 579 | * Returns: a new `GtkVideo` |
| 580 | */ |
| 581 | GtkWidgetcxx . . $ GtkWidget# * |
| 582 | gtk_video_new_for_resourcecxx . . $ gtk_video_new_for_resource(6d90f3ec8782e10d). (const char *resource_path) |
| 583 | { |
| 584 | GtkWidgetcxx . . $ GtkWidget# *result; |
| 585 | GFilecxx . . $ GFile# *file; |
| 586 | |
| 587 | if (resource_path) |
| 588 | { |
| 589 | char *uri, *escaped; |
| 590 | |
| 591 | escaped = g_uri_escape_stringcxx . . $ g_uri_escape_string(2e2de56da327d927). (resource_path, |
| 592 | G_URI_RESERVED_CHARS_ALLOWED_IN_PATHcxx . . $ `<external>/10191889811899801514/guri.h:377:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 593 | uri = g_strconcatcxx . . $ g_strconcat(a849077ff1b8d812). ("resource://", escaped, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 594 | g_freecxx . . $ g_free(5d22bdacc48458e8). (escaped); |
| 595 | |
| 596 | file = g_file_new_for_uricxx . . $ g_file_new_for_uri(ba1fd5950b7d7bd5). (uri); |
| 597 | g_freecxx . . $ g_free(5d22bdacc48458e8). (uri); |
| 598 | } |
| 599 | else |
| 600 | { |
| 601 | file = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 602 | } |
| 603 | |
| 604 | result = gtk_video_new_for_filecxx . . $ gtk_video_new_for_file(c889c96e2f4d8f5d). (file); |
| 605 | |
| 606 | if (file) |
| 607 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (file); |
| 608 | |
| 609 | return result; |
| 610 | } |
| 611 | |
| 612 | /** |
| 613 | * gtk_video_get_media_stream: |
| 614 | * @self: a `GtkVideo` |
| 615 | * |
| 616 | * Gets the media stream managed by @self or %NULL if none. |
| 617 | * |
| 618 | * Returns: (nullable) (transfer none): The media stream managed by @self |
| 619 | */ |
| 620 | GtkMediaStreamcxx . . $ GtkMediaStream# * |
| 621 | gtk_video_get_media_streamcxx . . $ gtk_video_get_media_stream(81f22b50fdf40ee4). (GtkVideocxx . . $ GtkVideo# *self) |
| 622 | { |
| 623 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_VIDEO (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 624 | |
| 625 | return self->media_streamcxx . . $ _GtkVideo#media_stream.; |
| 626 | } |
| 627 | |
| 628 | static void |
| 629 | gtk_video_update_overlay_iconcxx . . $ gtk_video_update_overlay_icon(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 630 | { |
| 631 | const char *icon_name; |
| 632 | const GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 633 | |
| 634 | if (self->media_streamcxx . . $ _GtkVideo#media_stream. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) |
| 635 | icon_name = "media-eject-symbolic"; |
| 636 | else if ((error = gtk_media_stream_get_errorcxx . . $ gtk_media_stream_get_error(eee32a2269ab8121). (self->media_streamcxx . . $ _GtkVideo#media_stream.))) |
| 637 | icon_name = "dialog-error-symbolic"; |
| 638 | else if (gtk_media_stream_get_endedcxx . . $ gtk_media_stream_get_ended(85802d43861b59f2). (self->media_streamcxx . . $ _GtkVideo#media_stream.)) |
| 639 | icon_name = "media-playlist-repeat-symbolic"; |
| 640 | else |
| 641 | icon_name = "media-playback-start-symbolic"; |
| 642 | |
| 643 | gtk_image_set_from_icon_namecxx . . $ gtk_image_set_from_icon_name(2393c303d3370daf). (GTK_IMAGEcxx . . $ `gtk/gtkimage.h:39:9`! (self->overlay_icon), icon_name); |
| 644 | if (error) |
| 645 | gtk_widget_set_tooltip_textcxx . . $ gtk_widget_set_tooltip_text(3e0616a87a6c51e5). (self->overlay_iconcxx . . $ _GtkVideo#overlay_icon., error->messagecxx . . $ _GError#message.); |
| 646 | else |
| 647 | gtk_widget_set_tooltip_textcxx . . $ gtk_widget_set_tooltip_text(3e0616a87a6c51e5). (self->overlay_iconcxx . . $ _GtkVideo#overlay_icon., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 648 | } |
| 649 | |
| 650 | static void |
| 651 | gtk_video_update_endedcxx . . $ gtk_video_update_ended(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 652 | { |
| 653 | gtk_video_update_overlay_iconcxx . . $ gtk_video_update_overlay_icon(e5ce6d98d3d3a3f2). (self); |
| 654 | } |
| 655 | |
| 656 | static void |
| 657 | gtk_video_update_errorcxx . . $ gtk_video_update_error(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 658 | { |
| 659 | gtk_video_update_overlay_iconcxx . . $ gtk_video_update_overlay_icon(e5ce6d98d3d3a3f2). (self); |
| 660 | } |
| 661 | |
| 662 | static void |
| 663 | gtk_video_update_playingcxx . . $ gtk_video_update_playing(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 664 | { |
| 665 | gbooleancxx . . $ gboolean# playing = gtk_video_get_playingcxx . . $ gtk_video_get_playing(3499eadb4deb99fc). (self); |
| 666 | |
| 667 | gtk_widget_set_visiblecxx . . $ gtk_widget_set_visible(81f145f668a0074f). (self->overlay_iconcxx . . $ _GtkVideo#overlay_icon., !playing); |
| 668 | gtk_widget_set_cursorcxx . . $ gtk_widget_set_cursor(ccca0ca28f2292d8). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 669 | self->cursor_hiddencxx . . $ _GtkVideo#cursor_hidden. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!; |
| 670 | } |
| 671 | |
| 672 | static void |
| 673 | gtk_video_update_allcxx . . $ gtk_video_update_all(e5ce6d98d3d3a3f2). (GtkVideocxx . . $ GtkVideo# *self) |
| 674 | { |
| 675 | gtk_video_update_endedcxx . . $ gtk_video_update_ended(e5ce6d98d3d3a3f2). (self); |
| 676 | gtk_video_update_errorcxx . . $ gtk_video_update_error(e5ce6d98d3d3a3f2). (self); |
| 677 | gtk_video_update_playingcxx . . $ gtk_video_update_playing(e5ce6d98d3d3a3f2). (self); |
| 678 | } |
| 679 | |
| 680 | static void |
| 681 | gtk_video_notify_cbcxx . . $ gtk_video_notify_cb(17247de9186ad77d). (GtkMediaStreamcxx . . $ GtkMediaStream# *stream, |
| 682 | GParamSpeccxx . . $ GParamSpec# *pspec, |
| 683 | GtkVideocxx . . $ GtkVideo# *self) |
| 684 | { |
| 685 | if (g_str_equalcxx . . $ `<external>/7714589265505779806/ghash.h:175:9`! (pspec->name, "ended")) |
| 686 | gtk_video_update_endedcxx . . $ gtk_video_update_ended(e5ce6d98d3d3a3f2). (self); |
| 687 | if (g_str_equalcxx . . $ `<external>/7714589265505779806/ghash.h:175:9`! (pspec->name, "error")) |
| 688 | gtk_video_update_errorcxx . . $ gtk_video_update_error(e5ce6d98d3d3a3f2). (self); |
| 689 | if (g_str_equalcxx . . $ `<external>/7714589265505779806/ghash.h:175:9`! (pspec->name, "playing")) |
| 690 | gtk_video_update_playingcxx . . $ gtk_video_update_playing(e5ce6d98d3d3a3f2). (self); |
| 691 | if (g_str_equalcxx . . $ `<external>/7714589265505779806/ghash.h:175:9`! (pspec->name, "prepared")) |
| 692 | { |
| 693 | if (self->autoplaycxx . . $ _GtkVideo#autoplay. && |
| 694 | gtk_media_stream_is_preparedcxx . . $ gtk_media_stream_is_prepared(85802d43861b59f2). (stream) && |
| 695 | gtk_widget_get_mappedcxx . . $ gtk_widget_get_mapped(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))) |
| 696 | gtk_media_stream_playcxx . . $ gtk_media_stream_play(54e5f97b21b96fd6). (stream); |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | /** |
| 701 | * gtk_video_set_media_stream: |
| 702 | * @self: a `GtkVideo` |
| 703 | * @stream: (nullable): The media stream to play or %NULL to unset |
| 704 | * |
| 705 | * Sets the media stream to be played back. |
| 706 | * |
| 707 | * @self will take full control of managing the media stream. If you |
| 708 | * want to manage a media stream yourself, consider using a |
| 709 | * [[email protected]] for display. |
| 710 | * |
| 711 | * If you want to display a file, consider using [[email protected]_file] |
| 712 | * instead. |
| 713 | */ |
| 714 | void |
| 715 | gtk_video_set_media_streamcxx . . $ gtk_video_set_media_stream(e1aa8d45c780b9b4). (GtkVideocxx . . $ GtkVideo# *self, |
| 716 | GtkMediaStreamcxx . . $ GtkMediaStream# *stream) |
| 717 | { |
| 718 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 719 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (stream == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || GTK_IS_MEDIA_STREAM (stream)); |
| 720 | |
| 721 | if (self->media_streamcxx . . $ _GtkVideo#media_stream. == stream) |
| 722 | return; |
| 723 | |
| 724 | if (self->media_streamcxx . . $ _GtkVideo#media_stream.) |
| 725 | { |
| 726 | if (self->autoplaycxx . . $ _GtkVideo#autoplay.) |
| 727 | gtk_media_stream_pausecxx . . $ gtk_media_stream_pause(54e5f97b21b96fd6). (self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 728 | g_signal_handlers_disconnect_by_funccxx . . $ `<external>/15952772511652638895/gsignal.h:629:9`! (self->media_stream, |
| 729 | gtk_video_notify_cb, |
| 730 | self); |
| 731 | if (gtk_widget_get_realizedcxx . . $ gtk_widget_get_realized(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))) |
| 732 | { |
| 733 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 734 | |
| 735 | surface = gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))); |
| 736 | gtk_media_stream_unrealizecxx . . $ gtk_media_stream_unrealize(14ab850b56344d23). (self->media_streamcxx . . $ _GtkVideo#media_stream., surface); |
| 737 | } |
| 738 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (self->media_streamcxx . . $ _GtkVideo#media_stream.); |
| 739 | self->media_streamcxx . . $ _GtkVideo#media_stream. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 740 | } |
| 741 | |
| 742 | if (stream) |
| 743 | { |
| 744 | self->media_streamcxx . . $ _GtkVideo#media_stream. = g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`! (stream); |
| 745 | gtk_media_stream_set_loopcxx . . $ gtk_media_stream_set_loop(5df63d5845b9d046). (stream, self->loopcxx . . $ _GtkVideo#loop.); |
| 746 | if (gtk_widget_get_realizedcxx . . $ gtk_widget_get_realized(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))) |
| 747 | { |
| 748 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 749 | |
| 750 | surface = gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))); |
| 751 | gtk_media_stream_realizecxx . . $ gtk_media_stream_realize(14ab850b56344d23). (stream, surface); |
| 752 | } |
| 753 | g_signal_connectcxx . . $ `<external>/15952772511652638895/gsignal.h:548:9`! (self->media_stream, |
| 754 | "notify", |
| 755 | G_CALLBACKcxx . . $ `<external>/16473872192229286895/gclosure.h:73:9`! (gtk_video_notify_cb), |
| 756 | self); |
| 757 | if (self->autoplaycxx . . $ _GtkVideo#autoplay. && |
| 758 | gtk_media_stream_is_preparedcxx . . $ gtk_media_stream_is_prepared(85802d43861b59f2). (stream) && |
| 759 | gtk_widget_get_mappedcxx . . $ gtk_widget_get_mapped(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))) |
| 760 | gtk_media_stream_playcxx . . $ gtk_media_stream_play(54e5f97b21b96fd6). (stream); |
| 761 | } |
| 762 | |
| 763 | gtk_media_controls_set_media_streamcxx . . $ gtk_media_controls_set_media_stream(5be21a6b34db7b0c). (GTK_MEDIA_CONTROLScxx . . $ GTK_MEDIA_CONTROLS(42d0b9b50c21e35c). (self->controlscxx . . $ _GtkVideo#controls.), stream); |
| 764 | gtk_picture_set_paintablecxx . . $ gtk_picture_set_paintable(d8d4d0fafdc68be9). (GTK_PICTUREcxx . . $ GTK_PICTURE(d0a1ffb7aecf6658). (self->video_picturecxx . . $ _GtkVideo#video_picture.), GDK_PAINTABLEcxx . . $ GDK_PAINTABLE(2d62fee13419e51d). (stream)); |
| 765 | |
| 766 | gtk_video_update_allcxx . . $ gtk_video_update_all(e5ce6d98d3d3a3f2). (self); |
| 767 | |
| 768 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_MEDIA_STREAMcxx . . $ PROP_MEDIA_STREAM.]); |
| 769 | } |
| 770 | |
| 771 | /** |
| 772 | * gtk_video_get_file: |
| 773 | * @self: a `GtkVideo` |
| 774 | * |
| 775 | * Gets the file played by @self or %NULL if not playing back |
| 776 | * a file. |
| 777 | * |
| 778 | * Returns: (nullable) (transfer none): The file played by @self |
| 779 | */ |
| 780 | GFilecxx . . $ GFile# * |
| 781 | gtk_video_get_filecxx . . $ gtk_video_get_file(930090bce720625f). (GtkVideocxx . . $ GtkVideo# *self) |
| 782 | { |
| 783 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_VIDEO (self), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 784 | |
| 785 | return self->filecxx . . $ _GtkVideo#file.; |
| 786 | } |
| 787 | |
| 788 | /** |
| 789 | * gtk_video_set_file: |
| 790 | * @self: a `GtkVideo` |
| 791 | * @file: (nullable): the file to play |
| 792 | * |
| 793 | * Makes @self play the given @file. |
| 794 | */ |
| 795 | void |
| 796 | gtk_video_set_filecxx . . $ gtk_video_set_file(bb4ef7266e6d12be). (GtkVideocxx . . $ GtkVideo# *self, |
| 797 | GFilecxx . . $ GFile# *file) |
| 798 | { |
| 799 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 800 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (file == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || G_IS_FILEcxx . . $ `<external>/13962853800498659056/gfile.h:36:9`! (file)); |
| 801 | |
| 802 | if (!g_set_objectcxx . . $ `<external>/1341695927569185362/gobject.h:762:9`! (&self->file, file)) |
| 803 | return; |
| 804 | |
| 805 | g_object_freeze_notifycxx . . $ g_object_freeze_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 806 | |
| 807 | if (file) |
| 808 | { |
| 809 | GtkMediaStreamcxx . . $ GtkMediaStream# *stream; |
| 810 | |
| 811 | stream = gtk_media_file_newcxx . . $ gtk_media_file_new(f0a0774daf2ccfb2). (); |
| 812 | |
| 813 | if (gtk_widget_get_realizedcxx . . $ gtk_widget_get_realized(9247ef2dc26c5426). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))) |
| 814 | { |
| 815 | GdkSurfacecxx . . $ GdkSurface# *surface; |
| 816 | |
| 817 | surface = gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (self))); |
| 818 | gtk_media_stream_realizecxx . . $ gtk_media_stream_realize(14ab850b56344d23). (stream, surface); |
| 819 | gtk_media_file_set_filecxx . . $ gtk_media_file_set_file(1f2b7d72eeb990c8). (GTK_MEDIA_FILEcxx . . $ GTK_MEDIA_FILE(1db77882be31162d). (stream), file); |
| 820 | } |
| 821 | gtk_video_set_media_streamcxx . . $ gtk_video_set_media_stream(e1aa8d45c780b9b4). (self, stream); |
| 822 | |
| 823 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (stream); |
| 824 | } |
| 825 | else |
| 826 | { |
| 827 | gtk_video_set_media_streamcxx . . $ gtk_video_set_media_stream(e1aa8d45c780b9b4). (self, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 828 | } |
| 829 | |
| 830 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_FILEcxx . . $ PROP_FILE.]); |
| 831 | |
| 832 | g_object_thaw_notifycxx . . $ g_object_thaw_notify(6087475fa43034d3). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self)); |
| 833 | } |
| 834 | |
| 835 | /** |
| 836 | * gtk_video_set_filename: |
| 837 | * @self: a `GtkVideo` |
| 838 | * @filename: (type filename) (nullable): the filename to play |
| 839 | * |
| 840 | * Makes @self play the given @filename. |
| 841 | * |
| 842 | * This is a utility function that calls gtk_video_set_file(), |
| 843 | */ |
| 844 | void |
| 845 | gtk_video_set_filenamecxx . . $ gtk_video_set_filename(105b52d1c3fd92d4). (GtkVideocxx . . $ GtkVideo# *self, |
| 846 | const char *filename) |
| 847 | { |
| 848 | GFilecxx . . $ GFile# *file; |
| 849 | |
| 850 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 851 | |
| 852 | if (filename) |
| 853 | file = g_file_new_for_pathcxx . . $ g_file_new_for_path(ba1fd5950b7d7bd5). (filename); |
| 854 | else |
| 855 | file = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 856 | |
| 857 | gtk_video_set_filecxx . . $ gtk_video_set_file(bb4ef7266e6d12be). (self, file); |
| 858 | |
| 859 | if (file) |
| 860 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (file); |
| 861 | } |
| 862 | |
| 863 | /** |
| 864 | * gtk_video_set_resource: |
| 865 | * @self: a `GtkVideo` |
| 866 | * @resource_path: (nullable): the resource to set |
| 867 | * |
| 868 | * Makes @self play the resource at the given @resource_path. |
| 869 | * |
| 870 | * This is a utility function that calls [[email protected]_file]. |
| 871 | */ |
| 872 | void |
| 873 | gtk_video_set_resourcecxx . . $ gtk_video_set_resource(105b52d1c3fd92d4). (GtkVideocxx . . $ GtkVideo# *self, |
| 874 | const char *resource_path) |
| 875 | { |
| 876 | GFilecxx . . $ GFile# *file; |
| 877 | |
| 878 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 879 | |
| 880 | if (resource_path) |
| 881 | { |
| 882 | char *uri, *escaped; |
| 883 | |
| 884 | escaped = g_uri_escape_stringcxx . . $ g_uri_escape_string(2e2de56da327d927). (resource_path, |
| 885 | G_URI_RESERVED_CHARS_ALLOWED_IN_PATHcxx . . $ `<external>/10191889811899801514/guri.h:377:9`!, FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 886 | uri = g_strconcatcxx . . $ g_strconcat(a849077ff1b8d812). ("resource://", escaped, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 887 | g_freecxx . . $ g_free(5d22bdacc48458e8). (escaped); |
| 888 | |
| 889 | file = g_file_new_for_uricxx . . $ g_file_new_for_uri(ba1fd5950b7d7bd5). (uri); |
| 890 | g_freecxx . . $ g_free(5d22bdacc48458e8). (uri); |
| 891 | } |
| 892 | else |
| 893 | { |
| 894 | file = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 895 | } |
| 896 | |
| 897 | gtk_video_set_filecxx . . $ gtk_video_set_file(bb4ef7266e6d12be). (self, file); |
| 898 | |
| 899 | if (file) |
| 900 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (file); |
| 901 | } |
| 902 | |
| 903 | /** |
| 904 | * gtk_video_get_autoplay: |
| 905 | * @self: a `GtkVideo` |
| 906 | * |
| 907 | * Returns %TRUE if videos have been set to loop. |
| 908 | * |
| 909 | * Returns: %TRUE if streams should autoplay |
| 910 | */ |
| 911 | gbooleancxx . . $ gboolean# |
| 912 | gtk_video_get_autoplaycxx . . $ gtk_video_get_autoplay(3499eadb4deb99fc). (GtkVideocxx . . $ GtkVideo# *self) |
| 913 | { |
| 914 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_VIDEO (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 915 | |
| 916 | return self->autoplaycxx . . $ _GtkVideo#autoplay.; |
| 917 | } |
| 918 | |
| 919 | /** |
| 920 | * gtk_video_set_autoplay: |
| 921 | * @self: a `GtkVideo` |
| 922 | * @autoplay: whether media streams should autoplay |
| 923 | * |
| 924 | * Sets whether @self automatically starts playback when it |
| 925 | * becomes visible or when a new file gets loaded. |
| 926 | */ |
| 927 | void |
| 928 | gtk_video_set_autoplaycxx . . $ gtk_video_set_autoplay(c47bcb96cf3af04f). (GtkVideocxx . . $ GtkVideo# *self, |
| 929 | gbooleancxx . . $ gboolean# autoplay) |
| 930 | { |
| 931 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 932 | |
| 933 | if (self->autoplaycxx . . $ _GtkVideo#autoplay. == autoplay) |
| 934 | return; |
| 935 | |
| 936 | self->autoplaycxx . . $ _GtkVideo#autoplay. = autoplay; |
| 937 | |
| 938 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_AUTOPLAYcxx . . $ PROP_AUTOPLAY.]); |
| 939 | } |
| 940 | |
| 941 | /** |
| 942 | * gtk_video_get_loop: |
| 943 | * @self: a `GtkVideo` |
| 944 | * |
| 945 | * Returns %TRUE if videos have been set to loop. |
| 946 | * |
| 947 | * Returns: %TRUE if streams should loop |
| 948 | */ |
| 949 | gbooleancxx . . $ gboolean# |
| 950 | gtk_video_get_loopcxx . . $ gtk_video_get_loop(3499eadb4deb99fc). (GtkVideocxx . . $ GtkVideo# *self) |
| 951 | { |
| 952 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_VIDEO (self), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!); |
| 953 | |
| 954 | return self->loopcxx . . $ _GtkVideo#loop.; |
| 955 | } |
| 956 | |
| 957 | /** |
| 958 | * gtk_video_set_loop: |
| 959 | * @self: a `GtkVideo` |
| 960 | * @loop: whether media streams should loop |
| 961 | * |
| 962 | * Sets whether new files loaded by @self should be set to loop. |
| 963 | */ |
| 964 | void |
| 965 | gtk_video_set_loopcxx . . $ gtk_video_set_loop(c47bcb96cf3af04f). (GtkVideocxx . . $ GtkVideo# *self, |
| 966 | gbooleancxx . . $ gboolean# loop) |
| 967 | { |
| 968 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 969 | |
| 970 | if (self->loopcxx . . $ _GtkVideo#loop. == loop) |
| 971 | return; |
| 972 | |
| 973 | self->loopcxx . . $ _GtkVideo#loop. = loop; |
| 974 | |
| 975 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_LOOPcxx . . $ PROP_LOOP.]); |
| 976 | } |
| 977 | |
| 978 | /** |
| 979 | * gtk_video_get_graphics_offload: |
| 980 | * @self: a `GtkVideo` |
| 981 | * |
| 982 | * Returns whether graphics offload is enabled. |
| 983 | * |
| 984 | * See [[email protected]] for more information on graphics offload. |
| 985 | * |
| 986 | * Returns: the graphics offload status |
| 987 | * |
| 988 | * Since: 4.14 |
| 989 | */ |
| 990 | GtkGraphicsOffloadEnabledcxx . . $ GtkGraphicsOffloadEnabled# |
| 991 | gtk_video_get_graphics_offloadcxx . . $ gtk_video_get_graphics_offload(576cf71276b2b213). (GtkVideocxx . . $ GtkVideo# *self) |
| 992 | { |
| 993 | g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_VIDEO (self), GTK_GRAPHICS_OFFLOAD_DISABLED); |
| 994 | |
| 995 | return gtk_graphics_offload_get_enabledcxx . . $ gtk_graphics_offload_get_enabled(d18e9f22eac9bda7). (GTK_GRAPHICS_OFFLOADcxx . . $ GTK_GRAPHICS_OFFLOAD(997389679c29b42e). (self->graphics_offloadcxx . . $ _GtkVideo#graphics_offload.)); |
| 996 | } |
| 997 | |
| 998 | /** |
| 999 | * gtk_video_set_graphics_offload: |
| 1000 | * @self: a `GtkVideo` |
| 1001 | * @enabled: the new graphics offload status |
| 1002 | * |
| 1003 | * Sets whether to enable graphics offload. |
| 1004 | * |
| 1005 | * See [[email protected]] for more information on graphics offload. |
| 1006 | * |
| 1007 | * Since: 4.14 |
| 1008 | */ |
| 1009 | void |
| 1010 | gtk_video_set_graphics_offloadcxx . . $ gtk_video_set_graphics_offload(4319f640569dd833). (GtkVideocxx . . $ GtkVideo# *self, |
| 1011 | GtkGraphicsOffloadEnabledcxx . . $ GtkGraphicsOffloadEnabled# enabled) |
| 1012 | { |
| 1013 | g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_VIDEO (self)); |
| 1014 | |
| 1015 | if (gtk_graphics_offload_get_enabledcxx . . $ gtk_graphics_offload_get_enabled(d18e9f22eac9bda7). (GTK_GRAPHICS_OFFLOADcxx . . $ GTK_GRAPHICS_OFFLOAD(997389679c29b42e). (self->graphics_offloadcxx . . $ _GtkVideo#graphics_offload.)) == enabled) |
| 1016 | return; |
| 1017 | |
| 1018 | gtk_graphics_offload_set_enabledcxx . . $ gtk_graphics_offload_set_enabled(eff682f21dd4970b). (GTK_GRAPHICS_OFFLOADcxx . . $ GTK_GRAPHICS_OFFLOAD(997389679c29b42e). (self->graphics_offloadcxx . . $ _GtkVideo#graphics_offload.), enabled); |
| 1019 | |
| 1020 | g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (self), propertiescxx . . $ properties.[PROP_GRAPHICS_OFFLOADcxx . . $ PROP_GRAPHICS_OFFLOAD.]); |
| 1021 | } |