2010-10-21 12:13:00 +00:00
|
|
|
/*
|
|
|
|
* Clutter.
|
|
|
|
*
|
|
|
|
* An OpenGL based 'interactive canvas' library.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2023-07-21 13:37:20 +00:00
|
|
|
#pragma once
|
2010-10-21 10:49:37 +00:00
|
|
|
|
2023-08-07 13:38:12 +00:00
|
|
|
#include "clutter/clutter-backend.h"
|
|
|
|
#include "clutter/clutter-seat.h"
|
|
|
|
#include "clutter/clutter-stage-window.h"
|
2011-10-17 15:03:19 +00:00
|
|
|
|
2010-10-21 10:49:37 +00:00
|
|
|
#define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
|
|
|
#define CLUTTER_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BACKEND))
|
|
|
|
#define CLUTTER_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _ClutterBackendPrivate ClutterBackendPrivate;
|
|
|
|
|
|
|
|
struct _ClutterBackend
|
|
|
|
{
|
|
|
|
/*< private >*/
|
2011-11-04 19:25:54 +00:00
|
|
|
GObject parent_instance;
|
2010-11-05 12:28:33 +00:00
|
|
|
|
2011-11-04 19:25:54 +00:00
|
|
|
CoglRenderer *cogl_renderer;
|
|
|
|
CoglDisplay *cogl_display;
|
|
|
|
CoglContext *cogl_context;
|
2011-12-21 15:13:53 +00:00
|
|
|
GSource *cogl_source;
|
2011-11-04 19:25:54 +00:00
|
|
|
|
2015-09-14 23:30:05 +00:00
|
|
|
CoglOnscreen *dummy_onscreen;
|
|
|
|
|
2015-07-08 10:10:45 +00:00
|
|
|
cairo_font_options_t *font_options;
|
|
|
|
|
|
|
|
gchar *font_name;
|
|
|
|
|
2020-06-06 20:58:10 +00:00
|
|
|
float fallback_resource_scale;
|
|
|
|
|
2019-03-26 18:19:45 +00:00
|
|
|
ClutterStageWindow *stage_window;
|
2017-12-06 11:44:55 +00:00
|
|
|
|
|
|
|
ClutterInputMethod *input_method;
|
2010-10-21 10:49:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _ClutterBackendClass
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
|
|
|
/* vfuncs */
|
|
|
|
ClutterStageWindow * (* create_stage) (ClutterBackend *backend,
|
|
|
|
ClutterStage *wrapper,
|
|
|
|
GError **error);
|
2011-11-04 15:50:47 +00:00
|
|
|
CoglRenderer * (* get_renderer) (ClutterBackend *backend,
|
|
|
|
GError **error);
|
|
|
|
CoglDisplay * (* get_display) (ClutterBackend *backend,
|
|
|
|
CoglRenderer *renderer,
|
|
|
|
CoglSwapChain *swap_chain,
|
|
|
|
GError **error);
|
2010-10-21 10:49:37 +00:00
|
|
|
gboolean (* create_context) (ClutterBackend *backend,
|
|
|
|
GError **error);
|
|
|
|
|
2019-04-04 10:14:28 +00:00
|
|
|
ClutterSeat * (* get_default_seat) (ClutterBackend *backend);
|
|
|
|
|
2020-07-09 07:45:07 +00:00
|
|
|
gboolean (* is_display_server) (ClutterBackend *backend);
|
|
|
|
|
2010-10-21 10:49:37 +00:00
|
|
|
/* signals */
|
|
|
|
void (* resolution_changed) (ClutterBackend *backend);
|
|
|
|
void (* font_changed) (ClutterBackend *backend);
|
|
|
|
void (* settings_changed) (ClutterBackend *backend);
|
|
|
|
};
|
|
|
|
|
2012-01-12 13:31:21 +00:00
|
|
|
ClutterStageWindow * _clutter_backend_create_stage (ClutterBackend *backend,
|
|
|
|
ClutterStage *wrapper,
|
|
|
|
GError **error);
|
|
|
|
gboolean _clutter_backend_create_context (ClutterBackend *backend,
|
|
|
|
GError **error);
|
|
|
|
|
2019-03-26 18:19:45 +00:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
ClutterStageWindow * clutter_backend_get_stage_window (ClutterBackend *backend);
|
|
|
|
|
2020-06-06 20:58:10 +00:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_backend_set_fallback_resource_scale (ClutterBackend *backend,
|
|
|
|
float fallback_resource_scale);
|
|
|
|
|
|
|
|
float clutter_backend_get_fallback_resource_scale (ClutterBackend *backend);
|
|
|
|
|
2020-07-09 07:45:07 +00:00
|
|
|
gboolean clutter_backend_is_display_server (ClutterBackend *backend);
|
|
|
|
|
2021-03-12 07:38:46 +00:00
|
|
|
CLUTTER_EXPORT
|
|
|
|
void clutter_backend_destroy (ClutterBackend *backend);
|
|
|
|
|
2010-10-21 10:49:37 +00:00
|
|
|
G_END_DECLS
|