2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GDKMM_DISPLAYMANAGER_H
4 #define _GDKMM_DISPLAYMANAGER_H
13 * Copyright (C) 2002 The gtkmm Development Team
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.
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.
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.
30 #include <glibmm/object.h>
31 #include <gdkmm/display.h>
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GdkDisplayManager GdkDisplayManager;
36 typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 { class DisplayManager_Class; } // namespace Gdk
45 /** The purpose of the GdkDisplayManager singleton object is to offer notification when displays appear or disappear or the
46 * default display changes.
49 class DisplayManager : public Glib::Object
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55 typedef DisplayManager CppObjectType;
56 typedef DisplayManager_Class CppClassType;
57 typedef GdkDisplayManager BaseObjectType;
58 typedef GdkDisplayManagerClass BaseClassType;
60 private: friend class DisplayManager_Class;
61 static CppClassType displaymanager_class_;
65 DisplayManager(const DisplayManager&);
66 DisplayManager& operator=(const DisplayManager&);
69 explicit DisplayManager(const Glib::ConstructParams& construct_params);
70 explicit DisplayManager(GdkDisplayManager* castitem);
72 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
75 virtual ~DisplayManager();
77 #ifndef DOXYGEN_SHOULD_SKIP_THIS
78 static GType get_type() G_GNUC_CONST;
79 static GType get_base_type() G_GNUC_CONST;
82 ///Provides access to the underlying C GObject.
83 GdkDisplayManager* gobj() { return reinterpret_cast<GdkDisplayManager*>(gobject_); }
85 ///Provides access to the underlying C GObject.
86 const GdkDisplayManager* gobj() const { return reinterpret_cast<GdkDisplayManager*>(gobject_); }
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();
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.
105 static Glib::RefPtr<DisplayManager> get();
107 /** Gets the default Gdk::Display.
108 * @return A Gdk::Display, or <tt>0</tt> if there is no default
113 Glib::RefPtr<Display> get_default_display();
115 /** Gets the default Gdk::Display.
116 * @return A Gdk::Display, or <tt>0</tt> if there is no default
121 Glib::RefPtr<const Display> get_default_display() const;
124 /** Sets @a display as the default display.
127 * @param display A Gdk::Display.
129 void set_default_display(const Glib::RefPtr<Display>& display);
132 /** List all currently open displays.
135 * @return A list of Gdk::Display objects.
137 Glib::SListHandle< Glib::RefPtr<Display> > list_displays();
139 #ifdef GLIBMM_PROPERTIES_ENABLED
140 /** The default display for GDK.
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.
146 Glib::PropertyProxy< Glib::RefPtr<Display> > property_default_display() ;
147 #endif //#GLIBMM_PROPERTIES_ENABLED
149 #ifdef GLIBMM_PROPERTIES_ENABLED
150 /** The default display for GDK.
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.
156 Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > property_default_display() const;
157 #endif //#GLIBMM_PROPERTIES_ENABLED
160 /** The display_opened signal is emitted when a display is opened.
164 * @param display the opened display
167 * <tt>void on_my_%display_opened(const Glib::RefPtr<Display>& display)</tt>
170 Glib::SignalProxy1< void,const Glib::RefPtr<Display>& > signal_display_opened();
176 //C++ methods used to invoke GTK+ virtual functions:
177 #ifdef GLIBMM_VFUNCS_ENABLED
178 #endif //GLIBMM_VFUNCS_ENABLED
181 //GTK+ Virtual Functions (override these to change behaviour):
182 #ifdef GLIBMM_VFUNCS_ENABLED
183 #endif //GLIBMM_VFUNCS_ENABLED
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
193 } /* namespace Gdk */
198 /** A Glib::wrap() method for this object.
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.
204 * @relates Gdk::DisplayManager
206 Glib::RefPtr<Gdk::DisplayManager> wrap(GdkDisplayManager* object, bool take_copy = false);
210 #endif /* _GDKMM_DISPLAYMANAGER_H */