11.7Class GdkDisplay

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
beepEmits a short beep on display
closeCloses the connection to the windowing system for the given display, and cleans up associated resources.
device_is_grabbedReturns TRUE if there is an ongoing grab on device for display.
flushFlushes any requests queued for the windowing system.
get_defaultGets the default GdkDisplay.
get_default_screenGet the default GdkScreen for display.
get_n_screensGets the number of screen managed by the display.
get_nameGets the name of the display.
get_screenReturns a screen object for one of the screens of the display.
keyboard_ungrabRelease any keyboard grab
pointer_is_grabbedTest if the pointer is grabbed.
pointer_ungrabRelease any pointer grab.
signal_closedThe closed signal is emitted when the connection to the windowing system for display is closed.
signal_openedThe opened signal is emitted when the connection to the windowing system for display is opened.
syncFlushes any requests queued for the windowing system and waits until all requests have been handled.

Methods

beep

Emits a short beep on display

GdkDisplay.beep()

close

Closes the connection to the windowing system for the given display, and cleans up associated resources.

GdkDisplay.close()

device_is_grabbed

Returns TRUE if there is an ongoing grab on device for display.

GdkDisplay.device_is_grabbed( device )
device a GdkDevice
ReturnTRUE if there is a grab in effect for device.

Note: This method is currently NOT implemented.

flush

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.

get_default

Gets the default GdkDisplay.

GdkDisplay.get_default()
Returna 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_default_screen

Get the default GdkScreen for display.

GdkDisplay.get_default_screen()
Returnthe default GdkScreen object for display

get_n_screens

Gets the number of screen managed by the display.

GdkDisplay.get_n_screens()
Returnnumber of screens.

get_name

Gets the name of the display.

GdkDisplay.get_name()
Returna string representing the display name.

get_screen

Returns a screen object for one of the screens of the display.

GdkDisplay.get_screen( screen_num )
screen_num the screen number
Returnthe GdkScreen object

keyboard_ungrab

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.

pointer_is_grabbed

Test if the pointer is grabbed.

GdkDisplay.pointer_is_grabbed()
ReturnTRUE 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.

pointer_ungrab

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

signal_closed

The closed signal is emitted when the connection to the windowing system for display is closed.

GdkDisplay.signal_closed()

signal_opened

The opened signal is emitted when the connection to the windowing system for display is opened.

GdkDisplay.signal_opened()

sync

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.

Made with http://www.falconpl.org