1 /* 2 * Copyright (C) 2017 Red Hat 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 #ifndef META_CRTC_H 21 #define META_CRTC_H 22 23 #include <glib-object.h> 24 25 #include "backends/meta-backend-types.h" 26 #include "backends/meta-crtc-mode.h" 27 #include "backends/meta-monitor-transform.h" 28 #include "core/util-private.h" 29 #include "meta/boxes.h" 30 31 typedef struct _MetaCrtcConfig 32 { 33 graphene_rect_t layout; 34 MetaMonitorTransform transform; 35 MetaCrtcMode *mode; 36 } MetaCrtcConfig; 37 38 #define META_TYPE_CRTC (meta_crtc_get_type ()) 39 META_EXPORT_TEST 40 G_DECLARE_DERIVABLE_TYPE (MetaCrtc, meta_crtc, META, CRTC, GObject) 41 42 struct _MetaCrtcClass 43 { 44 GObjectClass parent_class; 45 }; 46 47 META_EXPORT_TEST 48 uint64_t meta_crtc_get_id (MetaCrtc *crtc); 49 50 META_EXPORT_TEST 51 MetaGpu * meta_crtc_get_gpu (MetaCrtc *crtc); 52 53 META_EXPORT_TEST 54 const GList * meta_crtc_get_outputs (MetaCrtc *crtc); 55 56 void meta_crtc_assign_output (MetaCrtc *crtc, 57 MetaOutput *output); 58 59 META_EXPORT_TEST 60 void meta_crtc_unassign_output (MetaCrtc *crtc, 61 MetaOutput *output); 62 63 MetaMonitorTransform meta_crtc_get_all_transforms (MetaCrtc *crtc); 64 65 META_EXPORT_TEST 66 void meta_crtc_set_config (MetaCrtc *crtc, 67 graphene_rect_t *layout, 68 MetaCrtcMode *mode, 69 MetaMonitorTransform transform); 70 71 META_EXPORT_TEST 72 void meta_crtc_unset_config (MetaCrtc *crtc); 73 74 META_EXPORT_TEST 75 const MetaCrtcConfig * meta_crtc_get_config (MetaCrtc *crtc); 76 77 #endif /* META_CRTC_H */ 78