1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2 #ifndef _GDKMM_SCREEN_H
3 #define _GDKMM_SCREEN_H
4
5
6 #include <glibmm/ustring.h>
7 #include <sigc++/sigc++.h>
8
9 /*
10 * Copyright (C) 1998-2002 The gtkmm Development Team
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 */
26
27 #include <gdkmm/rectangle.h>
28 #include <glibmm/object.h>
29 #include <cairomm/fontoptions.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 using GdkScreen = struct _GdkScreen;
34 using GdkScreenClass = struct _GdkScreenClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 namespace Gdk
40 { class Screen_Class; } // namespace Gdk
41 #endif //DOXYGEN_SHOULD_SKIP_THIS
42
43 namespace Gdk
44 {
45
46 class Display;
47 class Visual;
48 class Window;
49
50 /** Object representing a physical screen
51 * Gdk::Screen objects are the GDK representation of a physical screen. It is used throughout GDK and GTK+ to specify
52 * which screen the top level windows are to be displayed on. It is also used to query the screen specification and
53 * default settings such as the screen width (get_width()), etc.
54 * Note that a screen may consist of multiple monitors which are merged to form a large screen area.
55 */
56
57 class Screen : public Glib::Object
58 {
59
60 #ifndef DOXYGEN_SHOULD_SKIP_THIS
61
62 public:
63 using CppObjectType = Screen;
64 using CppClassType = Screen_Class;
65 using BaseObjectType = GdkScreen;
66 using BaseClassType = GdkScreenClass;
67
68 // noncopyable
69 Screen(const Screen&) = delete;
70 Screen& operator=(const Screen&) = delete;
71
72 private: friend class Screen_Class;
73 static CppClassType screen_class_;
74
75 protected:
76 explicit Screen(const Glib::ConstructParams& construct_params);
77 explicit Screen(GdkScreen* castitem);
78
79 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80
81 public:
82
83 Screen(Screen&& src) noexcept;
84 Screen& operator=(Screen&& src) noexcept;
85
86 ~Screen() noexcept override;
87
88 /** Get the GType for this class, for use with the underlying GObject type system.
89 */
90 static GType get_type() G_GNUC_CONST;
91
92 #ifndef DOXYGEN_SHOULD_SKIP_THIS
93
94
95 static GType get_base_type() G_GNUC_CONST;
96 #endif
97
98 ///Provides access to the underlying C GObject.
gobj()99 GdkScreen* gobj() { return reinterpret_cast<GdkScreen*>(gobject_); }
100
101 ///Provides access to the underlying C GObject.
gobj()102 const GdkScreen* gobj() const { return reinterpret_cast<GdkScreen*>(gobject_); }
103
104 ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
105 GdkScreen* gobj_copy();
106
107 private:
108
109 protected:
110
111 public:
112
113 /** Get the system’s default visual for @a screen.
114 * This is the visual for the root window of the display.
115 * The return value should not be freed.
116 *
117 * @newin{2,2}
118 *
119 * @return The system visual.
120 */
121 Glib::RefPtr<Visual> get_system_visual();
122
123 /** Get the system’s default visual for @a screen.
124 * This is the visual for the root window of the display.
125 * The return value should not be freed.
126 *
127 * @newin{2,2}
128 *
129 * @return The system visual.
130 */
131 Glib::RefPtr<const Visual> get_system_visual() const;
132
133
134 /** Gets a visual to use for creating windows with an alpha channel.
135 * The windowing system on which GTK+ is running
136 * may not support this capability, in which case <tt>nullptr</tt> will
137 * be returned. Even if a non-<tt>nullptr</tt> value is returned, its
138 * possible that the window’s alpha channel won’t be honored
139 * when displaying the window on the screen: in particular, for
140 * X an appropriate windowing manager and compositing manager
141 * must be running to provide appropriate display.
142 *
143 * This functionality is not implemented in the Windows backend.
144 *
145 * For setting an overall opacity for a top-level window, see
146 * Gdk::Window::set_opacity().
147 *
148 * @newin{2,8}
149 *
150 * @return A visual to use for windows
151 * with an alpha channel or <tt>nullptr</tt> if the capability is not
152 * available.
153 */
154 Glib::RefPtr<Visual> get_rgba_visual();
155
156 /** Gets a visual to use for creating windows with an alpha channel.
157 * The windowing system on which GTK+ is running
158 * may not support this capability, in which case <tt>nullptr</tt> will
159 * be returned. Even if a non-<tt>nullptr</tt> value is returned, its
160 * possible that the window’s alpha channel won’t be honored
161 * when displaying the window on the screen: in particular, for
162 * X an appropriate windowing manager and compositing manager
163 * must be running to provide appropriate display.
164 *
165 * This functionality is not implemented in the Windows backend.
166 *
167 * For setting an overall opacity for a top-level window, see
168 * Gdk::Window::set_opacity().
169 *
170 * @newin{2,8}
171 *
172 * @return A visual to use for windows
173 * with an alpha channel or <tt>nullptr</tt> if the capability is not
174 * available.
175 */
176 Glib::RefPtr<const Visual> get_rgba_visual() const;
177
178
179 /** Returns whether windows with an RGBA visual can reasonably
180 * be expected to have their alpha channel drawn correctly on
181 * the screen.
182 *
183 * On X11 this function returns whether a compositing manager is
184 * compositing @a screen.
185 *
186 * @newin{2,10}
187 *
188 * @return Whether windows with RGBA visuals can reasonably be
189 * expected to have their alpha channels drawn correctly on the screen.
190 */
191 bool is_composited() const;
192
193
194 /** Gets the root window of @a screen.
195 *
196 * @newin{2,2}
197 *
198 * @return The root window.
199 */
200 Glib::RefPtr<Window> get_root_window();
201
202 /** Gets the root window of @a screen.
203 *
204 * @newin{2,2}
205 *
206 * @return The root window.
207 */
208 Glib::RefPtr<const Window> get_root_window() const;
209
210
211 /** Gets the display to which the @a screen belongs.
212 *
213 * @newin{2,2}
214 *
215 * @return The display to which @a screen belongs.
216 */
217 Glib::RefPtr<Display> get_display();
218
219 /** Gets the display to which the @a screen belongs.
220 *
221 * @newin{2,2}
222 *
223 * @return The display to which @a screen belongs.
224 */
225 Glib::RefPtr<const Display> get_display() const;
226
227
228 #ifndef GDKMM_DISABLE_DEPRECATED
229
230 /** Gets the index of @a screen among the screens in the display
231 * to which it belongs. (See get_display())
232 *
233 * @newin{2,2}
234 *
235 * Deprecated: 3.22
236 *
237 * @deprecated No replacement available.
238 *
239 * @return The index.
240 */
241 int get_number() const;
242 #endif // GDKMM_DISABLE_DEPRECATED
243
244
245 #ifndef GDKMM_DISABLE_DEPRECATED
246
247 /** Gets the width of @a screen in pixels. The returned size is in
248 * ”application pixels”, not in ”device pixels” (see
249 * get_monitor_scale_factor()).
250 *
251 * @newin{2,2}
252 *
253 * Deprecated: 3.22: Use per-monitor information instead
254 *
255 * @deprecated Use per-monitor information instead.
256 *
257 * @return The width of @a screen in pixels.
258 */
259 int get_width() const;
260 #endif // GDKMM_DISABLE_DEPRECATED
261
262
263 #ifndef GDKMM_DISABLE_DEPRECATED
264
265 /** Gets the height of @a screen in pixels. The returned size is in
266 * ”application pixels”, not in ”device pixels” (see
267 * get_monitor_scale_factor()).
268 *
269 * @newin{2,2}
270 *
271 * Deprecated: 3.22: Use per-monitor information instead
272 *
273 * @deprecated Use per-monitor information instead.
274 *
275 * @return The height of @a screen in pixels.
276 */
277 int get_height() const;
278 #endif // GDKMM_DISABLE_DEPRECATED
279
280
281 #ifndef GDKMM_DISABLE_DEPRECATED
282
283 /** Gets the width of @a screen in millimeters.
284 *
285 * Note that this value is somewhat ill-defined when the screen
286 * has multiple monitors of different resolution. It is recommended
287 * to use the monitor dimensions instead.
288 *
289 * @newin{2,2}
290 *
291 * Deprecated: 3.22: Use per-monitor information instead
292 *
293 * @deprecated Use per-monitor information instead.
294 *
295 * @return The width of @a screen in millimeters.
296 */
297 int get_width_mm() const;
298 #endif // GDKMM_DISABLE_DEPRECATED
299
300
301 #ifndef GDKMM_DISABLE_DEPRECATED
302
303 /** Returns the height of @a screen in millimeters.
304 *
305 * Note that this value is somewhat ill-defined when the screen
306 * has multiple monitors of different resolution. It is recommended
307 * to use the monitor dimensions instead.
308 *
309 * Deprecated: 3.22: Use per-monitor information instead
310 *
311 * @newin{2,2}
312 *
313 * @deprecated Use per-monitor information instead.
314 *
315 * @return The heigth of @a screen in millimeters.
316 */
317 int get_height_mm() const;
318 #endif // GDKMM_DISABLE_DEPRECATED
319
320
321 /** Lists the available visuals for the specified @a screen.
322 * A visual describes a hardware image data format.
323 * For example, a visual might support 24-bit color, or 8-bit color,
324 * and might expect pixels to be in a certain format.
325 * @newin{2,2}
326 *
327 * @return A list of visuals.
328 */
329 std::vector< Glib::RefPtr<Visual> > list_visuals();
330
331
332 /** Obtains a list of all toplevel windows known to GDK on the screen @a screen.
333 * A toplevel window is a child of the root window (see
334 * gdk_get_default_root_window()).
335 * @newin{2,2}
336 *
337 * @return List of toplevel windows.
338 */
339 std::vector< Glib::RefPtr<Window> > get_toplevel_windows();
340
341
342 #ifndef GDKMM_DISABLE_DEPRECATED
343
344 /** Determines the name to pass to Gdk::Display::open() to get
345 * a Gdk::Display with this screen as the default screen.
346 *
347 * @newin{2,2}
348 *
349 * Deprecated: 3.22
350 *
351 * @deprecated No replacement available.
352 *
353 * @return The name.
354 */
355 Glib::ustring make_display_name();
356 #endif // GDKMM_DISABLE_DEPRECATED
357
358
359 #ifndef GDKMM_DISABLE_DEPRECATED
360
361 /** Returns the number of monitors which @a screen consists of.
362 *
363 * @newin{2,2}
364 *
365 * Deprecated: 3.22: Use Gdk::Display::get_n_monitors() instead
366 *
367 * @deprecated Use Gdk::Display::get_n_monitors() instead.
368 *
369 * @return Number of monitors which @a screen consists of.
370 */
371 int get_n_monitors() const;
372 #endif // GDKMM_DISABLE_DEPRECATED
373
374
375 #ifndef GDKMM_DISABLE_DEPRECATED
376
377 /** Gets the primary monitor for @a screen. The primary monitor
378 * is considered the monitor where the “main desktop” lives.
379 * While normal application windows typically allow the window
380 * manager to place the windows, specialized desktop applications
381 * such as panels should place themselves on the primary monitor.
382 *
383 * If no primary monitor is configured by the user, the return value
384 * will be 0, defaulting to the first monitor.
385 *
386 * @newin{2,20}
387 *
388 * Deprecated: 3.22: Use Gdk::Display::get_primary_monitor() instead
389 *
390 * @deprecated Use Gdk::Display::get_primary_monitor() instead.
391 *
392 * @return An integer index for the primary monitor, or 0 if none is configured.
393 */
394 int get_primary_monitor() const;
395 #endif // GDKMM_DISABLE_DEPRECATED
396
397
398 #ifndef GDKMM_DISABLE_DEPRECATED
399
400 /** Retrieves the Gdk::Rectangle representing the size and position of
401 * the individual monitor within the entire screen area. The returned
402 * geometry is in ”application pixels”, not in ”device pixels” (see
403 * get_monitor_scale_factor()).
404 *
405 * Monitor numbers start at 0. To obtain the number of monitors of
406 * @a screen, use get_n_monitors().
407 *
408 * Note that the size of the entire screen area can be retrieved via
409 * get_width() and get_height().
410 *
411 * @newin{2,2}
412 *
413 * Deprecated: 3.22: Use Gdk::Monitor::get_geometry() instead
414 *
415 * @deprecated Use Gdk::Monitor::get_geometry() instead.
416 *
417 * @param monitor_num The monitor number.
418 * @param dest A Gdk::Rectangle to be filled with
419 * the monitor geometry.
420 */
421 void get_monitor_geometry(int monitor_num, Rectangle& dest) const;
422 #endif // GDKMM_DISABLE_DEPRECATED
423
424
425 #ifndef GDKMM_DISABLE_DEPRECATED
426
427 /** Retrieves the Gdk::Rectangle representing the size and position of
428 * the "work area" on a monitor within the entire screen area.
429 *
430 * The work area should be considered when positioning menus and
431 * similar popups, to avoid placing them below panels, docks or other
432 * desktop components.
433 *
434 * Monitor numbers start at 0. To obtain the number of monitors of
435 * @a screen, use get_n_monitors().
436 *
437 * @newin{3,6}
438 * @deprecated Use Gdk::Monitor::get_workarea() instead.
439 *
440 * @param monitor_num The monitor number.
441 * @result The monitor workarea.
442 */
443 Rectangle get_monitor_workarea(int monitor_num = 0) const;
444 #endif // GDKMM_DISABLE_DEPRECATED
445
446
447 #ifndef GDKMM_DISABLE_DEPRECATED
448
449 /** Returns the monitor number in which the point ( @a x, @a y) is located.
450 *
451 * @newin{2,2}
452 *
453 * Deprecated: 3.22: Use Gdk::Display::get_monitor_at_point() instead
454 *
455 * @deprecated Use Gdk::Display::get_monitor_at_point() instead.
456 *
457 * @param x The x coordinate in the virtual screen.
458 * @param y The y coordinate in the virtual screen.
459 * @return The monitor number in which the point ( @a x, @a y) lies, or
460 * a monitor close to ( @a x, @a y) if the point is not in any monitor.
461 */
462 int get_monitor_at_point(int x, int y) const;
463 #endif // GDKMM_DISABLE_DEPRECATED
464
465
466 #ifndef GDKMM_DISABLE_DEPRECATED
467
468 /** Returns the number of the monitor in which the largest area of the
469 * bounding rectangle of @a window resides.
470 *
471 * @newin{2,2}
472 *
473 * Deprecated: 3.22: Use Gdk::Display::get_monitor_at_window() instead
474 *
475 * @deprecated Use Gdk::Display::get_monitor_at_window() instead.
476 *
477 * @param window A Gdk::Window.
478 * @return The monitor number in which most of @a window is located,
479 * or if @a window does not intersect any monitors, a monitor,
480 * close to @a window.
481 */
482 int get_monitor_at_window(const Glib::RefPtr<Window>& window) const;
483 #endif // GDKMM_DISABLE_DEPRECATED
484
485
486 #ifndef GDKMM_DISABLE_DEPRECATED
487
488 /** Gets the width in millimeters of the specified monitor, if available.
489 *
490 * @newin{2,14}
491 *
492 * Deprecated: 3.22: Use Gdk::Monitor::get_width_mm() instead
493 *
494 * @deprecated Use Gdk::Monitor::get_width_mm() instead.
495 *
496 * @param monitor_num Number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).
497 * @return The width of the monitor, or -1 if not available.
498 */
499 int get_monitor_width_mm(int monitor_num) const;
500 #endif // GDKMM_DISABLE_DEPRECATED
501
502
503 #ifndef GDKMM_DISABLE_DEPRECATED
504
505 /** Gets the height in millimeters of the specified monitor.
506 *
507 * @newin{2,14}
508 *
509 * Deprecated: 3.22: Use Gdk::Monitor::get_height_mm() instead
510 *
511 * @deprecated Use Gdk::Monitor::get_height_mm() instead.
512 *
513 * @param monitor_num Number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).
514 * @return The height of the monitor, or -1 if not available.
515 */
516 int get_monitor_height_mm(int monitor_num) const;
517 #endif // GDKMM_DISABLE_DEPRECATED
518
519
520 #ifndef GDKMM_DISABLE_DEPRECATED
521
522 /** Returns the output name of the specified monitor.
523 * Usually something like VGA, DVI, or TV, not the actual
524 * product name of the display device.
525 *
526 * @newin{2,14}
527 *
528 * Deprecated: 3.22: Use Gdk::Monitor::get_model() instead
529 *
530 * @deprecated Use Gdk::Monitor::get_model() instead.
531 *
532 * @param monitor_num Number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).
533 * @return A newly-allocated string containing the name
534 * of the monitor, or <tt>nullptr</tt> if the name cannot be determined.
535 */
536 Glib::ustring get_monitor_plug_name(int monitor_num) const;
537 #endif // GDKMM_DISABLE_DEPRECATED
538
539
540 #ifndef GDKMM_DISABLE_DEPRECATED
541
542 /** Returns the internal scale factor that maps from monitor coordinates
543 * to the actual device pixels. On traditional systems this is 1, but
544 * on very high density outputs this can be a higher value (often 2).
545 *
546 * This can be used if you want to create pixel based data for a
547 * particular monitor, but most of the time you’re drawing to a window
548 * where it is better to use Gdk::Window::get_scale_factor() instead.
549 *
550 * @newin{3,10}
551 *
552 * Deprecated: 3.22: Use Gdk::Monitor::get_scale_factor() instead
553 *
554 * @deprecated Use Gdk::Monitor::get_scale_factor() instead.
555 *
556 * @param monitor_num Number of the monitor, between 0 and gdk_screen_get_n_monitors (screen).
557 * @return The scale factor.
558 */
559 int get_monitor_scale_factor(int monitor_num);
560 #endif // GDKMM_DISABLE_DEPRECATED
561
562
563 /** Gets the default screen for the default display. (See
564 * Gdk::Display::get_default()).
565 *
566 * @newin{2,2}
567 *
568 * @return A Gdk::Screen, or <tt>nullptr</tt> if
569 * there is no default display.
570 */
571 static Glib::RefPtr<Screen> get_default();
572
573 template <class ValueType>
574 bool get_setting(const Glib::ustring& name, ValueType& value) const;
575
576
577 /** Sets the default font options for the screen. These
578 * options will be set on any Pango::Context’s newly created
579 * with gdk_pango_context_get_for_screen(). Changing the
580 * default set of font options does not affect contexts that
581 * have already been created.
582 *
583 * @newin{2,10}
584 *
585 * @param options A #cairo_font_options_t, or <tt>nullptr</tt> to unset any
586 * previously set default font options.
587 */
588 void set_font_options(const ::Cairo::FontOptions& options);
589
590 // Note: This returns a const, so we assume that we must copy it:
591
592
593 /** Gets any options previously set with set_font_options().
594 *
595 * @newin{2,10}
596 *
597 * @return The current font options, or <tt>nullptr</tt> if no
598 * default font options have been set.
599 */
600 ::Cairo::FontOptions get_font_options() const;
601
602
603 /** Sets the resolution for font handling on the screen. This is a
604 * scale factor between points specified in a Pango::FontDescription
605 * and cairo units. The default value is 96, meaning that a 10 point
606 * font will be 13 units high. (10 * 96. / 72. = 13.3).
607 *
608 * @newin{2,10}
609 *
610 * @param dpi The resolution in “dots per inch”. (Physical inches aren’t actually
611 * involved; the terminology is conventional.).
612 */
613 void set_resolution(double dpi);
614
615 /** Gets the resolution for font handling on the screen; see
616 * set_resolution() for full details.
617 *
618 * @newin{2,10}
619 *
620 * @return The current resolution, or -1 if no resolution
621 * has been set.
622 */
623 double get_resolution() const;
624
625
626 #ifndef GDKMM_DISABLE_DEPRECATED
627
628 /** Returns the screen’s currently active window.
629 *
630 * On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
631 * on the root window, as described in the
632 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
633 * If there is no currently currently active
634 * window, or the window manager does not support the
635 * _NET_ACTIVE_WINDOW hint, this function returns <tt>nullptr</tt>.
636 *
637 * On other platforms, this function may return <tt>nullptr</tt>, depending on whether
638 * it is implementable on that platform.
639 *
640 * The returned window should be unrefed using Glib::object_unref() when
641 * no longer needed.
642 *
643 * @newin{2,10}
644 *
645 * Deprecated: 3.22
646 *
647 * @deprecated No replacement available.
648 *
649 * @return The currently active window,
650 * or <tt>nullptr</tt>.
651 */
652 Glib::RefPtr<Gdk::Window> get_active_window();
653 #endif // GDKMM_DISABLE_DEPRECATED
654
655
656 #ifndef GDKMM_DISABLE_DEPRECATED
657
658 /** Returns the screen’s currently active window.
659 *
660 * On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property
661 * on the root window, as described in the
662 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
663 * If there is no currently currently active
664 * window, or the window manager does not support the
665 * _NET_ACTIVE_WINDOW hint, this function returns <tt>nullptr</tt>.
666 *
667 * On other platforms, this function may return <tt>nullptr</tt>, depending on whether
668 * it is implementable on that platform.
669 *
670 * The returned window should be unrefed using Glib::object_unref() when
671 * no longer needed.
672 *
673 * @newin{2,10}
674 *
675 * Deprecated: 3.22
676 *
677 * @deprecated No replacement available.
678 *
679 * @return The currently active window,
680 * or <tt>nullptr</tt>.
681 */
682 Glib::RefPtr<const Gdk::Window> get_active_window() const;
683 #endif // GDKMM_DISABLE_DEPRECATED
684
685
686 /** Returns a List of Gdk::Windows representing the current
687 * window stack.
688 *
689 * On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING
690 * property on the root window, as described in the
691 * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec).
692 * If the window manager does not support the
693 * _NET_CLIENT_LIST_STACKING hint, this function returns <tt>nullptr</tt>.
694 *
695 * On other platforms, this function may return <tt>nullptr</tt>, depending on whether
696 * it is implementable on that platform.
697 *
698 * @newin{2,10}
699 *
700 * @return A
701 * list of Gdk::Windows for the current window stack, or <tt>nullptr</tt>.
702 */
703 std::vector< Glib::RefPtr<Window> > get_window_stack();
704
705 //We use no_default_handler because GdkDisplayManagerClass is private.
706
707
708 /**
709 * @par Slot Prototype:
710 * <tt>void on_my_%size_changed()</tt>
711 *
712 * Flags: Run Last
713 *
714 * The signal_size_changed() signal is emitted when the pixel width or
715 * height of a screen changes.
716 *
717 * @newin{2,2}
718 */
719
720 Glib::SignalProxy< void > signal_size_changed();
721
722
723 /**
724 * @par Slot Prototype:
725 * <tt>void on_my_%composited_changed()</tt>
726 *
727 * Flags: Run Last
728 *
729 * The signal_composited_changed() signal is emitted when the composited
730 * status of the screen changes
731 *
732 * @newin{2,10}
733 */
734
735 Glib::SignalProxy< void > signal_composited_changed();
736
737
738 /**
739 * @par Slot Prototype:
740 * <tt>void on_my_%monitors_changed()</tt>
741 *
742 * Flags: Run Last
743 *
744 * The signal_monitors_changed() signal is emitted when the number, size
745 * or position of the monitors attached to the screen change.
746 *
747 * Only for X11 and OS X for now. A future implementation for Win32
748 * may be a possibility.
749 *
750 * @newin{2,14}
751 */
752
753 Glib::SignalProxy< void > signal_monitors_changed();
754
755
756 /** The default font options for the screen.
757 *
758 * @return A PropertyProxy that allows you to get or set the value of the property,
759 * or receive notification when the value of the property changes.
760 */
761 Glib::PropertyProxy< ::Cairo::FontOptions > property_font_options() ;
762
763 /** The default font options for the screen.
764 *
765 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
766 * or receive notification when the value of the property changes.
767 */
768 Glib::PropertyProxy_ReadOnly< ::Cairo::FontOptions > property_font_options() const;
769
770 /** The resolution for fonts on the screen.
771 *
772 * Default value: -1
773 *
774 * @return A PropertyProxy that allows you to get or set the value of the property,
775 * or receive notification when the value of the property changes.
776 */
777 Glib::PropertyProxy< double > property_resolution() ;
778
779 /** The resolution for fonts on the screen.
780 *
781 * Default value: -1
782 *
783 * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
784 * or receive notification when the value of the property changes.
785 */
786 Glib::PropertyProxy_ReadOnly< double > property_resolution() const;
787
788
789 public:
790
791 public:
792 //C++ methods used to invoke GTK+ virtual functions:
793
794 protected:
795 //GTK+ Virtual Functions (override these to change behaviour):
796
797 //Default Signal Handlers::
798
799
800 };
801
802 template <class ValueType>
get_setting(const Glib::ustring & name,ValueType & value)803 bool Screen::get_setting(const Glib::ustring& name, ValueType& value) const
804 {
805 Glib::Value<ValueType> glibmmvalue;
806 glibmmvalue.init(Glib::Value<ValueType>::value_type());
807
808 gboolean result = gdk_screen_get_setting(const_cast<GdkScreen*>(gobj()), name.c_str(), glibmmvalue.gobj());
809
810 value = glibmmvalue.get();
811 return result;
812 }
813
814 } // namespace Gdk
815
816
817 namespace Glib
818 {
819 /** A Glib::wrap() method for this object.
820 *
821 * @param object The C instance.
822 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
823 * @result A C++ instance that wraps this C instance.
824 *
825 * @relates Gdk::Screen
826 */
827 Glib::RefPtr<Gdk::Screen> wrap(GdkScreen* object, bool take_copy = false);
828 }
829
830
831 #endif /* _GDKMM_SCREEN_H */
832
833