1 /* 2 * Copyright (C) 2019 Red Hat Inc. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef CLUTTER_PAINT_CONTEXT_H 19 #define CLUTTER_PAINT_CONTEXT_H 20 21 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION) 22 #error "Only <clutter/clutter.h> can be included directly." 23 #endif 24 25 #include <glib-object.h> 26 27 #include "clutter-macros.h" 28 #include "clutter-stage-view.h" 29 30 typedef struct _ClutterPaintContext ClutterPaintContext; 31 32 typedef enum _ClutterPaintFlag 33 { 34 CLUTTER_PAINT_FLAG_NONE = 0, 35 CLUTTER_PAINT_FLAG_NO_CURSORS = 1 << 0, 36 CLUTTER_PAINT_FLAG_FORCE_CURSORS = 1 << 1, 37 CLUTTER_PAINT_FLAG_CLEAR = 1 << 2, 38 } ClutterPaintFlag; 39 40 #define CLUTTER_TYPE_PAINT_CONTEXT (clutter_paint_context_get_type ()) 41 42 CLUTTER_EXPORT 43 GType clutter_paint_context_get_type (void); 44 45 CLUTTER_EXPORT 46 ClutterPaintContext * clutter_paint_context_new_for_framebuffer (CoglFramebuffer *framebuffer, 47 const cairo_region_t *redraw_clip, 48 ClutterPaintFlag paint_flags); 49 50 CLUTTER_EXPORT 51 ClutterPaintContext * clutter_paint_context_ref (ClutterPaintContext *paint_context); 52 53 CLUTTER_EXPORT 54 void clutter_paint_context_unref (ClutterPaintContext *paint_context); 55 56 CLUTTER_EXPORT 57 void clutter_paint_context_destroy (ClutterPaintContext *paint_context); 58 59 CLUTTER_EXPORT 60 CoglFramebuffer * clutter_paint_context_get_framebuffer (ClutterPaintContext *paint_context); 61 62 CLUTTER_EXPORT 63 ClutterStageView * clutter_paint_context_get_stage_view (ClutterPaintContext *paint_context); 64 65 CLUTTER_EXPORT 66 void clutter_paint_context_push_framebuffer (ClutterPaintContext *paint_context, 67 CoglFramebuffer *framebuffer); 68 69 CLUTTER_EXPORT 70 void clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context); 71 72 CLUTTER_EXPORT 73 const cairo_region_t * clutter_paint_context_get_redraw_clip (ClutterPaintContext *paint_context); 74 75 CLUTTER_EXPORT 76 ClutterPaintFlag clutter_paint_context_get_paint_flags (ClutterPaintContext *paint_context); 77 78 #endif /* CLUTTER_PAINT_CONTEXT_H */ 79