gskrenderer.h 3.22 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
/* 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__

#if !defined (__GSK_H_INSIDE__) && !defined (GSK_COMPILATION)
#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))

typedef struct _GskRendererClass        GskRendererClass;

38
GDK_AVAILABLE_IN_ALL
39 40
GType gsk_renderer_get_type (void) G_GNUC_CONST;

41
GDK_AVAILABLE_IN_ALL
42
GskRenderer *           gsk_renderer_new_for_window             (GdkWindow               *window);
43

44
GDK_AVAILABLE_IN_ALL
45
GdkWindow *             gsk_renderer_get_window                 (GskRenderer             *renderer);
46

47
GDK_AVAILABLE_IN_ALL
48 49
GdkDisplay *            gsk_renderer_get_display                (GskRenderer             *renderer);

50
GDK_AVAILABLE_IN_ALL
51
gboolean                gsk_renderer_realize                    (GskRenderer             *renderer,
52 53
                                                                 GdkWindow               *window,
                                                                 GError                 **error);
54
GDK_AVAILABLE_IN_ALL
55
void                    gsk_renderer_unrealize                  (GskRenderer             *renderer);
56

57
GDK_AVAILABLE_IN_ALL
Benjamin Otte's avatar
Benjamin Otte committed
58
GdkTexture *            gsk_renderer_render_texture             (GskRenderer             *renderer,
59 60 61
                                                                 GskRenderNode           *root,
                                                                 const graphene_rect_t   *viewport);

62
GDK_AVAILABLE_IN_ALL
63 64
GdkDrawingContext *     gsk_renderer_begin_draw_frame           (GskRenderer             *renderer,
                                                                 const cairo_region_t    *region);
65
GDK_AVAILABLE_IN_ALL
66 67 68
void                    gsk_renderer_render                     (GskRenderer             *renderer,
                                                                 GskRenderNode           *root,
                                                                 GdkDrawingContext       *context);
69
GDK_AVAILABLE_IN_ALL
70 71
void                    gsk_renderer_end_draw_frame             (GskRenderer             *renderer,
                                                                 GdkDrawingContext       *context);
72 73 74 75

G_END_DECLS

#endif /* __GSK_RENDERER_H__ */