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 };
47 
48 struct _GdkMonitorClass {
49   GObjectClass parent_class;
50 
51   void (* get_workarea) (GdkMonitor   *monitor,
52                          GdkRectangle *geometry);
53 };
54 
55 GdkMonitor *    gdk_monitor_new                 (GdkDisplay *display);
56 
57 void            gdk_monitor_set_manufacturer    (GdkMonitor *monitor,
58                                                  const char *manufacturer);
59 void            gdk_monitor_set_model           (GdkMonitor *monitor,
60                                                  const char *model);
61 void            gdk_monitor_set_connector       (GdkMonitor *monitor,
62                                                  const char *connector);
63 const char *    gdk_monitor_get_connector       (GdkMonitor *monitor);
64 void            gdk_monitor_set_position        (GdkMonitor *monitor,
65                                                  int         x,
66                                                  int         y);
67 void            gdk_monitor_set_size            (GdkMonitor *monitor,
68                                                  int         width,
69                                                  int         height);
70 void            gdk_monitor_set_physical_size   (GdkMonitor *monitor,
71                                                  int         width_mm,
72                                                  int         height_mm);
73 void            gdk_monitor_set_scale_factor    (GdkMonitor *monitor,
74                                                  int         scale);
75 void            gdk_monitor_set_refresh_rate    (GdkMonitor *monitor,
76                                                  int         refresh_rate);
77 void            gdk_monitor_set_subpixel_layout (GdkMonitor        *monitor,
78                                                  GdkSubpixelLayout  subpixel);
79 void            gdk_monitor_invalidate          (GdkMonitor *monitor);
80 
81 G_END_DECLS
82 
83 #endif  /* __GDK_MONITOR_PRIVATE_H__ */
84