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 (GDK_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 | * Since: 3.22 |
55 | */ |
56 | typedef enum { |
57 | GDK_SUBPIXEL_LAYOUT_UNKNOWN, |
58 | GDK_SUBPIXEL_LAYOUT_NONE, |
59 | GDK_SUBPIXEL_LAYOUT_HORIZONTAL_RGB, |
60 | GDK_SUBPIXEL_LAYOUT_HORIZONTAL_BGR, |
61 | GDK_SUBPIXEL_LAYOUT_VERTICAL_RGB, |
62 | GDK_SUBPIXEL_LAYOUT_VERTICAL_BGR |
63 | } GdkSubpixelLayout; |
64 | |
65 | GDK_AVAILABLE_IN_3_22 |
66 | GType gdk_monitor_get_type (void) G_GNUC_CONST; |
67 | |
68 | GDK_AVAILABLE_IN_3_22 |
69 | GdkDisplay * gdk_monitor_get_display (GdkMonitor *monitor); |
70 | GDK_AVAILABLE_IN_3_22 |
71 | void gdk_monitor_get_geometry (GdkMonitor *monitor, |
72 | GdkRectangle *geometry); |
73 | GDK_AVAILABLE_IN_3_22 |
74 | void gdk_monitor_get_workarea (GdkMonitor *monitor, |
75 | GdkRectangle *workarea); |
76 | GDK_AVAILABLE_IN_3_22 |
77 | int gdk_monitor_get_width_mm (GdkMonitor *monitor); |
78 | GDK_AVAILABLE_IN_3_22 |
79 | int gdk_monitor_get_height_mm (GdkMonitor *monitor); |
80 | GDK_AVAILABLE_IN_3_22 |
81 | const char * gdk_monitor_get_manufacturer (GdkMonitor *monitor); |
82 | GDK_AVAILABLE_IN_3_22 |
83 | const char * gdk_monitor_get_model (GdkMonitor *monitor); |
84 | GDK_AVAILABLE_IN_3_22 |
85 | int gdk_monitor_get_scale_factor (GdkMonitor *monitor); |
86 | GDK_AVAILABLE_IN_3_22 |
87 | int gdk_monitor_get_refresh_rate (GdkMonitor *monitor); |
88 | GDK_AVAILABLE_IN_3_22 |
89 | GdkSubpixelLayout gdk_monitor_get_subpixel_layout (GdkMonitor *monitor); |
90 | GDK_AVAILABLE_IN_3_22 |
91 | gboolean gdk_monitor_is_primary (GdkMonitor *monitor); |
92 | |
93 | G_END_DECLS |
94 | |
95 | #endif /* __GDK_MONITOR_H__ */ |
96 | |