2021-03-02 09:31:19 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Red Hat Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2023-08-07 11:50:23 +02:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2021-03-02 09:31:19 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-07-21 15:37:20 +02:00
|
|
|
#pragma once
|
2021-03-02 09:31:19 +01:00
|
|
|
|
2021-04-16 20:34:29 +02:00
|
|
|
#include "core/meta-private-enums.h"
|
2023-01-27 21:49:56 +01:00
|
|
|
#include "core/meta-service-channel.h"
|
2021-05-11 09:35:04 +02:00
|
|
|
#include "core/util-private.h"
|
2021-03-02 10:49:43 +01:00
|
|
|
#include "meta/meta-backend.h"
|
2021-03-02 09:31:19 +01:00
|
|
|
#include "meta/meta-context.h"
|
2021-03-03 22:00:05 +01:00
|
|
|
#include "wayland/meta-wayland-types.h"
|
2021-03-02 09:31:19 +01:00
|
|
|
|
2022-10-26 12:10:43 +02:00
|
|
|
#ifdef HAVE_PROFILER
|
|
|
|
#include "core/meta-profiler.h"
|
|
|
|
#endif
|
|
|
|
|
2021-03-02 09:31:19 +01:00
|
|
|
struct _MetaContextClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2021-03-02 10:35:38 +01:00
|
|
|
|
|
|
|
gboolean (* configure) (MetaContext *context,
|
|
|
|
int *argc,
|
|
|
|
char ***argv,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
MetaCompositorType (* get_compositor_type) (MetaContext *context);
|
2021-03-02 10:49:43 +01:00
|
|
|
|
2021-04-16 20:34:29 +02:00
|
|
|
MetaX11DisplayPolicy (* get_x11_display_policy) (MetaContext *context);
|
|
|
|
|
2021-04-19 16:13:47 +02:00
|
|
|
gboolean (* is_replacing) (MetaContext *context);
|
|
|
|
|
2021-03-02 11:41:34 +01:00
|
|
|
gboolean (* setup) (MetaContext *context,
|
|
|
|
GError **error);
|
|
|
|
|
2021-03-02 10:49:43 +01:00
|
|
|
MetaBackend * (* create_backend) (MetaContext *context,
|
|
|
|
GError **error);
|
2021-03-02 12:07:10 +01:00
|
|
|
|
|
|
|
void (* notify_ready) (MetaContext *context);
|
2022-05-30 20:27:02 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_X11
|
|
|
|
gboolean (* is_x11_sync) (MetaContext *context);
|
|
|
|
#endif
|
2021-03-02 09:31:19 +01:00
|
|
|
};
|
|
|
|
|
2021-03-03 22:12:01 +01:00
|
|
|
const char * meta_context_get_name (MetaContext *context);
|
|
|
|
|
2021-03-03 23:02:02 +01:00
|
|
|
const char * meta_context_get_gnome_wm_keybindings (MetaContext *context);
|
|
|
|
|
2021-09-01 21:12:03 +02:00
|
|
|
gboolean meta_context_get_unsafe_mode (MetaContext *context);
|
|
|
|
void meta_context_set_unsafe_mode (MetaContext *context,
|
|
|
|
gboolean enable);
|
|
|
|
|
2023-01-27 21:49:56 +01:00
|
|
|
#ifdef HAVE_WAYLAND
|
|
|
|
META_EXPORT_TEST
|
|
|
|
MetaServiceChannel * meta_context_get_service_channel (MetaContext *context);
|
|
|
|
#endif
|
|
|
|
|
2021-04-16 20:34:29 +02:00
|
|
|
MetaX11DisplayPolicy meta_context_get_x11_display_policy (MetaContext *context);
|
|
|
|
|
2022-05-30 20:27:02 +02:00
|
|
|
#ifdef HAVE_X11
|
|
|
|
META_EXPORT_TEST
|
|
|
|
gboolean meta_context_is_x11_sync (MetaContext *context);
|
|
|
|
#endif
|
|
|
|
|
2022-10-26 12:10:43 +02:00
|
|
|
#ifdef HAVE_PROFILER
|
|
|
|
MetaProfiler *
|
|
|
|
meta_context_get_profiler (MetaContext *context);
|
2023-05-10 22:26:08 +02:00
|
|
|
|
|
|
|
void meta_context_set_trace_file (MetaContext *context,
|
|
|
|
const char *trace_file);
|
2022-10-26 12:10:43 +02:00
|
|
|
#endif
|