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_RENDER_NODE_H__
|
|
|
|
#define __GSK_RENDER_NODE_H__
|
|
|
|
|
|
|
|
#if !defined (__GSK_H_INSIDE__) && !defined (GSK_COMPILATION)
|
|
|
|
#error "Only <gsk/gsk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gsk/gsktypes.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GSK_TYPE_RENDER_NODE (gsk_render_node_get_type ())
|
|
|
|
|
2016-12-10 14:33:16 +00:00
|
|
|
#define GSK_IS_RENDER_NODE(obj) ((obj) != NULL)
|
2016-03-17 13:48:19 +00:00
|
|
|
|
|
|
|
typedef struct _GskRenderNode GskRenderNode;
|
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-03-17 13:48:19 +00:00
|
|
|
GType gsk_render_node_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-06-29 18:05:33 +00:00
|
|
|
GskRenderNode * gsk_render_node_ref (GskRenderNode *node);
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-06-29 18:05:33 +00:00
|
|
|
void gsk_render_node_unref (GskRenderNode *node);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2016-12-10 20:42:01 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNodeType gsk_render_node_get_node_type (GskRenderNode *node);
|
|
|
|
|
2016-12-13 02:35:56 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_color_node_new (const GdkRGBA *rgba,
|
|
|
|
const graphene_rect_t *bounds);
|
|
|
|
|
2016-12-10 21:52:22 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_texture_node_new (GskTexture *texture,
|
|
|
|
const graphene_rect_t *bounds);
|
|
|
|
|
2016-12-11 00:23:02 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_cairo_node_new (const graphene_rect_t *bounds);
|
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
cairo_t * gsk_cairo_node_get_draw_context (GskRenderNode *node,
|
|
|
|
GskRenderer *renderer);
|
|
|
|
|
2016-12-11 03:14:04 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-12-13 01:33:15 +00:00
|
|
|
GskRenderNode * gsk_container_node_new (GskRenderNode **children,
|
|
|
|
guint n_children);
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-12-13 01:33:15 +00:00
|
|
|
guint gsk_container_node_get_n_children (GskRenderNode *node);
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-12-13 01:33:15 +00:00
|
|
|
GskRenderNode * gsk_container_node_get_child (GskRenderNode *node,
|
|
|
|
guint idx);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-12-12 23:11:06 +00:00
|
|
|
GskRenderNode * gsk_transform_node_new (GskRenderNode *child,
|
2016-08-04 14:20:06 +00:00
|
|
|
const graphene_matrix_t *transform);
|
2016-12-12 23:11:06 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_transform_node_get_child (GskRenderNode *node);
|
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-12-13 04:49:57 +00:00
|
|
|
GskRenderNode * gsk_opacity_node_new (GskRenderNode *child,
|
|
|
|
double opacity);
|
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_opacity_node_get_child (GskRenderNode *node);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2016-12-13 08:37:51 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_clip_node_new (GskRenderNode *child,
|
|
|
|
const graphene_rect_t *clip);
|
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
GskRenderNode * gsk_clip_node_get_child (GskRenderNode *node);
|
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-07-01 11:12:30 +00:00
|
|
|
void gsk_render_node_set_blend_mode (GskRenderNode *node,
|
|
|
|
GskBlendMode blend_mode);
|
2016-12-10 21:52:22 +00:00
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-08-13 07:34:22 +00:00
|
|
|
void gsk_render_node_set_scaling_filter (GskRenderNode *node,
|
|
|
|
GskScalingFilter min_filter,
|
|
|
|
GskScalingFilter mag_filter);
|
|
|
|
|
2016-10-18 10:37:10 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
2016-03-17 13:48:19 +00:00
|
|
|
void gsk_render_node_set_name (GskRenderNode *node,
|
|
|
|
const char *name);
|
2016-10-29 16:08:11 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
const char * gsk_render_node_get_name (GskRenderNode *node);
|
2016-03-17 13:48:19 +00:00
|
|
|
|
2016-12-13 02:05:15 +00:00
|
|
|
GDK_AVAILABLE_IN_3_90
|
|
|
|
void gsk_render_node_draw (GskRenderNode *node,
|
|
|
|
cairo_t *cr);
|
2016-03-17 13:48:19 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_RENDER_NODE_H__ */
|