Reference Manual

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

# screen.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2003 The Inti Development Team.
    00003  *  Copyright (C) 2000 Red Hat, Inc.
    00004  *
    00005  *  This program is free software; you can redistribute it and/or modify
    00006  *  it under the terms of the GNU General Public License as published by
    00007  *  the Free Software Foundation; either version 2 of the License, or
    00008  *  (at your option) any later version.
    00009  *
    00010  *  This program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00013  *  GNU Library General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU Library General Public License
    00016  *  along with this program; if not, write to the Free Software
    00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    00018  */
    00019
    00024
    00025 #ifndef INTI_GDK_SCREEN_H
    00026 #define INTI_GDK_SCREEN_H
    00027
    00028 #ifndef INTI_G_OBJECT_H
    00029 #include <inti/glib/object.h>
    00030 #endif
    00031
    00032 #ifndef INTI_GDK_TYPES
    00033 #include <inti/gdk/types.h>
    00034 #endif
    00035
    00036 #ifndef _CPP_VECTOR
    00037 #include <vector>
    00038 #endif
    00039
    00040 namespace Inti {
    00041
    00042 namespace G {
    00043 class Value;
    00044 }
    00045
    00046 namespace Gdk {
    00047
    00048 class Colormap;
    00049 class Display;
    00050 class Event;
    00051 class Rectangle;
    00052 class ScreenClass;
    00053 class Visual;
    00054 class Window;
    00055
    00064
    00065 class Screen : public G::Object
    00066 {
    00067         friend class G::Object;
    00068         friend class ScreenClass;
    00069
    00070         Screen(const Screen&);
    00071         Screen& operator=(const Screen&);
    00072
    00073 protected:
    00076
    00077         explicit Screen(GdkScreen *screen, bool reference = true);
    00084
    00088
    00089         virtual void on_size_changed();
    00091
    00093 //  Signals
    00094
    00095         typedef G::Signal0<void> SizeChangedSignalType;
    00096         typedef G::SignalProxy<TypeInstance, SizeChangedSignalType> SizeChangedSignalProxy;
    00097         static const SizeChangedSignalType size_changed_signal;
    00098
    00099 public:
    00102
    00103         virtual ~Screen();
    00105
    00107
    00108         static Screen* get_default();
    00111
    00114
    00115         GdkScreen* gdk_screen() const { return (GdkScreen*)instance; }
    00117
    00118         GdkScreenClass* gdk_screen_class() const;
    00120
    00121         operator GdkScreen* () const;
    00123
    00124         Colormap* get_default_colormap() const;
    00127
    00128         Colormap* get_system_colormap() const;
    00131
    00132         const Visual* get_system_visual() const;
    00138
    00139         Window* get_root_window() const;
    00142
    00143         Display* get_display() const;
    00145
    00146         int get_number() const;
    00149
    00150         int get_width() const;
    00153
    00154         int get_height() const;
    00157
    00158         int get_width_mm() const;
    00163
    00164         int get_height_mm() const;
    00169
    00170         bool list_visuals(std::vector<const Visual*>& visuals) const;
    00178
    00179         bool get_toplevels(std::vector<Window*>& toplevels) const;
    00185
    00186         String make_display_name() const;
    00190
    00191         int get_n_monitors() const;
    00195
    00196         void get_monitor_geometry(int monitor_num, Rectangle& dest) const;
    00204
    00205         Rectangle get_monitor_geometry(int monitor_num) const;
    00213
    00214         int get_monitor_at_point(int x, int y) const;
    00220
    00221         int get_monitor_at_point(const Point& point) const;
    00226
    00227         int get_monitor_at_window(const Window& window) const;
    00233
    00234         bool get_setting(const char *name, G::Value& value) const;
    00240
    00244
    00245         void set_default_colormap(Colormap& colormap);
    00248
    00249         void broadcast_client_message(Event& event);
    00257
    00261
    00262         const SizeChangedSignalProxy sig_size_changed()
    00263         {
    00264                 return SizeChangedSignalProxy(this, &size_changed_signal);
    00265         }
    00267
    00269 };
    00270
    00271 } // namespace Gdk
    00272
    00273 } // namespace Inti
    00274
    00275 #endif // INTI_GDK_SCREEN_H
    00276
    00277

Main Page - Footer