Reference Manual

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

# display.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_H
    00025 #define INTI_GDK_DISPLAY_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 Device;
    00044 class DisplayClass;
    00045 class Event;
    00046 class Screen;
    00047 class Window;
    00048
    00061
    00062 class Display : public G::Object
    00063 {
    00064         friend class G::Object;
    00065         friend class DisplayClass;
    00066
    00067         Display(const Display&);
    00068         Display& operator=(const Display&);
    00069
    00070 protected:
    00073
    00074         explicit Display(GdkDisplay *display, bool reference = true);
    00081
    00085
    00086         virtual void on_closed(bool is_error);
    00089
    00091 //  Signals
    00092
    00093         typedef G::Signal1<void, bool> ClosedSignalType;
    00094         typedef G::SignalProxy<TypeInstance, ClosedSignalType> ClosedSignalProxy;
    00095         static const ClosedSignalType closed_signal;
    00096
    00097 public:
    00098         typedef Slot2<FilterReturn, GdkXEvent*, GdkEvent*> FilterSlot;
    00112
    00115
    00116         virtual ~Display();
    00118
    00120
    00121         static Display* get_default();
    00124
    00125         static Display* open(const String& display_name);
    00129
    00132
    00133         GdkDisplay* gdk_display() const { return (GdkDisplay*)instance; }
    00135
    00136         GdkDisplayClass* gdk_display_class() const;
    00138
    00139         operator GdkDisplay* () const;
    00141
    00142         String get_name() const;
    00145
    00146         int get_n_screens() const;
    00149
    00150         Screen* get_screen(int screen_num) const;
    00154
    00155         Screen* get_default_screen() const;
    00158
    00159         bool pointer_is_grabbed() const;
    00162
    00163         bool list_devices(std::vector<Device*>& devices) const;
    00169
    00170         Device* get_core_pointer() const;
    00173
    00174         void get_pointer(Screen **screen, int *x, int *y, ModifierType *mask = 0) const;
    00180
    00181         void get_pointer(Screen **screen, Point *point, ModifierType *mask = 0) const;
    00186
    00187         Point get_pointer(Screen **screen = 0, ModifierType *mask = 0) const;
    00192
    00193         Window* get_window_at_pointer(int *win_x, int *win_y) const;
    00202
    00203         Window* get_window_at_pointer(Point *win_origin) const;
    00211
    00215
    00216         void pointer_ungrab(unsigned int time);
    00219
    00220         void keyboard_ungrab(unsigned int time);
    00223
    00224         void beep();
    00226
    00227         void sync();
    00235
    00236         void close();
    00239
    00240         Pointer<Event> get_event();
    00244
    00245         Pointer<Event> peek_event();
    00252
    00253         void put_event(const Gdk::Event& event);
    00256
    00257         void add_client_message_filter(Atom message_type, const FilterSlot *filter);
    00262
    00263         void set_double_click_time(unsigned int msec);
    00269
    00273
    00274         const ClosedSignalProxy sig_closed()
    00275         {
    00276                 return ClosedSignalProxy(this, &closed_signal);
    00277         }
    00279
    00281 };
    00282
    00283 } // namespace Gdk
    00284
    00285 } // namespace Inti
    00286
    00287 #endif // INTI_GDK_DISPLAY_H
    00288

Main Page - Footer