1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 2010 Red Hat, Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __GDK_SCREEN_PRIVATE_H__
19#define __GDK_SCREEN_PRIVATE_H__
20
21#include "gdkscreen.h"
22#include "gdkvisual.h"
23
24G_BEGIN_DECLS
25
26#define GDK_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SCREEN, GdkScreenClass))
27#define GDK_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN))
28#define GDK_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN, GdkScreenClass))
29
30typedef struct _GdkScreenClass GdkScreenClass;
31
32struct _GdkScreen
33{
34 GObject parent_instance;
35
36 cairo_font_options_t *font_options;
37 gdouble resolution; /* pixels/points scale factor for fonts */
38 guint resolution_set : 1; /* resolution set through public API */
39 guint closed : 1;
40};
41
42struct _GdkScreenClass
43{
44 GObjectClass parent_class;
45
46 GdkDisplay * (* get_display) (GdkScreen *screen);
47 gint (* get_width) (GdkScreen *screen);
48 gint (* get_height) (GdkScreen *screen);
49 gint (* get_width_mm) (GdkScreen *screen);
50 gint (* get_height_mm) (GdkScreen *screen);
51 gint (* get_number) (GdkScreen *screen);
52 GdkWindow * (* get_root_window) (GdkScreen *screen);
53 gint (* get_n_monitors) (GdkScreen *screen);
54 gint (* get_primary_monitor) (GdkScreen *screen);
55 gint (* get_monitor_width_mm) (GdkScreen *screen,
56 gint monitor_num);
57 gint (* get_monitor_height_mm) (GdkScreen *screen,
58 gint monitor_num);
59 gchar * (* get_monitor_plug_name) (GdkScreen *screen,
60 gint monitor_num);
61 void (* get_monitor_geometry) (GdkScreen *screen,
62 gint monitor_num,
63 GdkRectangle *dest);
64 void (* get_monitor_workarea) (GdkScreen *screen,
65 gint monitor_num,
66 GdkRectangle *dest);
67 GList * (* list_visuals) (GdkScreen *screen);
68 GdkVisual * (* get_system_visual) (GdkScreen *screen);
69 GdkVisual * (* get_rgba_visual) (GdkScreen *screen);
70 gboolean (* is_composited) (GdkScreen *screen);
71 gchar * (* make_display_name) (GdkScreen *screen);
72 GdkWindow * (* get_active_window) (GdkScreen *screen);
73 GList * (* get_window_stack) (GdkScreen *screen);
74 void (* broadcast_client_message) (GdkScreen *screen,
75 GdkEvent *event);
76 gboolean (* get_setting) (GdkScreen *screen,
77 const gchar *name,
78 GValue *value);
79 gint (* visual_get_best_depth) (GdkScreen *screen);
80 GdkVisualType (* visual_get_best_type) (GdkScreen *screen);
81 GdkVisual * (* visual_get_best) (GdkScreen *screen);
82 GdkVisual * (* visual_get_best_with_depth) (GdkScreen *screen,
83 gint depth);
84 GdkVisual * (* visual_get_best_with_type) (GdkScreen *screen,
85 GdkVisualType visual_type);
86 GdkVisual * (* visual_get_best_with_both) (GdkScreen *screen,
87 gint depth,
88 GdkVisualType visual_type);
89 void (* query_depths) (GdkScreen *screen,
90 gint **depths,
91 gint *count);
92 void (* query_visual_types) (GdkScreen *screen,
93 GdkVisualType **visual_types,
94 gint *count);
95 gint (* get_monitor_scale_factor) (GdkScreen *screen,
96 gint monitor_num);
97
98 /* Signals: */
99 void (*size_changed) (GdkScreen *screen);
100 void (*composited_changed) (GdkScreen *screen);
101 void (*monitors_changed) (GdkScreen *screen);
102};
103
104G_END_DECLS
105
106#endif /* __GDK_SCREEN_PRIVATE_H__ */
107