Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gdk / gdkmm / displaymanager.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GDKMM_DISPLAYMANAGER_H
4 #define _GDKMM_DISPLAYMANAGER_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* displaymanager.h
12  *
13  * Copyright (C) 2002 The gtkmm Development Team
14  *
15  * This library is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU Library General Public
17  * License as published by the Free Software Foundation; either
18  * version 2 of the License, or (at your option) any later version.
19  *
20  * This library is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  * Library General Public License for more details.
24  *
25  * You should have received a copy of the GNU Library General Public
26  * License along with this library; if not, write to the Free
27  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28  */
29
30 #include <glibmm/object.h>
31 #include <gdkmm/display.h>
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GdkDisplayManager GdkDisplayManager;
36 typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 namespace Gdk
41 { class DisplayManager_Class; } // namespace Gdk
42 namespace Gdk
43 {
44
45 /** The purpose of the GdkDisplayManager singleton object is to offer notification when displays appear or disappear or the
46  * default display changes.
47  */
48
49 class DisplayManager : public Glib::Object
50 {
51   
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53
54 public:
55   typedef DisplayManager CppObjectType;
56   typedef DisplayManager_Class CppClassType;
57   typedef GdkDisplayManager BaseObjectType;
58   typedef GdkDisplayManagerClass BaseClassType;
59
60 private:  friend class DisplayManager_Class;
61   static CppClassType displaymanager_class_;
62
63 private:
64   // noncopyable
65   DisplayManager(const DisplayManager&);
66   DisplayManager& operator=(const DisplayManager&);
67
68 protected:
69   explicit DisplayManager(const Glib::ConstructParams& construct_params);
70   explicit DisplayManager(GdkDisplayManager* castitem);
71
72 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
73
74 public:
75   virtual ~DisplayManager();
76
77 #ifndef DOXYGEN_SHOULD_SKIP_THIS
78   static GType get_type()      G_GNUC_CONST;
79   static GType get_base_type() G_GNUC_CONST;
80 #endif
81
82   ///Provides access to the underlying C GObject.
83   GdkDisplayManager*       gobj()       { return reinterpret_cast<GdkDisplayManager*>(gobject_); }
84
85   ///Provides access to the underlying C GObject.
86   const GdkDisplayManager* gobj() const { return reinterpret_cast<GdkDisplayManager*>(gobject_); }
87
88   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
89   GdkDisplayManager* gobj_copy();
90
91 private:
92
93 protected:
94
95 public:
96
97   
98   /** 
99    * @return The singleton Gdk::DisplayManager object.
100    * the global Gdk::DisplayManager singleton; gdk_parse_pargs(),
101    * gdk_init(), or gdk_init_check() must have been called first.
102    * 
103    * @newin2p2.
104    */
105   static Glib::RefPtr<DisplayManager> get();
106   
107   /** Gets the default Gdk::Display.
108    * @return A Gdk::Display, or <tt>0</tt> if there is no default
109    * display.
110    * 
111    * @newin2p2.
112    */
113   Glib::RefPtr<Display> get_default_display();
114   
115   /** Gets the default Gdk::Display.
116    * @return A Gdk::Display, or <tt>0</tt> if there is no default
117    * display.
118    * 
119    * @newin2p2.
120    */
121   Glib::RefPtr<const Display> get_default_display() const;
122
123   
124   /** Sets @a display  as the default display.
125    * 
126    * @newin2p2
127    * @param display A Gdk::Display.
128    */
129   void set_default_display(const Glib::RefPtr<Display>& display);
130
131   
132   /** List all currently open displays.
133    * 
134    *  @a newin2p2 
135    * @return A list of Gdk::Display objects.
136    */
137   Glib::SListHandle< Glib::RefPtr<Display> > list_displays();
138
139   #ifdef GLIBMM_PROPERTIES_ENABLED
140 /** The default display for GDK.
141    *
142    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
143    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
144    * the value of the property changes.
145    */
146   Glib::PropertyProxy< Glib::RefPtr<Display> > property_default_display() ;
147 #endif //#GLIBMM_PROPERTIES_ENABLED
148
149 #ifdef GLIBMM_PROPERTIES_ENABLED
150 /** The default display for GDK.
151    *
152    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
153    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
154    * the value of the property changes.
155    */
156   Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > property_default_display() const;
157 #endif //#GLIBMM_PROPERTIES_ENABLED
158
159   
160   /** The display_opened signal is emitted when a display is opened.
161    *
162    * @newin2p2
163    *
164    * @param display the opened display
165    *
166    * @par Prototype:
167    * <tt>void on_my_%display_opened(const Glib::RefPtr<Display>& display)</tt>
168    */
169
170   Glib::SignalProxy1< void,const Glib::RefPtr<Display>& > signal_display_opened();
171
172
173 public:
174
175 public:
176   //C++ methods used to invoke GTK+ virtual functions:
177 #ifdef GLIBMM_VFUNCS_ENABLED
178 #endif //GLIBMM_VFUNCS_ENABLED
179
180 protected:
181   //GTK+ Virtual Functions (override these to change behaviour):
182 #ifdef GLIBMM_VFUNCS_ENABLED
183 #endif //GLIBMM_VFUNCS_ENABLED
184
185   //Default Signal Handlers::
186 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
187   virtual void on_display_opened(const Glib::RefPtr<Display>& display);
188 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
189
190
191 };
192
193 } /* namespace Gdk */
194
195
196 namespace Glib
197 {
198   /** A Glib::wrap() method for this object.
199    * 
200    * @param object The C instance.
201    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
202    * @result A C++ instance that wraps this C instance.
203    *
204    * @relates Gdk::DisplayManager
205    */
206   Glib::RefPtr<Gdk::DisplayManager> wrap(GdkDisplayManager* object, bool take_copy = false);
207 }
208
209
210 #endif /* _GDKMM_DISPLAYMANAGER_H */
211