// // Copyright (C) 2021 Bilal Elmoussaoui // Copyright (C) 2021 Jordan Petridis // Copyright (C) 2021 Sebastian Dröge // // This Source Code Form is subject to the terms of the Mozilla Public License, v2.0. // If a copy of the MPL was not distributed with this file, You can obtain one at // . // // SPDX-License-Identifier: MPL-2.0 use crate::sink::frame::Frame; use gtk::subclass::prelude::*; use gtk::{gdk, glib}; mod imp; glib::wrapper! { pub struct Paintable(ObjectSubclass) @implements gdk::Paintable; } impl Paintable { pub fn new(context: Option) -> Self { glib::Object::builder() .property("gl-context", context) .build() } } impl Paintable { pub(crate) fn handle_frame_changed(&self, frame: Option) { self.imp().handle_frame_changed(frame); } }