Main Page - Header
Author: The Inti Development Team

Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# displaymanager.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2003 The Inti Development Team.
    00003  *
    00004  *  This program is free software; you can redistribute it and/or modify
    00005  *  it under the terms of the GNU General Public License as published by
    00006  *  the Free Software Foundation; either version 2 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  This program is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Library General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Library General Public License
    00015  *  along with this program; if not, write to the Free Software
    00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00017  */
    00018
    00023
    00024 #ifndef INTI_GDK_DISPLAY_MANAGER_H
    00025 #define INTI_GDK_DISPLAY_MANAGER_H
    00026
    00027 #ifndef INTI_G_OBJECT_H
    00028 #include <inti/glib/object.h>
    00029 #endif
    00030
    00031 #ifndef INTI_GDK_TYPES
    00032 #include <inti/gdk/types.h>
    00033 #endif
    00034
    00035 #ifndef _CPP_VECTOR
    00036 #include <vector>
    00037 #endif
    00038
    00039 namespace Inti {
    00040
    00041 namespace Gdk {
    00042
    00043 class Display;
    00044 class DisplayManagerClass;
    00045
    00051
    00052 class DisplayManager : public G::Object
    00053 {
    00054         friend class G::Object;
    00055         friend class DisplayManagerClass;
    00056
    00057         DisplayManager(const DisplayManager&);
    00058         DisplayManager& operator=(const DisplayManager&);
    00059
    00060 protected:
    00063
    00064         explicit DisplayManager(GdkDisplayManager *display_manager, bool reference = true);
    00071
    00075
    00076         virtual void on_display_opened(Display& display);
    00079
    00081 //  Properties
    00082
    00083         typedef G::Property<Display*, G::Object*> DefaultDisplayPropertyType;
    00084         typedef G::PropertyProxy<G::Object, DefaultDisplayPropertyType> DefaultDisplayPropertyProxy;
    00085         static const DefaultDisplayPropertyType default_display_property;
    00086
    00087 //  Signals
    00088
    00089         typedef G::Signal1<void, GdkDisplay*> DisplayOpenedSignalType;
    00090         typedef G::SignalProxy<TypeInstance, DisplayOpenedSignalType> DisplayOpenedSignalProxy;
    00091         static const DisplayOpenedSignalType display_opened_signal;
    00092
    00093 public:
    00096
    00097         virtual ~DisplayManager();
    00099
    00101
    00102         static DisplayManager* get();
    00104
    00107
    00108         GdkDisplayManager* gdk_display_manager() const { return (GdkDisplayManager*)instance; }
    00110
    00111         GdkDisplayManagerClass* gdk_display_manager_class() const;
    00113
    00114         operator GdkDisplayManager* () const;
    00116
    00117         Display* get_default_display() const;
    00120
    00121         bool list_displays(std::vector<Display*>& displays) const;
    00125
    00129
    00130         void set_default_display(const Display& display);
    00133
    00137
    00138         const DefaultDisplayPropertyProxy prop_default_display()
    00139         {
    00140                 return DefaultDisplayPropertyProxy(this, &default_display_property);
    00141         }
    00143
    00147
    00148         const DisplayOpenedSignalProxy sig_display_opened()
    00149         {
    00150                 return DisplayOpenedSignalProxy(this, &display_opened_signal);
    00151         }
    00153
    00155 };
    00156
    00157 } // namespace Gdk
    00158
    00159 } // namespace Inti
    00160
    00161 #endif // INTI_GDK_DISPLAY_MANAGER_H
    00162

Main Page - Footer