2016-03-17 13:48:19 +00:00
|
|
|
/* GSK - The GTK Scene Kit
|
|
|
|
*
|
|
|
|
* Copyright 2016 Endless
|
|
|
|
*
|
|
|
|
* 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 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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GSK_RENDERER_H__
|
|
|
|
#define __GSK_RENDERER_H__
|
|
|
|
|
2019-11-27 13:33:43 +00:00
|
|
|
#if !defined (__GSK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2016-03-17 13:48:19 +00:00
|
|
|
#error "Only <gsk/gsk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gsk/gsktypes.h>
|
|
|
|
#include <gsk/gskrendernode.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GSK_TYPE_RENDERER (gsk_renderer_get_type ())
|
|
|
|
|
|
|
|
#define GSK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSK_TYPE_RENDERER, GskRenderer))
|
|
|
|
#define GSK_IS_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSK_TYPE_RENDERER))
|
|
|
|
|
2020-12-01 14:17:59 +00:00
|
|
|
/**
|
|
|
|
* GskRenderer:
|
|
|
|
*
|
|
|
|
* Base type for the object managing the rendering pipeline
|
|
|
|
* for a #GdkSurface.
|
|
|
|
*/
|
2016-03-17 13:48:19 +00:00
|
|
|
typedef struct _GskRendererClass GskRendererClass;
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2016-03-17 13:48:19 +00:00
|
|
|
GType gsk_renderer_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2019-03-09 12:36:14 +00:00
|
|
|
GskRenderer * gsk_renderer_new_for_surface (GdkSurface *surface);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2019-03-09 12:36:14 +00:00
|
|
|
GdkSurface * gsk_renderer_get_surface (GskRenderer *renderer);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2016-11-29 02:36:33 +00:00
|
|
|
gboolean gsk_renderer_realize (GskRenderer *renderer,
|
2018-03-21 10:49:14 +00:00
|
|
|
GdkSurface *surface,
|
2016-11-29 03:51:07 +00:00
|
|
|
GError **error);
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2016-03-17 13:48:19 +00:00
|
|
|
void gsk_renderer_unrealize (GskRenderer *renderer);
|
2019-03-09 12:59:03 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
gboolean gsk_renderer_is_realized (GskRenderer *renderer);
|
2016-07-27 15:23:44 +00:00
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2017-11-02 20:39:00 +00:00
|
|
|
GdkTexture * gsk_renderer_render_texture (GskRenderer *renderer,
|
2016-12-21 19:23:46 +00:00
|
|
|
GskRenderNode *root,
|
|
|
|
const graphene_rect_t *viewport);
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2016-06-22 16:30:36 +00:00
|
|
|
void gsk_renderer_render (GskRenderer *renderer,
|
|
|
|
GskRenderNode *root,
|
2018-03-27 23:29:39 +00:00
|
|
|
const cairo_region_t *region);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_RENDERER_H__ */
|