1 /*
2  * Copyright (C) 2021 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of the
7  * License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17  * 02111-1307, USA.
18  *
19  */
20 
21 #ifndef META_VIRTUAL_MONITOR_H
22 #define META_VIRTUAL_MONITOR_H
23 
24 #include <glib-object.h>
25 
26 #include "backends/meta-backend-types.h"
27 #include "core/util-private.h"
28 
29 typedef struct _MetaVirtualMonitorInfo
30 {
31   int width;
32   int height;
33   float refresh_rate;
34 
35   char *vendor;
36   char *product;
37   char *serial;
38 } MetaVirtualMonitorInfo;
39 
40 #define META_TYPE_VIRTUAL_MONITOR (meta_virtual_monitor_get_type ())
41 G_DECLARE_DERIVABLE_TYPE (MetaVirtualMonitor, meta_virtual_monitor,
42                           META, VIRTUAL_MONITOR,
43                           GObject)
44 
45 struct _MetaVirtualMonitorClass
46 {
47   GObjectClass parent_class;
48 };
49 
50 META_EXPORT_TEST
51 MetaVirtualMonitorInfo * meta_virtual_monitor_info_new (int         width,
52                                                         int         height,
53                                                         float       refresh_rate,
54                                                         const char *vendor,
55                                                         const char *product,
56                                                         const char *serial);
57 
58 META_EXPORT_TEST
59 void meta_virtual_monitor_info_free (MetaVirtualMonitorInfo *info);
60 
61 MetaCrtc * meta_virtual_monitor_get_crtc (MetaVirtualMonitor *virtual_monitor);
62 
63 MetaCrtcMode * meta_virtual_monitor_get_crtc_mode (MetaVirtualMonitor *virtual_monitor);
64 
65 META_EXPORT_TEST
66 MetaOutput * meta_virtual_monitor_get_output (MetaVirtualMonitor *virtual_monitor);
67 
68 G_DEFINE_AUTOPTR_CLEANUP_FUNC (MetaVirtualMonitorInfo,
69                                meta_virtual_monitor_info_free)
70 
71 #endif /* META_VIRTUAL_MONITOR_H */
72