1 | /* |
2 | * gdkscreen.h |
3 | * |
4 | * Copyright 2001 Sun Microsystems Inc. |
5 | * |
6 | * Erwann Chenede <[email protected]> |
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, write to the |
20 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
21 | * Boston, MA 02111-1307, USA. |
22 | */ |
23 | |
24 | #ifndef __GDK_SCREEN_H__ |
25 | #define __GDK_SCREEN_H__ |
26 | |
27 | #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION) |
28 | #error "Only <gdk/gdk.h> can be included directly." |
29 | #endif |
30 | |
31 | #include <cairo.h> |
32 | #include "gdk/gdktypes.h" |
33 | #include "gdk/gdkdisplay.h" |
34 | |
35 | G_BEGIN_DECLS |
36 | |
37 | typedef struct _GdkScreenClass GdkScreenClass; |
38 | |
39 | #define GDK_TYPE_SCREEN (gdk_screen_get_type ()) |
40 | #define GDK_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_SCREEN, GdkScreen)) |
41 | #define GDK_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_SCREEN, GdkScreenClass)) |
42 | #define GDK_IS_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_SCREEN)) |
43 | #define GDK_IS_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_SCREEN)) |
44 | #define GDK_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_SCREEN, GdkScreenClass)) |
45 | |
46 | struct _GdkScreen |
47 | { |
48 | GObject parent_instance; |
49 | |
50 | guint GSEAL (closed) : 1; |
51 | |
52 | GdkGC *GSEAL (normal_gcs[32]); |
53 | GdkGC *GSEAL (exposure_gcs[32]); |
54 | GdkGC *GSEAL (subwindow_gcs[32]); |
55 | |
56 | cairo_font_options_t *GSEAL (font_options); |
57 | double GSEAL (resolution); /* pixels/points scale factor for fonts */ |
58 | }; |
59 | |
60 | struct _GdkScreenClass |
61 | { |
62 | GObjectClass parent_class; |
63 | |
64 | void (*size_changed) (GdkScreen *screen); |
65 | void (*composited_changed) (GdkScreen *screen); |
66 | void (*monitors_changed) (GdkScreen *screen); |
67 | }; |
68 | |
69 | GType gdk_screen_get_type (void) G_GNUC_CONST; |
70 | GdkColormap *gdk_screen_get_default_colormap (GdkScreen *screen); |
71 | void gdk_screen_set_default_colormap (GdkScreen *screen, |
72 | GdkColormap *colormap); |
73 | GdkColormap* gdk_screen_get_system_colormap (GdkScreen *screen); |
74 | GdkVisual* gdk_screen_get_system_visual (GdkScreen *screen); |
75 | GdkColormap *gdk_screen_get_rgb_colormap (GdkScreen *screen); |
76 | GdkVisual * gdk_screen_get_rgb_visual (GdkScreen *screen); |
77 | GdkColormap *gdk_screen_get_rgba_colormap (GdkScreen *screen); |
78 | GdkVisual * gdk_screen_get_rgba_visual (GdkScreen *screen); |
79 | gboolean gdk_screen_is_composited (GdkScreen *screen); |
80 | |
81 | GdkWindow * gdk_screen_get_root_window (GdkScreen *screen); |
82 | GdkDisplay * gdk_screen_get_display (GdkScreen *screen); |
83 | gint gdk_screen_get_number (GdkScreen *screen); |
84 | gint gdk_screen_get_width (GdkScreen *screen); |
85 | gint gdk_screen_get_height (GdkScreen *screen); |
86 | gint gdk_screen_get_width_mm (GdkScreen *screen); |
87 | gint gdk_screen_get_height_mm (GdkScreen *screen); |
88 | |
89 | GList * gdk_screen_list_visuals (GdkScreen *screen); |
90 | GList * gdk_screen_get_toplevel_windows (GdkScreen *screen); |
91 | gchar * gdk_screen_make_display_name (GdkScreen *screen); |
92 | |
93 | gint gdk_screen_get_n_monitors (GdkScreen *screen); |
94 | gint gdk_screen_get_primary_monitor (GdkScreen *screen); |
95 | void gdk_screen_get_monitor_geometry (GdkScreen *screen, |
96 | gint monitor_num, |
97 | GdkRectangle *dest); |
98 | gint gdk_screen_get_monitor_at_point (GdkScreen *screen, |
99 | gint x, |
100 | gint y); |
101 | gint gdk_screen_get_monitor_at_window (GdkScreen *screen, |
102 | GdkWindow *window); |
103 | gint gdk_screen_get_monitor_width_mm (GdkScreen *screen, |
104 | gint monitor_num); |
105 | gint gdk_screen_get_monitor_height_mm (GdkScreen *screen, |
106 | gint monitor_num); |
107 | gchar * gdk_screen_get_monitor_plug_name (GdkScreen *screen, |
108 | gint monitor_num); |
109 | |
110 | void gdk_screen_broadcast_client_message (GdkScreen *screen, |
111 | GdkEvent *event); |
112 | |
113 | GdkScreen *gdk_screen_get_default (void); |
114 | |
115 | gboolean gdk_screen_get_setting (GdkScreen *screen, |
116 | const gchar *name, |
117 | GValue *value); |
118 | |
119 | void gdk_screen_set_font_options (GdkScreen *screen, |
120 | const cairo_font_options_t *options); |
121 | const cairo_font_options_t *gdk_screen_get_font_options (GdkScreen *screen); |
122 | |
123 | void gdk_screen_set_resolution (GdkScreen *screen, |
124 | gdouble dpi); |
125 | gdouble gdk_screen_get_resolution (GdkScreen *screen); |
126 | |
127 | GdkWindow *gdk_screen_get_active_window (GdkScreen *screen); |
128 | GList *gdk_screen_get_window_stack (GdkScreen *screen); |
129 | |
130 | G_END_DECLS |
131 | |
132 | #endif /* __GDK_SCREEN_H__ */ |
133 | |