GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

display.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2004 The GFC 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 GFC_GDK_DISPLAY_HH 00025 #define GFC_GDK_DISPLAY_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_GDK_TYPES_HH 00032 #include <gfc/gdk/types.hh> 00033 #endif 00034 00035 #ifndef _CPP_VECTOR 00036 #include <vector> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Gdk { 00042 00043 class Device; 00044 class Event; 00045 class Screen; 00046 class Window; 00047 00060 00061 class Display : public G::Object 00062 { 00063 friend class G::Object; 00064 00065 Display(const Display&); 00066 Display& operator=(const Display&); 00067 00068 protected: 00071 00072 explicit Display(GdkDisplay *display, bool owns_reference = true); 00079 00083 00084 typedef G::Signal<void, bool> ClosedSignalType; 00085 typedef G::SignalProxy<TypeInstance, ClosedSignalType> ClosedSignalProxy; 00086 static const ClosedSignalType closed_signal; 00092 00094 00095 public: 00098 00099 virtual ~Display(); 00101 00103 00104 static Display* get_default(); 00107 00108 static Display* open(const char *display_name); 00109 static Display* open(const String& display_name); 00113 00116 00117 GdkDisplay* gdk_display() const; 00119 00120 operator GdkDisplay* () const; 00122 00123 String get_name() const; 00126 00127 int get_n_screens() const; 00130 00131 Screen* get_screen(int screen_num) const; 00135 00136 Screen* get_default_screen() const; 00139 00140 bool pointer_is_grabbed() const; 00143 00144 bool list_devices(std::vector<Device*>& devices) const; 00150 00151 Device* get_core_pointer() const; 00154 00155 void get_pointer(Screen **screen, int *x, int *y, ModifierType *mask = 0) const; 00161 00162 void get_pointer(Screen **screen, Point *point, ModifierType *mask = 0) const; 00167 00168 Point get_pointer(Screen **screen = 0, ModifierType *mask = 0) const; 00173 00174 Window* get_window_at_pointer(int *win_x, int *win_y) const; 00183 00184 Window* get_window_at_pointer(Point *win_origin) const; 00192 00193 bool supports_cursor_alpha() const; 00197 00198 bool supports_cursor_color() const; 00204 00205 unsigned int get_default_cursor_size() const; 00208 00209 void get_maximal_cursor_size(unsigned int *width, unsigned int *height) const; 00213 00214 Window* get_default_group() const; 00219 00223 00224 void pointer_ungrab(unsigned int time); 00227 00228 void keyboard_ungrab(unsigned int time); 00231 00232 void beep(); 00234 00235 void sync(); 00243 00244 void flush(); 00254 00255 void close(); 00258 00259 Pointer<Event> get_event(); 00263 00264 Pointer<Event> peek_event(); 00271 00272 void put_event(const Gdk::Event& event); 00275 00276 void add_client_message_filter(Atom message_type, GdkFilterFunc func, void *data); 00282 00283 void set_double_click_time(unsigned int msec); 00289 00290 void set_double_click_distance(unsigned int distance); 00296 00300 00301 const ClosedSignalProxy sig_closed(); 00303 00305 }; 00306 00307 } // namespace Gdk 00308 00309 } // namespace GFC 00310 00311 #include <gfc/gdk/inline/display.inl> 00312 00313 #endif // GFC_GDK_DISPLAY_HH 00314

Generated on Tue Aug 24 00:34:30 2004 for GFC-UI by doxygen 1.3.8