2014-08-10 15:26:14 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
|
|
/*
|
|
|
|
* MetaBackgroundImageCache:
|
|
|
|
*
|
|
|
|
* Simple cache for background textures loaded from files
|
|
|
|
*
|
|
|
|
* Copyright 2014 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __META_BACKGROUND_IMAGE_H__
|
|
|
|
#define __META_BACKGROUND_IMAGE_H__
|
|
|
|
|
2018-07-10 08:36:24 +00:00
|
|
|
#include <gio/gio.h>
|
2014-08-10 15:26:14 +00:00
|
|
|
#include <glib-object.h>
|
2018-07-10 08:36:24 +00:00
|
|
|
|
|
|
|
#include "cogl/cogl.h"
|
|
|
|
#include "meta/display.h"
|
2014-08-10 15:26:14 +00:00
|
|
|
|
2018-10-31 10:47:17 +00:00
|
|
|
#define META_TYPE_BACKGROUND_IMAGE (meta_background_image_get_type ())
|
2019-01-23 02:25:35 +00:00
|
|
|
|
|
|
|
META_EXPORT
|
2018-10-31 10:47:17 +00:00
|
|
|
G_DECLARE_FINAL_TYPE (MetaBackgroundImage,
|
|
|
|
meta_background_image,
|
|
|
|
META, BACKGROUND_IMAGE,
|
|
|
|
GObject)
|
2014-08-10 15:26:14 +00:00
|
|
|
|
2019-01-23 02:25:35 +00:00
|
|
|
META_EXPORT
|
2014-08-10 15:26:14 +00:00
|
|
|
gboolean meta_background_image_is_loaded (MetaBackgroundImage *image);
|
2019-01-23 02:25:35 +00:00
|
|
|
|
|
|
|
META_EXPORT
|
2014-08-10 15:26:14 +00:00
|
|
|
gboolean meta_background_image_get_success (MetaBackgroundImage *image);
|
2019-01-23 02:25:35 +00:00
|
|
|
|
|
|
|
META_EXPORT
|
2014-08-10 15:26:14 +00:00
|
|
|
CoglTexture *meta_background_image_get_texture (MetaBackgroundImage *image);
|
|
|
|
|
|
|
|
|
2018-10-31 10:47:17 +00:00
|
|
|
#define META_TYPE_BACKGROUND_IMAGE_CACHE (meta_background_image_cache_get_type ())
|
2019-01-23 02:25:35 +00:00
|
|
|
|
|
|
|
META_EXPORT
|
2018-10-31 10:47:17 +00:00
|
|
|
G_DECLARE_FINAL_TYPE (MetaBackgroundImageCache,
|
|
|
|
meta_background_image_cache,
|
|
|
|
META, BACKGROUND_IMAGE_CACHE,
|
|
|
|
GObject)
|
2014-08-10 15:26:14 +00:00
|
|
|
|
2019-01-23 02:25:35 +00:00
|
|
|
META_EXPORT
|
2014-08-10 15:26:14 +00:00
|
|
|
MetaBackgroundImageCache *meta_background_image_cache_get_default (void);
|
|
|
|
|
2019-01-23 02:25:35 +00:00
|
|
|
META_EXPORT
|
2014-08-10 15:26:14 +00:00
|
|
|
MetaBackgroundImage *meta_background_image_cache_load (MetaBackgroundImageCache *cache,
|
2014-09-19 01:22:39 +00:00
|
|
|
GFile *file);
|
2019-01-23 02:25:35 +00:00
|
|
|
|
|
|
|
META_EXPORT
|
2014-08-10 15:26:14 +00:00
|
|
|
void meta_background_image_cache_purge (MetaBackgroundImageCache *cache,
|
2014-09-19 01:22:39 +00:00
|
|
|
GFile *file);
|
2014-08-10 15:26:14 +00:00
|
|
|
|
|
|
|
#endif /* __META_BACKGROUND_IMAGE_H__ */
|