Ardour  9.0-pre0-350-gf17a656217
screen.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_SCREEN_H
4 #define _GDKMM_SCREEN_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: screen.hg,v 1.8 2006/06/10 15:26:24 murrayc Exp $ */
11 
12 /* screen.h
13  *
14  * Copyright (C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 //#include <gdkmm/visual.h>
32 //#include <gdkmm/window.h>
33 #include <gdkmm/region.h> //Just to solve GDK_DISABLE_DEPRECATED problems when this header is included from elsewhere.
34 #include <gdkmm/rectangle.h>
35 #include <glibmm/object.h>
36 #include <cairomm/fontoptions.h>
37 
38 
39 #ifndef DOXYGEN_SHOULD_SKIP_THIS
40 typedef struct _GdkScreen GdkScreen;
41 typedef struct _GdkScreenClass GdkScreenClass;
42 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
43 
44 
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 namespace Gdk
47 { class Screen_Class; } // namespace Gdk
48 #endif //DOXYGEN_SHOULD_SKIP_THIS
49 
50 namespace Gdk
51 {
52 
53 class Display;
54 class Colormap;
55 class Visual;
56 class Window;
57 
65 class Screen : public Glib::Object
66 {
67 
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
69 
70 public:
71  typedef Screen CppObjectType;
72  typedef Screen_Class CppClassType;
73  typedef GdkScreen BaseObjectType;
74  typedef GdkScreenClass BaseClassType;
75 
76 private: friend class Screen_Class;
77  static CppClassType screen_class_;
78 
79 private:
80  // noncopyable
81  Screen(const Screen&);
82  Screen& operator=(const Screen&);
83 
84 protected:
85  explicit Screen(const Glib::ConstructParams& construct_params);
86  explicit Screen(GdkScreen* castitem);
87 
88 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
89 
90 public:
91  virtual ~Screen();
92 
95  static GType get_type() G_GNUC_CONST;
96 
97 #ifndef DOXYGEN_SHOULD_SKIP_THIS
98 
99 
100  static GType get_base_type() G_GNUC_CONST;
101 #endif
102 
104  GdkScreen* gobj() { return reinterpret_cast<GdkScreen*>(gobject_); }
105 
107  const GdkScreen* gobj() const { return reinterpret_cast<GdkScreen*>(gobject_); }
108 
111 
112 private:
113 
114 protected:
115 
116 public:
117 
122  Glib::RefPtr<Colormap> get_default_colormap();
123 
128  Glib::RefPtr<const Colormap> get_default_colormap() const;
129 
130 
135  void set_default_colormap(const Glib::RefPtr<const Colormap>& colormap);
136 
141  Glib::RefPtr<Colormap> get_system_colormap();
142 
147  Glib::RefPtr<const Colormap> get_system_colormap() const;
148 
149 
156  Glib::RefPtr<Visual> get_system_visual();
157 
164  Glib::RefPtr<const Visual> get_system_visual() const;
165 
166 
177  Glib::RefPtr<Colormap> get_rgb_colormap();
178 
189  Glib::RefPtr<const Colormap> get_rgb_colormap() const;
190 
191 
203  Glib::RefPtr<Visual> get_rgb_visual();
204 
216  Glib::RefPtr<const Visual> get_rgb_visual() const;
217 
218 
236  Glib::RefPtr<Colormap> get_rgba_colormap();
237 
255  Glib::RefPtr<const Colormap> get_rgba_colormap() const;
256 
257 
265  Glib::RefPtr<Visual> get_rgba_visual();
266 
274  Glib::RefPtr<const Visual> get_rgba_visual() const;
275 
276 
287  bool is_composited() const;
288 
289 
294  Glib::RefPtr<Window> get_root_window();
295 
300  Glib::RefPtr<const Window> get_root_window() const;
301 
302 
307  Glib::RefPtr<Display> get_display();
308 
313  Glib::RefPtr<const Display> get_display() const;
314 
315 
321  int get_number() const;
322 
327  int get_width() const;
328 
333  int get_height() const;
334 
340  int get_width_mm() const;
341 
347  int get_height_mm() const;
348 
349 
356  Glib::ListHandle< Glib::RefPtr<Visual> > list_visuals();
357 
358 
364  Glib::ListHandle< Glib::RefPtr<Window> > get_toplevel_windows();
365 
366 
372  Glib::ustring make_display_name();
373 
374 
379  int get_n_monitors() const;
380 
392  int get_primary_monitor() const;
393 
403  void get_monitor_geometry(int monitor_num, Rectangle& dest) const;
404 
412  int get_monitor_at_point(int x, int y) const;
413 
422  int get_monitor_at_window(const Glib::RefPtr<Window>& window) const;
423 
424 
430  int get_monitor_width_mm(int monitor_num) const;
431 
437  int get_monitor_height_mm(int monitor_num) const;
438 
447  Glib::ustring get_monitor_plug_name(int monitor_num) const;
448 
449 
465 
466 
472  static Glib::RefPtr<Screen> get_default();
473 
474  template <class ValueType>
475  bool get_setting(const Glib::ustring& name, ValueType& value) const;
476 
477 
487  void set_font_options(const Cairo::FontOptions& options);
488 
489  // Note: This returns a const, so we assume that we must copy it:
490 
491 
497  Cairo::FontOptions get_font_options() const;
498 
499 
508  void set_resolution(double dpi);
509 
516  double get_resolution() const;
517 
518 
535  Glib::RefPtr<Gdk::Window> get_active_window();
536 
553  Glib::RefPtr<const Gdk::Window> get_active_window() const;
554 
555 
574  Glib::ListHandle< Glib::RefPtr<Window> > get_window_stack();
575 
576 
585  Glib::SignalProxy0< void > signal_size_changed();
586 
587 
588  //TODO: Remove no_default_handler when we can break ABI:
589 
596  Glib::SignalProxy0< void > signal_composited_changed();
597 
598 
605  Glib::SignalProxy0< void > signal_monitors_changed();
606 
612  Glib::PropertyProxy< Cairo::FontOptions > property_font_options() ;
613 
619  Glib::PropertyProxy_ReadOnly< Cairo::FontOptions > property_font_options() const;
620 
626  Glib::PropertyProxy< double > property_resolution() ;
627 
633  Glib::PropertyProxy_ReadOnly< double > property_resolution() const;
634 
635 
636 public:
637 
638 public:
639  //C++ methods used to invoke GTK+ virtual functions:
640 
641 protected:
642  //GTK+ Virtual Functions (override these to change behaviour):
643 
644  //Default Signal Handlers::
646  virtual void on_size_changed();
647 
648 
649 };
650 
651 template <class ValueType>
652 bool Screen::get_setting(const Glib::ustring& name, ValueType& value) const
653 {
654  Glib::Value<ValueType> glibmmvalue;
655  glibmmvalue.init(Glib::Value<ValueType>::value_type());
656 
657  gboolean result = gdk_screen_get_setting(const_cast<GdkScreen*>(gobj()), name.c_str(), glibmmvalue.gobj());
658 
659  value = glibmmvalue.get();
660  return result;
661 }
662 
663 } /* namespace Gdk */
664 
665 
666 namespace Glib
667 {
676  Glib::RefPtr<Gdk::Screen> wrap(GdkScreen* object, bool take_copy = false);
677 }
678 
679 
680 #endif /* _GDKMM_SCREEN_H */
681 
bool get_setting(const Glib::ustring &name, ValueType &value) const
Definition: screen.h:652
Glib::RefPtr< Window > get_root_window()
Glib::PropertyProxy< Cairo::FontOptions > property_font_options()
Glib::RefPtr< Display > get_display()
double get_resolution() const
Glib::RefPtr< Gdk::Window > get_active_window()
Glib::RefPtr< Visual > get_rgba_visual()
Glib::SignalProxy0< void > signal_monitors_changed()
int get_width() const
int get_width_mm() const
int get_primary_monitor() const
Glib::SignalProxy0< void > signal_composited_changed()
Glib::RefPtr< Gdk::Screen > wrap(GdkScreen *object, bool take_copy=false)
Glib::RefPtr< const Colormap > get_rgb_colormap() const
Glib::PropertyProxy< double > property_resolution()
int get_height() const
GdkScreen * gobj()
Provides access to the underlying C GObject.
Definition: screen.h:104
virtual void on_size_changed()
This is a default handler for the signal signal_size_changed().
static GType get_type() G_GNUC_CONST
Glib::RefPtr< Visual > get_rgb_visual()
GdkScreen * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::RefPtr< const Window > get_root_window() const
Glib::RefPtr< Colormap > get_default_colormap()
Glib::RefPtr< const Colormap > get_rgba_colormap() const
virtual ~Screen()
void set_resolution(double dpi)
Glib::RefPtr< const Visual > get_rgba_visual() const
void set_default_colormap(const Glib::RefPtr< const Colormap > &colormap)
Glib::PropertyProxy_ReadOnly< Cairo::FontOptions > property_font_options() const
void get_monitor_geometry(int monitor_num, Rectangle &dest) const
int get_number() const
Glib::RefPtr< Colormap > get_system_colormap()
Glib::ListHandle< Glib::RefPtr< Window > > get_window_stack()
static Glib::RefPtr< Screen > get_default()
Glib::RefPtr< Colormap > get_rgba_colormap()
void broadcast_client_message(GdkEvent *event)
int get_monitor_height_mm(int monitor_num) const
void set_font_options(const Cairo::FontOptions &options)
Glib::ListHandle< Glib::RefPtr< Window > > get_toplevel_windows()
Glib::ListHandle< Glib::RefPtr< Visual > > list_visuals()
Glib::ustring make_display_name()
int get_monitor_at_window(const Glib::RefPtr< Window > &window) const
Glib::RefPtr< const Visual > get_rgb_visual() const
Glib::RefPtr< const Gdk::Window > get_active_window() const
int get_n_monitors() const
int get_monitor_width_mm(int monitor_num) const
Glib::ustring get_monitor_plug_name(int monitor_num) const
Glib::RefPtr< const Colormap > get_system_colormap() const
Glib::SignalProxy0< void > signal_size_changed()
Cairo::FontOptions get_font_options() const
Glib::RefPtr< const Colormap > get_default_colormap() const
const GdkScreen * gobj() const
Provides access to the underlying C GObject.
Definition: screen.h:107
int get_height_mm() const
bool is_composited() const
Glib::RefPtr< const Visual > get_system_visual() const
Glib::RefPtr< Colormap > get_rgb_colormap()
Glib::PropertyProxy_ReadOnly< double > property_resolution() const
Glib::RefPtr< const Display > get_display() const
int get_monitor_at_point(int x, int y) const
Glib::RefPtr< Visual > get_system_visual()
Definition: Window.h:41
typedefG_BEGIN_DECLS struct _GdkScreenClass GdkScreenClass
Definition: gdkscreen.h:37
gboolean gdk_screen_get_setting(GdkScreen *screen, const gchar *name, GValue *value)
GtkImageIconNameData name
Definition: gtkimage.h:6