Ardour  9.0-pre0-582-g084a23a80d
display.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GDKMM_DISPLAY_H
4 #define _GDKMM_DISPLAY_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: display.hg,v 1.22 2006/04/12 11:11:24 murrayc Exp $ */
11 
12 /* display.h
13  *
14  * Copyright (C) 1998-2002 The gtkmm Development Team
15  *
16  * This library is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU Lesser General Public
18  * License as published by the Free Software Foundation; either
19  * version 2.1 of the License, or (at your option) any later version.
20  *
21  * This library is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24  * Lesser General Public License for more details.
25  *
26  * You should have received a copy of the GNU Lesser General Public
27  * License along with this library; if not, write to the Free
28  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29  */
30 
31 #include <gdkmm/screen.h>
32 #include <gdkmm/device.h>
33 #include <gdkmm/types.h> //For ModifierType
34 
35 
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
37 typedef struct _GdkDisplay GdkDisplay;
38 typedef struct _GdkDisplayClass GdkDisplayClass;
39 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 
41 
42 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 namespace Gdk
44 { class Display_Class; } // namespace Gdk
45 #endif //DOXYGEN_SHOULD_SKIP_THIS
46 
47 namespace Gdk
48 {
49 
50 
51 class Drawable;
52 
63 class Display : public Glib::Object
64 {
65 
66 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 
68 public:
69  typedef Display CppObjectType;
70  typedef Display_Class CppClassType;
71  typedef GdkDisplay BaseObjectType;
72  typedef GdkDisplayClass BaseClassType;
73 
74 private: friend class Display_Class;
75  static CppClassType display_class_;
76 
77 private:
78  // noncopyable
79  Display(const Display&);
80  Display& operator=(const Display&);
81 
82 protected:
83  explicit Display(const Glib::ConstructParams& construct_params);
84  explicit Display(GdkDisplay* castitem);
85 
86 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
87 
88 public:
89  virtual ~Display();
90 
93  static GType get_type() G_GNUC_CONST;
94 
95 #ifndef DOXYGEN_SHOULD_SKIP_THIS
96 
97 
98  static GType get_base_type() G_GNUC_CONST;
99 #endif
100 
102  GdkDisplay* gobj() { return reinterpret_cast<GdkDisplay*>(gobject_); }
103 
105  const GdkDisplay* gobj() const { return reinterpret_cast<GdkDisplay*>(gobject_); }
106 
109 
110 private:
111 
112 protected:
114 
115 public:
116 
123  static Glib::RefPtr<Display> open(const Glib::ustring& display_name);
124 
125 
131  Glib::ustring get_name() const;
132 
133 
138  int get_n_screens() const;
139 
145  Glib::RefPtr<Screen> get_screen(int screen_num);
146 
152  Glib::RefPtr<const Screen> get_screen(int screen_num) const;
153 
154 
159  Glib::RefPtr<Screen> get_default_screen();
160 
165  Glib::RefPtr<const Screen> get_default_screen() const;
166 
167 
172  void pointer_ungrab(guint32 timestamp);
173 
178  void keyboard_ungrab(guint32 timestamp);
179 
184  bool pointer_is_grabbed() const;
185 
188  void beep();
189 
200  void sync();
201 
205  void close();
206 
207 
213  Glib::ListHandle< Glib::RefPtr<Device> > list_devices();
214 
220  Glib::ListHandle< Glib::RefPtr<const Device> > list_devices() const;
221 
222  //TODO: Use C++ Gdk::Event:
223  //TODO: get_event() might remove the event - if so, then there should not be a const version:
224 
232 
239  const GdkEvent* get_event() const;
240 
241 
252 
263 
269  void put_event(GdkEvent* event);
270 
271  //TODO: Use a slot here, though this is probably never used anyway:
272  //Find out whether we can use a string representation for the atom - look for examples of this function's use.
273 
284  void add_client_message_filter(Glib::ustring& message_type, GdkFilterFunc func, gpointer data);
285 
286 
294  void set_double_click_time(guint msec);
295 
304  void set_double_click_distance(guint distance);
305 
306 
314  static Glib::RefPtr<Display> get_default();
315 
316 
322  Glib::RefPtr<Device> get_core_pointer();
323 
329  Glib::RefPtr<const Device> get_core_pointer() const;
330 
340  void get_pointer(Glib::RefPtr<Screen>& screen, int& x, int& y, ModifierType& mask);
341 
342  // In fact, any one of these gdk_display_get_pointer() args can be NULL, but we don't need so many overloads.
352  void get_pointer(int& x, int& y, ModifierType& mask);
353 
354 
366  Glib::RefPtr<Window> get_window_at_pointer(int& win_x, int& win_y);
367 
379  Glib::RefPtr<const Window> get_window_at_pointer(int& win_x, int& win_y) const;
380 
386  Glib::RefPtr<Window> get_window_at_pointer();
387 
393  Glib::RefPtr<const Window> get_window_at_pointer() const;
394 
395 
412  void warp_pointer(const Glib::RefPtr<Screen>& screen, int x, int y);
413 
414 
415 #ifndef GDKMM_DISABLE_DEPRECATED
416 
428 #endif // GDKMM_DISABLE_DEPRECATED
429 
430 
431  #ifndef GDKMM_DISABLE_DEPRECATED
432 
436  #endif // GDKMM_DISABLE_DEPRECATED
437 
438 
448  static Glib::RefPtr<Display> open_default_libgtk_only();
449 
450 #ifdef G_OS_WIN32
451 #ifndef GDKMM_DISABLE_DEPRECATED
452 
466  guint32 get_drag_protocol(guint32 xid, GdkDragProtocol& protocol);
467 #endif // GDKMM_DISABLE_DEPRECATED
468 
469 #endif
470 
471 
481 
482 
488 
493  const GdkKeymap* get_keymap() const;
494 
495  bool set_selection_owner(const Glib::RefPtr<Window>& owner, Glib::ustring& selection, guint32 time_, bool send_event);
496  Glib::RefPtr<Window> get_selection_owner(const Glib::ustring& selection);
497 
498 #ifdef G_OS_WIN32
512  void selection_send_notify(guint32 requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_);
513 #endif
514 
524  void selection_send_notify(GdkNativeWindow requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_);
525 
526 
536  Glib::RefPtr<Pixmap> lookup_pixmap(NativeWindow anid);
537 
547  Glib::RefPtr<const Pixmap> lookup_pixmap(NativeWindow anid) const;
548 
549 
560  void flush();
561 
568  bool supports_cursor_alpha() const;
569 
576  bool supports_cursor_color() const;
577 
582  guint get_default_cursor_size() const;
583 
589  void get_maximal_cursor_size(guint& width, guint& height);
590 
591 
598  Glib::RefPtr<Window> get_default_group();
599 
606  Glib::RefPtr<const Window> get_default_group() const;
607 
608  //TODO: wrap the vfuncs, though they are not very useful because people will not derive from this class? murrayc.
609 
610 
618 
627  bool request_selection_notification(const Glib::ustring& selection);
628 
629 
638 
646  void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_);
647 
648  void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets);
649 
650 
656  bool supports_shapes() const;
657 
663  bool supports_input_shapes() const;
664 
673  bool supports_composite() const;
674 
675 
686  Glib::SignalProxy1< void,bool > signal_closed();
687 
688 
689 public:
690 
691 public:
692  //C++ methods used to invoke GTK+ virtual functions:
693 
694 protected:
695  //GTK+ Virtual Functions (override these to change behaviour):
696 
697  //Default Signal Handlers::
699  virtual void on_closed(bool is_error);
700 
701 
702 };
703 
704 } /* namespace Gdk */
705 
706 
707 namespace Glib
708 {
717  Glib::RefPtr<Gdk::Display> wrap(GdkDisplay* object, bool take_copy = false);
718 }
719 
720 
721 #endif /* _GDKMM_DISPLAY_H */
722 
Glib::ustring get_name() const
static Glib::RefPtr< Display > get_default()
void store_clipboard(const Glib::RefPtr< Gdk::Window > &clipboard_window, guint32 time_)
const GdkDisplay * gobj() const
Provides access to the underlying C GObject.
Definition: display.h:105
bool set_selection_owner(const Glib::RefPtr< Window > &owner, Glib::ustring &selection, guint32 time_, bool send_event)
static Glib::RefPtr< Display > open_default_libgtk_only()
Glib::RefPtr< Window > get_default_group()
Glib::RefPtr< const Window > get_window_at_pointer(int &win_x, int &win_y) const
Glib::RefPtr< const Screen > get_default_screen() const
GdkNativeWindow get_drag_protocol(GdkNativeWindow xid, GdkDragProtocol &protocol)
void get_pointer(int &x, int &y, ModifierType &mask)
bool supports_cursor_alpha() const
GdkEvent * peek_event()
void pointer_ungrab(guint32 timestamp)
Glib::RefPtr< Pixmap > lookup_pixmap(NativeWindow anid)
static Glib::RefPtr< Display > open(const Glib::ustring &display_name)
guint get_default_cursor_size() const
const GdkEvent * get_event() const
static GType get_type() G_GNUC_CONST
void add_client_message_filter(Glib::ustring &message_type, GdkFilterFunc func, gpointer data)
GdkEvent * get_event()
bool supports_selection_notification() const
Glib::RefPtr< Window > get_selection_owner(const Glib::ustring &selection)
bool supports_input_shapes() const
Glib::RefPtr< const Window > get_default_group() const
bool pointer_is_grabbed() const
Glib::RefPtr< Window > get_window_at_pointer()
GdkEvent * peek_event() const
void selection_send_notify(GdkNativeWindow requestor, Glib::ustring &selection, Glib::ustring &target, Glib::ustring &property, guint32 time_)
virtual ~Display()
void store_clipboard(const Glib::RefPtr< Gdk::Window > &clipboard_window, guint32 time_, const Glib::StringArrayHandle &targets)
void get_pointer(Glib::RefPtr< Screen > &screen, int &x, int &y, ModifierType &mask)
void warp_pointer(const Glib::RefPtr< Screen > &screen, int x, int y)
virtual void on_closed(bool is_error)
This is a default handler for the signal signal_closed().
void get_maximal_cursor_size(guint &width, guint &height)
Glib::RefPtr< const Screen > get_screen(int screen_num) const
GdkDisplay * gobj()
Provides access to the underlying C GObject.
Definition: display.h:102
GdkDisplayPointerHooks * unset_pointer_hooks()
Glib::SignalProxy1< void, bool > signal_closed()
Glib::RefPtr< const Device > get_core_pointer() const
int get_n_screens() const
Glib::RefPtr< Screen > get_screen(int screen_num)
Glib::RefPtr< Window > get_window_at_pointer(int &win_x, int &win_y)
GdkDisplay * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
GdkDisplayPointerHooks * set_pointer_hooks(const GdkDisplayPointerHooks *new_hooks)
Glib::RefPtr< Device > get_core_pointer()
bool supports_shapes() const
Glib::RefPtr< Screen > get_default_screen()
bool supports_cursor_color() const
GdkKeymap * get_keymap()
bool request_selection_notification(const Glib::ustring &selection)
Glib::ListHandle< Glib::RefPtr< Device > > list_devices()
const GdkKeymap * get_keymap() const
void keyboard_ungrab(guint32 timestamp)
bool supports_composite() const
Glib::ListHandle< Glib::RefPtr< const Device > > list_devices() const
Glib::RefPtr< Gdk::Display > wrap(GdkDisplay *object, bool take_copy=false)
void set_double_click_distance(guint distance)
void put_event(GdkEvent *event)
bool supports_clipboard_persistence() const
Glib::RefPtr< const Window > get_window_at_pointer() const
void set_double_click_time(guint msec)
Glib::RefPtr< const Pixmap > lookup_pixmap(NativeWindow anid) const
typedefG_BEGIN_DECLS struct _GdkDisplayClass GdkDisplayClass
Definition: gdkdisplay.h:36
GdkDragProtocol
Definition: gdkdnd.h:51
GdkFilterReturn(* GdkFilterFunc)(GdkXEvent *xevent, GdkEvent *event, gpointer data)
Definition: gdkevents.h:88
guint32 GdkNativeWindow
Definition: gdktypes.h:97
GdkNativeWindow NativeWindow
link region and track selection
gint height
Definition: xcursors.h:1
gint width
Definition: xcursors.h:1