2019-09-12 04:47:46 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Red Hat Inc.
|
|
|
|
*
|
2021-01-28 12:05:25 -05:00
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use, copy,
|
|
|
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
2019-09-12 04:47:46 -04:00
|
|
|
*
|
2021-01-28 12:05:25 -05:00
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
2019-09-12 04:47:46 -04:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-07-21 09:37:20 -04:00
|
|
|
#pragma once
|
2019-09-12 04:47:46 -04:00
|
|
|
|
|
|
|
#include "cogl/cogl-types.h"
|
2020-08-28 21:50:39 -04:00
|
|
|
#include "cogl/cogl-framebuffer.h"
|
2022-06-10 11:01:35 -04:00
|
|
|
#include "cogl/cogl-onscreen.h"
|
2019-09-12 04:47:46 -04:00
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
#define COGL_TYPE_SCANOUT (cogl_scanout_get_type ())
|
|
|
|
COGL_EXPORT
|
|
|
|
G_DECLARE_INTERFACE (CoglScanout, cogl_scanout,
|
|
|
|
COGL, SCANOUT, GObject)
|
|
|
|
|
|
|
|
struct _CoglScanoutInterface
|
|
|
|
{
|
|
|
|
GTypeInterface parent_iface;
|
2020-08-28 21:50:39 -04:00
|
|
|
|
|
|
|
gboolean (*blit_to_framebuffer) (CoglScanout *scanout,
|
|
|
|
CoglFramebuffer *framebuffer,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
GError **error);
|
2019-09-12 04:47:46 -04:00
|
|
|
};
|
|
|
|
|
2020-08-28 21:50:39 -04:00
|
|
|
COGL_EXPORT
|
|
|
|
gboolean cogl_scanout_blit_to_framebuffer (CoglScanout *scanout,
|
|
|
|
CoglFramebuffer *framebuffer,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
GError **error);
|
|
|
|
|
2022-06-10 11:01:35 -04:00
|
|
|
COGL_EXPORT
|
|
|
|
void cogl_scanout_notify_failed (CoglScanout *scanout,
|
|
|
|
CoglOnscreen *onscreen);
|