|
def gtk.check_version(required_major
, required_minor
, required_micro
)
| the required major version number |
| the required minor version number |
| the required micro version number |
Returns : | None if the underlying
GTK+ library is compatible or a string describing the
mismatch |
The gtk.check_version
() function checks the
underlying GTK+
library version against the version
specified by required_major
,
required_minor
and
required_micro
. If the library is compatible this
function returns None
; otherwise it returns a string
describing the mismatch.
def gtk.draw_insertion_cursor(widget
, drawable
, area
, location
, is_primary
, direction
, draw_arrow
)
| a gtk.Widget |
| a gtk.gdk.Drawable |
| the rectangle to which the output is clipped, or
None if the output should not be clipped |
| the location to draw the cursor
(location.width is
ignored) |
| if True the cursor should
be the primary cursor color. |
| the direction of the cursor; either
gtk.TEXT_DIR_LTR or
gtk.TEXT_DIR_RTL |
| if True draw a directional
arrow on the cursor. Should be False unless the
cursor is split. |
This function is available in PyGTK 2.4 and above.
The gtk.draw_insertion_cursor
() function
draws a text caret on the gtk.gdk.Drawable
specified by drawable
at the position specified by
location
. area
specifies a
clipping rectangle or is None
if the output should not be
clipped. If is_primary
is True
the
cursor should be the primary cursor color. direction
specifies whether the cursor is right-to-left or left-to-right. This is a
convenience function for drawing the standard cursor shape.
def gtk.get_default_language()
Returns : | a pango.Language
object for the default language |
The gtk.get_default_language
() function
returns a pango.Language
describing the default language.
def gtk.events_pending()
Returns : | True if any events are
pending |
The gtk.events_pending
() function returns
True
if any events are pending. This can be used to
update the user interface and invoke timeouts etc. while doing some time
intensive computation.
def gtk.main_do_event(
)
| a gtk.gdk.Event to
process |
The gtk.main_do_event
() function processes
a single gtk.gdk.Event
. This
function is public only to allow filtering of events between
GDK
and GTK+
. You will not usually
need to call this function directly. While you should not call this function
directly, you might want to know how exactly events are handled. So here is
what this function does with the event:
GDK
) both events are thrown away. This is to avoid a
backlog of (de-)highlighting widgets crossed by the pointer.INCR
transaction. In that case it is passed to
gtk_selection_incr_event
().gtk.get_current_event
().The event is sent to a widget. If a grab is active all events for widgets that are not in the contained in the grab widget are sent to the latter with a few exceptions:
Another point of interest might be that all key events
are first passed through the key snooper functions if there are any. Read
the description of gtk_key_snooper_install
() if you
need this feature.
def gtk.main()
The gtk.main
() function runs the main loop
until the gtk.main_quit
()
function is called. You can nest calls to gtk.main
().
In that case the call to the gtk.main_quit
()
function will make the innermost invocation of the main loop return.
def gtk.main_level()
Returns : | the nesting level of the current invocation of the main loop |
The gtk.main_level
() function returns the
current nesting level of the main loop. The nesting level is increased by
calling the gtk.main
() function
and reduced by calling the gtk.main_quit
()
function.
def gtk.main_quit()
The gtk.main_quit
() function terminates the
current main loop level started by the most recent call to the gtk.main
()
function. The nesting level of the main loop is reduced by calling this
function.
def gtk.main_iteration(block
=True)
| if True block if no events
are pending |
Returns : | True if the gtk.main_quit ()
function has been called for the innermost main loop. |
The gtk.main_iteration
() function runs a
single iteration of the mainloop. If no events are waiting to be processed
PyGTK
will block until the next event is noticed if
block
is True
. This function is
identical to the gtk.main_iteration_do
()
function.
def gtk.main_iteration_do(block
=True)
| if True block if no events
are pending |
Returns : | True if the gtk.main_quit ()
function has been called for the innermost main loop. |
The gtk.main_iteration_do
() function runs a
single iteration of the main loop. If block
is
True
block until an event occurs. This function is
identical to the gtk.main_iteration
()
function.
def gtk.grab_get_current()
Returns : | the gtk.Widget that has
the grab currently or None if no grab is
active |
The gtk.grab_get_current
() function returns
the gtk.Widget
that has the grab or None
if no grab is active.
def gtk.quit_add(level
, func
, ...
)
| the level at which termination
func shall be called. You can pass 0 here to have
func run at the termination of the current main
loop. |
| the function to call - it should return 0 to be removed from the list of quit handlers |
| optional parameter(s) to be passed to
func |
Returns : | a handle for this quit handler (you need this
for the gtk.quit_remove ()
function). |
The gtk.quit_add
() function registers a
function specified by func
to be called when the
specified main loop level
is exited.
func
should return 0 to be removed from the list of
quit handlers. This function returns a handler ID that is used when removing
the handler with the gtk.quit_remove
()
function.
def gtk.quit_remove(quit_handler_id
)
| the ID of a quit handler |
The gtk.quit_remove
() function removes the
quit handler specified by quit_handler_id
from the
list of quit handlers.
def gtk.get_current_event()
Returns : | a copy of the current event or
None |
This function is available in PyGTK 2.6 and above.
The gtk.get_current_event
() function
returns a copy of the event currently being processed by GTK+. For example,
if you get a "clicked" signal from gtk.Button
, the
current event will be the GdkEventButton that triggered the "clicked"
signal. If there is no current event, the function returns
None
.
def gtk.get_current_event_state()
Returns : | the state of the current event if any or
None if there is no current event or
state |
This function is available in PyGTK 2.6 and above.
The gtk.get_current_event_state
() function
returns the state of the current event or None
if there
is no current event or state.
def gtk.get_current_event_time()
Returns : | the timestamp of the current event or 0L |
The gtk.get_current_event_time
() function
returns the timestamp from the current event or 0L if there is no current
event.
def gtk.init_check()
Returns : | True if GTK has been
successfully initialized |
The gtk.init_check
() function tries to
initialize GTK and returns True
if
successful.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.