gtk2/gtk/gtkloaderprivate.h
Matthias Clasen 4a89cfe2c9 Add delayed loading for textures
Add a private GdkPaintable implementation that
loads a texture in a thread, and does not show
anything until the texture is loaded. This avoid
blocking on image loading in the main thread.
2021-09-18 17:35:00 -04:00

36 lines
1.0 KiB
C

/*
* Copyright © 2021 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Matthias Clasen <mclasen@redhat.com>
*/
#ifndef __GTK_LOADER_H__
#define __GTK_LOADER_H__
#include <gdk/gdk.h>
G_BEGIN_DECLS
#define GTK_TYPE_LOADER (gtk_loader_get_type ())
G_DECLARE_FINAL_TYPE (GtkLoader, gtk_loader, GTK, LOADER, GObject)
GdkPaintable * gtk_loader_new (GBytes *bytes);
G_END_DECLS
#endif /* __GTK_SCALER_H__ */