mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
native: Add abstract MetaOutputNative object
MetaOutputKms is made to inherit from this, but it doesn't do anything special yet. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1698>
This commit is contained in:
parent
3091cd89dc
commit
fd4ea67b27
@ -41,12 +41,12 @@
|
||||
|
||||
struct _MetaOutputKms
|
||||
{
|
||||
MetaOutput parent;
|
||||
MetaOutputNative parent;
|
||||
|
||||
MetaKmsConnector *kms_connector;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaOutputKms, meta_output_kms, META_TYPE_OUTPUT)
|
||||
G_DEFINE_TYPE (MetaOutputKms, meta_output_kms, META_TYPE_OUTPUT_NATIVE)
|
||||
|
||||
MetaKmsConnector *
|
||||
meta_output_kms_get_kms_connector (MetaOutputKms *output_kms)
|
||||
|
@ -26,11 +26,12 @@
|
||||
#include "backends/meta-output.h"
|
||||
#include "backends/native/meta-gpu-kms.h"
|
||||
#include "backends/native/meta-kms-types.h"
|
||||
#include "backends/native/meta-output-native.h"
|
||||
|
||||
#define META_TYPE_OUTPUT_KMS (meta_output_kms_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (MetaOutputKms, meta_output_kms,
|
||||
META, OUTPUT_KMS,
|
||||
MetaOutput)
|
||||
MetaOutputNative)
|
||||
|
||||
void meta_output_kms_set_power_save_mode (MetaOutputKms *output_kms,
|
||||
uint64_t dpms_state,
|
||||
|
35
src/backends/native/meta-output-native.c
Normal file
35
src/backends/native/meta-output-native.c
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Red Hat
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "backends/native/meta-output-native.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaOutputNative, meta_output_native,
|
||||
META_TYPE_OUTPUT)
|
||||
|
||||
static void
|
||||
meta_output_native_init (MetaOutputNative *output_native)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
meta_output_native_class_init (MetaOutputNativeClass *klass)
|
||||
{
|
||||
}
|
35
src/backends/native/meta-output-native.h
Normal file
35
src/backends/native/meta-output-native.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Red Hat
|
||||
*
|
||||
* 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_OUTPUT_NATIVE_H
|
||||
#define META_OUTPUT_NATIVE_H
|
||||
|
||||
#include "backends/meta-output.h"
|
||||
|
||||
#define META_TYPE_OUTPUT_NATIVE (meta_output_native_get_type ())
|
||||
G_DECLARE_DERIVABLE_TYPE (MetaOutputNative, meta_output_native,
|
||||
META, OUTPUT_NATIVE,
|
||||
MetaOutput)
|
||||
|
||||
struct _MetaOutputNativeClass
|
||||
{
|
||||
MetaOutputClass parent_class;
|
||||
};
|
||||
|
||||
#endif /* META_OUTPUT_NATIVE_H */
|
@ -674,6 +674,8 @@ if have_native_backend
|
||||
'backends/native/meta-monitor-manager-native.h',
|
||||
'backends/native/meta-output-kms.c',
|
||||
'backends/native/meta-output-kms.h',
|
||||
'backends/native/meta-output-native.c',
|
||||
'backends/native/meta-output-native.h',
|
||||
'backends/native/meta-kms-connector-private.h',
|
||||
'backends/native/meta-kms-connector.c',
|
||||
'backends/native/meta-kms-connector.h',
|
||||
|
Loading…
Reference in New Issue
Block a user