mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
context/test: Add test context type enum
A test context type will later determine what kind of backend the test case should use; i.e. whether the nested or headless backend should be used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
parent
8cb177499d
commit
434f5e5b7b
@ -29,6 +29,8 @@
|
||||
struct _MetaContextTest
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
MetaContextTestType type;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaContextTest, meta_context_test, META_TYPE_CONTEXT)
|
||||
@ -57,13 +59,14 @@ meta_context_test_get_compositor_type (MetaContext *context)
|
||||
}
|
||||
|
||||
MetaContext *
|
||||
meta_create_test_context (void)
|
||||
meta_create_test_context (MetaContextTestType type)
|
||||
{
|
||||
MetaContextTest *context_test;
|
||||
|
||||
context_test = g_object_new (META_TYPE_CONTEXT_TEST,
|
||||
"name", "Mutter Test",
|
||||
NULL);
|
||||
context_test->type = type;
|
||||
|
||||
return META_CONTEXT (context_test);
|
||||
}
|
||||
|
@ -23,11 +23,19 @@
|
||||
|
||||
#include "core/meta-context-private.h"
|
||||
|
||||
typedef enum _MetaContextTestType
|
||||
{
|
||||
#ifdef HAVE_NATIVE_BACKEND
|
||||
META_CONTEXT_TEST_TYPE_HEADLESS,
|
||||
#endif
|
||||
META_CONTEXT_TEST_TYPE_NESTED,
|
||||
} MetaContextTestType;
|
||||
|
||||
#define META_TYPE_CONTEXT_TEST (meta_context_test_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaContextTest, meta_context_test,
|
||||
META, CONTEXT_TEST,
|
||||
MetaContext)
|
||||
|
||||
MetaContext * meta_create_test_context (void);
|
||||
MetaContext * meta_create_test_context (MetaContextTestType type);
|
||||
|
||||
#endif /* META_CONTEXT_TEST_H */
|
||||
|
Loading…
Reference in New Issue
Block a user