2021-03-02 03:31:19 -05: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 05:50:23 -04:00
|
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
2021-03-02 03:31:19 -05:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2023-07-21 09:37:20 -04:00
|
|
|
#pragma once
|
2021-03-02 03:31:19 -05:00
|
|
|
|
2021-04-16 14:34:29 -04:00
|
|
|
#include "core/meta-private-enums.h"
|
2023-01-27 15:49:56 -05:00
|
|
|
#include "core/meta-service-channel.h"
|
2021-05-11 03:35:04 -04:00
|
|
|
#include "core/util-private.h"
|
2021-03-02 04:49:43 -05:00
|
|
|
#include "meta/meta-backend.h"
|
2021-03-02 03:31:19 -05:00
|
|
|
#include "meta/meta-context.h"
|
2021-03-03 16:00:05 -05:00
|
|
|
#include "wayland/meta-wayland-types.h"
|
2021-03-02 03:31:19 -05:00
|
|
|
|
2022-10-26 06:10:43 -04:00
|
|
|
#ifdef HAVE_PROFILER
|
|
|
|
#include "core/meta-profiler.h"
|
|
|
|
#endif
|
|
|
|
|
2021-03-02 03:31:19 -05:00
|
|
|
struct _MetaContextClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2021-03-02 04:35:38 -05:00
|
|
|
|
|
|
|
gboolean (* configure) (MetaContext *context,
|
|
|
|
int *argc,
|
|
|
|
char ***argv,
|
|
|
|
GError **error);
|
|
|
|
|
|
|
|
MetaCompositorType (* get_compositor_type) (MetaContext *context);
|
2021-03-02 04:49:43 -05:00
|
|
|
|
2021-04-16 14:34:29 -04:00
|
|
|
MetaX11DisplayPolicy (* get_x11_display_policy) (MetaContext *context);
|
|
|
|
|
2021-04-19 10:13:47 -04:00
|
|
|
gboolean (* is_replacing) (MetaContext *context);
|
|
|
|
|
2021-03-02 05:41:34 -05:00
|
|
|
gboolean (* setup) (MetaContext *context,
|
|
|
|
GError **error);
|
|
|
|
|
2021-03-02 04:49:43 -05:00
|
|
|
MetaBackend * (* create_backend) (MetaContext *context,
|
|
|
|
GError **error);
|
2021-03-02 06:07:10 -05:00
|
|
|
|
|
|
|
void (* notify_ready) (MetaContext *context);
|
2022-05-30 14:27:02 -04:00
|
|
|
|
|
|
|
#ifdef HAVE_X11
|
|
|
|
gboolean (* is_x11_sync) (MetaContext *context);
|
|
|
|
#endif
|
2021-03-02 03:31:19 -05:00
|
|
|
};
|
|
|
|
|
2021-03-03 16:12:01 -05:00
|
|
|
const char * meta_context_get_name (MetaContext *context);
|
|
|
|
|
2021-03-03 17:02:02 -05:00
|
|
|
const char * meta_context_get_gnome_wm_keybindings (MetaContext *context);
|
|
|
|
|
2021-09-01 15:12:03 -04:00
|
|
|
gboolean meta_context_get_unsafe_mode (MetaContext *context);
|
|
|
|
void meta_context_set_unsafe_mode (MetaContext *context,
|
|
|
|
gboolean enable);
|
|
|
|
|
2023-01-27 15:49:56 -05:00
|
|
|
#ifdef HAVE_WAYLAND
|
|
|
|
META_EXPORT_TEST
|
|
|
|
MetaServiceChannel * meta_context_get_service_channel (MetaContext *context);
|
|
|
|
#endif
|
|
|
|
|
2021-04-16 14:34:29 -04:00
|
|
|
MetaX11DisplayPolicy meta_context_get_x11_display_policy (MetaContext *context);
|
|
|
|
|
2022-05-30 14:27:02 -04:00
|
|
|
#ifdef HAVE_X11
|
|
|
|
META_EXPORT_TEST
|
|
|
|
gboolean meta_context_is_x11_sync (MetaContext *context);
|
|
|
|
#endif
|
|
|
|
|
2022-10-26 06:10:43 -04:00
|
|
|
#ifdef HAVE_PROFILER
|
|
|
|
MetaProfiler *
|
|
|
|
meta_context_get_profiler (MetaContext *context);
|
2023-05-10 16:26:08 -04:00
|
|
|
|
|
|
|
void meta_context_set_trace_file (MetaContext *context,
|
|
|
|
const char *trace_file);
|
2022-10-26 06:10:43 -04:00
|
|
|
#endif
|