|
class gtk.gdk.Display( |
Functions
def gtk.gdk.display_get_default(
)
This object is available in PyGTK 2.2 and above.
gtk.gdk.Display
objects provide two capabilities:
gtk.gdk.Screen
)
objects available for this gtk.gdk.Display
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.
gtk.gdk.Display(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..
def get_name()
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.
def get_n_screens()
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.
def get_screen(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.
def get_default_screen()
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
def pointer_ungrab(time_
=0L)
| 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.
def keyboard_ungrab(time_
=0L)
| 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.
def pointer_is_grabbed()
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.
def beep()
This method is available in PyGTK 2.2 and above.
The beep
() method
emits a short beep on the display.
def sync()
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.
def close()
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.
def list_devices()
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.
def get_event()
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
def peek_event()
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()
.
def put_event(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.
def set_double_click_time(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.
def get_core_pointer()
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
def get_pointer()
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.
def get_window_at_pointer()
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).
def flush()
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.
def set_double_click_distance(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.
def supports_composite()
Returns : | True if windows may be composited. |
This method is available in PyGTK 2.12 and above.
The supports_composite
() method
returns True
if gtk.gdk.Window.set_composite
Currently this only works on X11 with XComposite and XDamage extensions available.
def supports_cursor_alpha()
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).
def supports_cursor_color()
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.
def get_default_cursor_size()
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.
def get_maximal_cursor_size()
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.
def get_default_group()
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.
def get_default_group()
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.
def supports_clipboard_persistence()
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.
def request_selection_notification(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
.
def store_clipboard(clipboard_window
, time
, targets
)
| a gtk.gdk.Window
belonging to the clipboard owner |
| a timestamp |
| 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.
def gtk.gdk.display_get_default()
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()
def callback(display
, is_error
, user_param1
, ...
)
| the display that received the signal |
| True if the display was
closed due to an error |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The "closed" signal is emitted when the connection to the
windowing system for display
is closed.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.