summaryrefslogtreecommitdiff
path: root/src/meta/meta-context.h
blob: 5031892df86668b75827b7bd2f216d38224cb915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
 * 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
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 */

#ifndef META_CONTEXT_H
#define META_CONTEXT_H

#include <glib-object.h>

#include "meta/common.h"
#include "meta/types.h"

#define META_TYPE_CONTEXT (meta_context_get_type ())
META_EXPORT
G_DECLARE_DERIVABLE_TYPE (MetaContext, meta_context, META, CONTEXT, GObject)

META_EXPORT
MetaContext * meta_create_context (const char *name);

META_EXPORT
void meta_context_destroy (MetaContext *context);

META_EXPORT
void meta_context_add_option_entries (MetaContext        *context,
                                      const GOptionEntry *entries,
                                      const char         *translation_domain);

META_EXPORT
void meta_context_add_option_group (MetaContext  *context,
                                    GOptionGroup *group);

META_EXPORT
void meta_context_set_plugin_gtype (MetaContext *context,
                                    GType        plugin_gtype);

META_EXPORT
void meta_context_set_plugin_name (MetaContext *context,
                                   const char  *plugin_name);

META_EXPORT
void meta_context_set_gnome_wm_keybindings (MetaContext *context,
                                            const char  *wm_keybindings);

META_EXPORT
gboolean meta_context_configure (MetaContext   *context,
                                 int           *argc,
                                 char        ***argv,
                                 GError       **error);

META_EXPORT
gboolean meta_context_setup (MetaContext  *context,
                             GError      **error);

META_EXPORT
gboolean meta_context_start (MetaContext  *context,
                             GError      **error);

META_EXPORT
gboolean meta_context_run_main_loop (MetaContext  *context,
                                     GError      **error);

META_EXPORT
void meta_context_notify_ready (MetaContext *context);

META_EXPORT
void meta_context_terminate (MetaContext *context);

META_EXPORT
void meta_context_terminate_with_error (MetaContext *context,
                                        GError      *error);

META_EXPORT
MetaCompositorType meta_context_get_compositor_type (MetaContext *context);

META_EXPORT
gboolean meta_context_is_replacing (MetaContext *context);

META_EXPORT
MetaBackend * meta_context_get_backend (MetaContext *context);

META_EXPORT
MetaDisplay * meta_context_get_display (MetaContext *context);

META_EXPORT
gboolean meta_context_raise_rlimit_nofile (MetaContext  *context,
                                           GError      **error);

META_EXPORT
gboolean meta_context_restore_rlimit_nofile (MetaContext  *context,
                                             GError      **error);

#endif /* META_CONTEXT_H */