1 | /* |
2 | * gdkmonitor.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_H__ |
23 | #define __GDK_MONITOR_H__ |
24 | |
25 | #if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION) |
26 | #error "Only <gdk/gdk.h> can be included directly." |
27 | #endif |
28 | |
29 | #include <gdk/gdkversionmacros.h> |
30 | #include <gdk/gdkrectangle.h> |
31 | #include <gdk/gdktypes.h> |
32 | |
33 | G_BEGIN_DECLS |
34 | |
35 | #define GDK_TYPE_MONITOR (gdk_monitor_get_type ()) |
36 | #define GDK_MONITOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MONITOR, GdkMonitor)) |
37 | #define GDK_IS_MONITOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MONITOR)) |
38 | |
39 | typedef struct _GdkMonitor GdkMonitor; |
40 | typedef struct _GdkMonitorClass GdkMonitorClass; |
41 | |
42 | /** |
43 | * GdkSubpixelLayout: |
44 | * @GDK_SUBPIXEL_LAYOUT_UNKNOWN: The layout is not known |
45 | * @GDK_SUBPIXEL_LAYOUT_NONE: Not organized in this way |
46 | * @GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB: The layout is horizontal, the order is RGB |
47 | * @GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR: The layout is horizontal, the order is BGR |
48 | * @GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB: The layout is vertical, the order is RGB |
49 | * @GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR: The layout is vertical, the order is BGR |
50 | * |
51 | * This enumeration describes how the red, green and blue components |
52 | * of physical pixels on an output device are laid out. |
53 | */ |
54 | typedef enum { |
55 | GDK_SUBPIXEL_LAYOUT_UNKNOWN, |
56 | GDK_SUBPIXEL_LAYOUT_NONE, |
57 | GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB, |
58 | GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR, |
59 | GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB, |
60 | GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR |
61 | } GdkSubpixelLayout; |
62 | |
63 | GDK_AVAILABLE_IN_ALL |
64 | GType gdk_monitor_get_type (void) G_GNUC_CONST; |
65 | |
66 | GDK_AVAILABLE_IN_ALL |
67 | GdkDisplay * gdk_monitor_get_display (GdkMonitor *monitor); |
68 | GDK_AVAILABLE_IN_ALL |
69 | void gdk_monitor_get_geometry (GdkMonitor *monitor, |
70 | GdkRectangle *geometry); |
71 | GDK_AVAILABLE_IN_ALL |
72 | int gdk_monitor_get_width_mm (GdkMonitor *monitor); |
73 | GDK_AVAILABLE_IN_ALL |
74 | int gdk_monitor_get_height_mm (GdkMonitor *monitor); |
75 | GDK_AVAILABLE_IN_ALL |
76 | const char * gdk_monitor_get_manufacturer (GdkMonitor *monitor); |
77 | GDK_AVAILABLE_IN_ALL |
78 | const char * gdk_monitor_get_model (GdkMonitor *monitor); |
79 | GDK_AVAILABLE_IN_ALL |
80 | const char * gdk_monitor_get_connector (GdkMonitor *monitor); |
81 | GDK_AVAILABLE_IN_ALL |
82 | int gdk_monitor_get_scale_factor (GdkMonitor *monitor); |
83 | GDK_AVAILABLE_IN_ALL |
84 | int gdk_monitor_get_refresh_rate (GdkMonitor *monitor); |
85 | GDK_AVAILABLE_IN_ALL |
86 | GdkSubpixelLayout gdk_monitor_get_subpixel_layout (GdkMonitor *monitor); |
87 | GDK_AVAILABLE_IN_ALL |
88 | gboolean gdk_monitor_is_valid (GdkMonitor *monitor); |
89 | |
90 | G_END_DECLS |
91 | |
92 | #endif /* __GDK_MONITOR_H__ */ |
93 | |