1 /*
2  * gdkmonitorprivate.h
3  *
4  * Copyright 2016 Red Hat, Inc.
5  *
6  * Matthias Clasen <mclasen@redhat.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef __GDK_MONITOR_PRIVATE_H__
23 #define __GDK_MONITOR_PRIVATE_H__
24 
25 #include "gdkmonitor.h"
26 
27 G_BEGIN_DECLS
28 
29 #define GDK_MONITOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_MONITOR, GdkMonitorClass))
30 #define GDK_IS_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_MONITOR))
31 #define GDK_MONITOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_MONITOR, GdkMonitorClass))
32 
33 struct _GdkMonitor {
34   GObject parent;
35 
36   GdkDisplay *display;
37   char *manufacturer;
38   char *model;
39   char *connector;
40   GdkRectangle geometry;
41   int width_mm;
42   int height_mm;
43   int scale_factor;
44   int refresh_rate;
45   GdkSubpixelLayout subpixel_layout;
46   gboolean valid;
47 };
48 
49 struct _GdkMonitorClass {
50   GObjectClass parent_class;
51 };
52 
53 GdkMonitor *    gdk_monitor_new                 (GdkDisplay *display);
54 
55 void            gdk_monitor_set_manufacturer    (GdkMonitor *monitor,
56                                                  const char *manufacturer);
57 void            gdk_monitor_set_model           (GdkMonitor *monitor,
58                                                  const char *model);
59 void            gdk_monitor_set_connector       (GdkMonitor *monitor,
60                                                  const char *connector);
61 void            gdk_monitor_set_geometry        (GdkMonitor *monitor,
62                                                  const GdkRectangle *geometry);
63 void            gdk_monitor_set_physical_size   (GdkMonitor *monitor,
64                                                  int         width_mm,
65                                                  int         height_mm);
66 void            gdk_monitor_set_scale_factor    (GdkMonitor *monitor,
67                                                  int         scale);
68 void            gdk_monitor_set_refresh_rate    (GdkMonitor *monitor,
69                                                  int         refresh_rate);
70 void            gdk_monitor_set_subpixel_layout (GdkMonitor        *monitor,
71                                                  GdkSubpixelLayout  subpixel);
72 void            gdk_monitor_invalidate          (GdkMonitor *monitor);
73 
74 G_END_DECLS
75 
76 #endif  /* __GDK_MONITOR_PRIVATE_H__ */
77