gtk.gdk.Display — controls the keyboard/mouse pointer grabs and a set of gtk.gdk.Screen objects
class gtk.gdk.Display(gobject.GObject): |
Functions
|
This object is available in PyGTK 2.2 and above.
gtk.gdk.Display objects provide two capabilities:
gtk.gdk.Display objects are the GDK representation of the X Display which can be described as a workstation consisting of a keyboard, a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of various gtk.gdk.Screen objects currently instantiated by the application. It is also used to grab and release the keyboard and the mouse pointer.
|
display_name : | the name of the display to open |
Returns : | a gtk.gdk.Display, or None if the display could not be opened. |
This constructor is available in PyGTK 2.2 and above.
Opens the display with the name specified by display_name and returns a gtk.gdk.Display object wrapping the display..
|
Returns : | a string representing the display name. |
This method is available in PyGTK 2.2 and above.
The get_name() method returns the name of the display.
|
Returns : | the number of display screens. |
This method is available in PyGTK 2.2 and above.
The get_n_screens() method returns the number of screens managed by the display.
|
screen_num : | the screen number |
Returns : | the gtk.gdk.Screen object |
This method is available in PyGTK 2.2 and above.
The get_screen() method returns a gtk.gdk.Screen object for one of the screens of the display.
|
Returns : | the default gtk.gdk.Screen object for display |
This method is available in PyGTK 2.2 and above.
The get_default_screen() method returns the default gtk.gdk.Screen for the display
|
time_ : | a timestamp or 0L for the current time. |
This method is available in PyGTK 2.2 and above.
The pointer_ungrab() method releases any pointer grab held by the display.
|
time_ : | a timestamp or 0L for the current time. |
This method is available in PyGTK 2.2 and above.
The keyboard_ungrab() method releases any keyboard grab held by the display.
|
Returns : | TRUE if an active X pointer grab is in effect |
This method is available in PyGTK 2.2 and above.
The pointer_is_grabbed() method returns TRUE if the pointer is grabbed.
|
This method is available in PyGTK 2.2 and above.
The beep() method emits a short beep on the display.
|
This method is available in PyGTK 2.2 and above.
The sync() method flushes any requests queued for the windowing system and waits until all requests have been handled. This is often used for making sure that the display is synchronized with the current state of the program. This is most useful for X11. On windowing systems where requests are handled synchronously, this method will do nothing.
|
This method is available in PyGTK 2.2 and above.
The close() method closes the connection to the windowing system for the given display, and cleans up associated resources.
|
Returns : | a list of gtk.gdk.Device objects. |
This method is available in PyGTK 2.2 and above.
The list_devices() method returns the list of available input devices attached to the display.
|
Returns : | the next gtk.gdk.Event to be processed, or None if no events are pending.. |
This method is available in PyGTK 2.2 and above.
The get_event() method returns the next gtk.gdk.Event to be processed for the display, fetching events from the windowing system if necessary. The returned gtk.gdk.Event should be freed with the gtk.gdk.Event.free() method
|
Returns : | a copy of the first gtk.gdk.Event on the event queue, or None if no events are in the queue. |
This method is available in PyGTK 2.2 and above.
The peek_event() method returns a copy of the first gtk.gdk.Event in the the display's event queue, without removing the event from the queue. (Note that this method will not get more events from the windowing system. It only checks the events that have already been moved to the GDK event queue.) The returned gtk.gdk.Event should be freed with gtk.gdk.Event.free().
|
event : | a gtk.gdk.Event. |
This method is available in PyGTK 2.2 and above.
The put_event() method appends a copy of the given event onto the front of the event queue for the display.
|
msec : | the double click time in milliseconds (thousandths of a second) |
This method is available in PyGTK 2.2 and above.
The set_double_click_time() method sets the double click time (two clicks within this time interval count as a double click and result in a gtk.gdk._2BUTTON_PRESS event). Applications should not set this, it is a global user-configured setting.
|
Returns : | the core pointer device |
This method is available in PyGTK 2.2 and above.
The get_core_pointer() method returns the core pointer device for the given display
|
Returns : | a 4-tuple containing the screen that the cursor is on, the root window X and Y coordinates of the pointer and the current modifier mask |
This method is available in PyGTK 2.2 and above.
The get_pointer() method returns a 4-tuple containing the gtk.gdk.Screen that the pointer is on, the current location coordinates of the pointer and the current modifier mask for the display. The returned modifier mask is a combination of the GDK Modifier Constants.
|
Returns : | a 3-tuple containing the gtk.gdk.Window under the mouse pointer and the x and y coordinates of the window origin |
This method is available in PyGTK 2.2 and above.
The get_window_at_pointer() method returns a 3-tuple containing the gtk.gdk.Window underneath the mouse pointer and the location of that window's origin. Returns None if the window under the mouse pointer is not known to GDK (for example, belongs to another application).
|
This method is available in PyGTK 2.4 and above.
The flush() method flushes any requests queued for the windowing system; this happens automatically when the main loop blocks waiting for new events, but if your application is drawing without returning control to the main loop, you may need to call this method explicitly. A common case where this method needs to be called is when an application is executing drawing commands from a thread other than the thread where the main loop is running.
This is most useful for X11. On windowing systems where requests are handled synchronously, this method will do nothing.
|
distance : | the distance in pixels |
This method is available in PyGTK 2.4 and above.
The set_double_click_distance() method sets the double click distance (two clicks within this distance count as a double click and result in a gtk.gdk.2BUTTON_PRESS event). See the set_double_click_time() method for more information. Applications should not set this, it is a global user-configured setting.
|
Returns : | TRUE if cursors can have alpha channels. |
This method is available in PyGTK 2.4 and above.
The supports_cursor_alpha() method returns TRUE if cursors can use an 8bit alpha channel on the display. Otherwise, cursors are restricted to bilevel alpha (i.e. a mask).
|
Returns : | TRUE if cursors can have multiple colors. |
This method is available in PyGTK 2.4 and above.
The supports_cursor_color() method returns TRUE if multicolored cursors are supported on the display. Otherwise, cursors have only a foreground and a background color.
|
Returns : | the default cursor size. |
This method is available in PyGTK 2.4 and above.
The get_default_cursor_size() method returns the default size to use for cursors on the display.
|
Returns : | a 2-tuple containing the maximal cursor width and height |
This method is available in PyGTK 2.4 and above.
The get_maximal_cursor_size() method returns a 2-tuple containing the maximum width and height to use for cursors on the display.
|
Returns : | The default group leader window for the display |
This method is available in PyGTK 2.4 and above.
The get_default_group() method returns the default group leader window for all toplevel windows on the display. This window is implicitly created by GDK. See the gtk.gdk.Window.set_group() method for more information.
|
Returns : | TRUE if gtk.gdk.EventOwnerChange events will be sent. |
This method is available in PyGTK 2.6 and above.
The supports_selection_notification() method returns TRUE if gtk.gdk.EventOwnerChange events will be sent when the owner of a selection changes.
|
Returns : | TRUE if the display supports clipboard persistence. |
This method is available in PyGTK 2.6 and above.
The supports_clipboard_persistence() method Returns whether the specified display supports clipboard persistence; i.e. if it's possible to store the clipboard data after an application has quit. On X11 this checks if a clipboard daemon is running.
|
selection : | The string (or gtk.gdk.Atom) naming the selection for which ownership change notification is requested |
This method is available in PyGTK 2.6 and above.
The request_selection_notification() method requests that gtk.gdk.EventOwnerChange events will be sent for changes in ownership of the atom specified by selection.
|
clipboard_window : | a gtk.gdk.Window belonging to the clipboard owner |
time : | a timestamp |
targets : | a list of targets that should be saved, or None if all available targets should be saved. |
This method is available in PyGTK 2.6 and above.
The store_clipboard() method issues a request to the the clipboard manager to store the clipboard data. On X11, this is a special program that works according to the freedesktop clipboard specification, available at http://www.freedesktop.org/Standards/clipboard-manager-spec.
|
Returns : | a gtk.gdk.Display, or None if there is no default display. |
This function is available in PyGTK 2.2 and above.
The gtk.gdk.display_get_default() function returns the default gtk.gdk.Display. This is a convenience function for:
display_manager = gtk.gdk.display_manager_get() display = display.manager.get_default_display() |
|
display : | the display that received the signal |
is_error : | TRUE if the display was closed due to an error |
user_param1 : | the first user parameter (if any) specified with the connect() method |
... : | additional user parameters (if any) |
The "closed" signal is emitted when the connection to the windowing system for display is closed.