1 /* 2 * Cogl 3 * 4 * A Low Level GPU Graphics and Utilities API 5 * 6 * Copyright (C) 2011,2013 Intel Corporation. 7 * 8 * Permission is hereby granted, free of charge, to any person 9 * obtaining a copy of this software and associated documentation 10 * files (the "Software"), to deal in the Software without 11 * restriction, including without limitation the rights to use, copy, 12 * modify, merge, publish, distribute, sublicense, and/or sell copies 13 * of the Software, and to permit persons to whom the Software is 14 * furnished to do so, subject to the following conditions: 15 * 16 * The above copyright notice and this permission notice shall be 17 * included in all copies or substantial portions of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 23 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 24 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 * SOFTWARE. 27 * 28 * 29 */ 30 31 #ifndef __COGL_ONSCREEN_PRIVATE_H 32 #define __COGL_ONSCREEN_PRIVATE_H 33 34 #include "cogl-onscreen.h" 35 #include "cogl-framebuffer-private.h" 36 #include "cogl-closure-list-private.h" 37 #include "cogl-list.h" 38 39 #include <glib.h> 40 41 typedef struct _CoglOnscreenEvent 42 { 43 CoglList link; 44 45 CoglOnscreen *onscreen; 46 CoglFrameInfo *info; 47 CoglFrameEvent type; 48 } CoglOnscreenEvent; 49 50 typedef struct _CoglOnscreenQueuedDirty 51 { 52 CoglList link; 53 54 CoglOnscreen *onscreen; 55 CoglOnscreenDirtyInfo info; 56 } CoglOnscreenQueuedDirty; 57 58 COGL_EXPORT void 59 _cogl_framebuffer_winsys_update_size (CoglFramebuffer *framebuffer, 60 int width, int height); 61 62 void 63 _cogl_onscreen_queue_event (CoglOnscreen *onscreen, 64 CoglFrameEvent type, 65 CoglFrameInfo *info); 66 67 COGL_EXPORT void 68 _cogl_onscreen_notify_frame_sync (CoglOnscreen *onscreen, CoglFrameInfo *info); 69 70 COGL_EXPORT void 71 _cogl_onscreen_notify_complete (CoglOnscreen *onscreen, CoglFrameInfo *info); 72 73 void 74 _cogl_onscreen_queue_dirty (CoglOnscreen *onscreen, 75 const CoglOnscreenDirtyInfo *info); 76 77 78 void 79 _cogl_onscreen_queue_full_dirty (CoglOnscreen *onscreen); 80 81 void 82 cogl_onscreen_bind (CoglOnscreen *onscreen); 83 84 COGL_EXPORT void 85 cogl_onscreen_set_winsys (CoglOnscreen *onscreen, 86 gpointer winsys); 87 88 COGL_EXPORT gpointer 89 cogl_onscreen_get_winsys (CoglOnscreen *onscreen); 90 91 COGL_EXPORT CoglFrameInfo * 92 cogl_onscreen_peek_head_frame_info (CoglOnscreen *onscreen); 93 94 COGL_EXPORT CoglFrameInfo * 95 cogl_onscreen_peek_tail_frame_info (CoglOnscreen *onscreen); 96 97 COGL_EXPORT CoglFrameInfo * 98 cogl_onscreen_pop_head_frame_info (CoglOnscreen *onscreen); 99 100 #endif /* __COGL_ONSCREEN_PRIVATE_H */ 101