An opaque structure representing an offscreen drawable of depth 1.
Class GdkDisplay( display_name )
display_name | the name of the display to open |
GdkDisplay objects purpose are two fold:
- To grab/ungrab keyboard focus and mouse pointer
GdkDisplay 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 GdkScreen objects currently instanciated by the application. It is also used to grab and release the keyboard and the mouse pointer.
Methods | |
beep | Emits a short beep on display |
close | Closes the connection to the windowing system for the given display, and cleans up associated resources. |
device_is_grabbed | Returns TRUE if there is an ongoing grab on device for display. |
flush | Flushes any requests queued for the windowing system. |
get_default | Gets the default GdkDisplay. |
get_default_screen | Get the default GdkScreen for display. |
get_n_screens | Gets the number of screen managed by the display. |
get_name | Gets the name of the display. |
get_screen | Returns a screen object for one of the screens of the display. |
keyboard_ungrab | Release any keyboard grab |
pointer_is_grabbed | Test if the pointer is grabbed. |
pointer_ungrab | Release any pointer grab. |
signal_closed | The closed signal is emitted when the connection to the windowing system for display is closed. |
signal_opened | The opened signal is emitted when the connection to the windowing system for display is opened. |
sync | Flushes any requests queued for the windowing system and waits until all requests have been handled. |
Emits a short beep on display
GdkDisplay.beep()
Closes the connection to the windowing system for the given display, and cleans up associated resources.
GdkDisplay.close()
Returns TRUE if there is an ongoing grab on device for display.
GdkDisplay.device_is_grabbed( device )
device | a GdkDevice |
Return | TRUE if there is a grab in effect for device. |
Note: This method is currently NOT implemented.
Flushes any requests queued for the windowing system.
GdkDisplay.flush()
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 function explicitely. A common case where this function 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 function will do nothing.
Gets the default GdkDisplay.
GdkDisplay.get_default()
Return | a GdkDisplay, or NULL if there is no default display. |
This is a convenience function for gdk_display_manager_get_default_display (gdk_display_manager_get()).
Get the default GdkScreen for display.
GdkDisplay.get_default_screen()
Return | the default GdkScreen object for display |
Gets the number of screen managed by the display.
GdkDisplay.get_n_screens()
Return | number of screens. |
Gets the name of the display.
GdkDisplay.get_name()
Return | a string representing the display name. |
Returns a screen object for one of the screens of the display.
GdkDisplay.get_screen( screen_num )
screen_num | the screen number |
Return | the GdkScreen object |
Release any keyboard grab
GdkDisplay.keyboard_ungrab( time )
time | a timestap (e.g GDK_CURRENT_TIME). |
Warning: gdk_display_keyboard_ungrab has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_ungrab(), together with gdk_device_grab() instead.
Test if the pointer is grabbed.
GdkDisplay.pointer_is_grabbed()
Return | TRUE if an active X pointer grab is in effect |
Warning: gdk_display_pointer_is_grabbed has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_display_device_is_grabbed() instead.
Release any pointer grab.
GdkDisplay.pointer_ungrab( time )
time | a timestamp (e.g. GDK_CURRENT_TIME). |
Warning: gdk_display_pointer_ungrab has been deprecated since version 3.0 and should not be used in newly-written code. Use gdk_device_ungrab(), together with gdk_device_grab() instead
The closed signal is emitted when the connection to the windowing system for display is closed.
GdkDisplay.signal_closed()
The opened signal is emitted when the connection to the windowing system for display is opened.
GdkDisplay.signal_opened()
Flushes any requests queued for the windowing system and waits until all requests have been handled.
GdkDisplay.sync()
This is often used for making sure that the display is synchronized with the current state of the program. Calling gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors generated from earlier requests are handled before the error trap is removed.
This is most useful for X11. On windowing systems where requests are handled synchronously, this function will do nothing.