Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Gtk.AccelGroupActivate(accel_group, acceleratable, keyval, modifier)¶
- Parameters:
accel_group (
Gtk.AccelGroup
) –acceleratable (
GObject.Object
) –keyval (
int
) –modifier (
Gdk.ModifierType
) –
- Return type:
- Gtk.AccelGroupFindFunc(key, closure, *data)¶
- Parameters:
key (
Gtk.AccelKey
) –closure (
GObject.Closure
) –
- Return type:
New in version 2.2.
- Gtk.AccelMapForeach(data, accel_path, accel_key, accel_mods, changed)¶
- Parameters:
data (
object
orNone
) – User data passed toGtk.AccelMap.foreach
() orGtk.AccelMap.foreach_unfiltered
()accel_path (
str
) – Accel path of the current acceleratoraccel_key (
int
) – Key of the current acceleratoraccel_mods (
Gdk.ModifierType
) – Modifiers of the current acceleratorchanged (
bool
) – Changed flag of the accelerator (ifTrue
, accelerator has changed during runtime and would need to be saved during an accelerator dump)
- Gtk.AssistantPageFunc(current_page, *data)¶
- Parameters:
- Returns:
The next page number.
- Return type:
A function used by
Gtk.Assistant.set_forward_page_func
() to know which is the next page given a current one. It’s called both for computing the next page when the user presses the “forward” button and for handling the behavior of the “last” button.
- Gtk.BuilderConnectFunc(builder, object, signal_name, handler_name, connect_object, flags, *user_data)¶
- Parameters:
builder (
Gtk.Builder
) – aGtk.Builder
object (
GObject.Object
) – object to connect a signal tosignal_name (
str
) – name of the signalhandler_name (
str
) – name of the handlerconnect_object (
GObject.Object
orNone
) – aGObject.Object
, if non-None
, use g_signal_connect_object()flags (
GObject.ConnectFlags
) –GObject.ConnectFlags
to use
This is the signature of a function used to connect signals. It is used by the
Gtk.Builder.connect_signals
() andGtk.Builder.connect_signals_full
() methods. It is mainly intended for interpreted language bindings, but could be useful where the programmer wants more control over the signal connection process. Note that this function can only be called once, subsequent calls will do nothing.New in version 2.12.
- Gtk.CalendarDetailFunc(calendar, year, month, day, *user_data)¶
- Parameters:
calendar (
Gtk.Calendar
) – aGtk.Calendar
.year (
int
) – the year for which details are needed.month (
int
) – the month for which details are needed.day (
int
) – the day of month for which details are needed.user_data (
object
orNone
) – the data passed withGtk.Calendar.set_detail_func
().
- Returns:
Newly allocated string with Pango markup with details for the specified day or
None
.- Return type:
This kind of functions provide Pango markup with detail information for the specified day. Examples for such details are holidays or appointments. The function returns
None
when no information is available.New in version 2.14.
- Gtk.Callback(widget, *data)¶
- Parameters:
widget (
Gtk.Widget
) – the widget to operate on
The type of the callback functions used for e.g. iterating over the children of a container, see
Gtk.Container.foreach
().
- Gtk.CellAllocCallback(renderer, cell_area, cell_background, *data)¶
- Parameters:
renderer (
Gtk.CellRenderer
) – the cell renderer to operate oncell_area (
Gdk.Rectangle
) – the area allocated to renderer inside the rectangle provided toGtk.CellArea.foreach_alloc
().cell_background (
Gdk.Rectangle
) – the background area for renderer inside the background area provided toGtk.CellArea.foreach_alloc
().
- Returns:
True
to stop iterating over cells.- Return type:
The type of the callback functions used for iterating over the cell renderers and their allocated areas inside a
Gtk.CellArea
, seeGtk.CellArea.foreach_alloc
().
- Gtk.CellCallback(renderer, *data)¶
- Parameters:
renderer (
Gtk.CellRenderer
) – the cell renderer to operate on
- Returns:
True
to stop iterating over cells.- Return type:
The type of the callback functions used for iterating over the cell renderers of a
Gtk.CellArea
, seeGtk.CellArea.foreach
().
- Gtk.CellLayoutDataFunc(cell_layout, cell, tree_model, iter, *data)¶
- Parameters:
cell_layout (
Gtk.CellLayout
) – aGtk.CellLayout
cell (
Gtk.CellRenderer
) – the cell renderer whose value is to be settree_model (
Gtk.TreeModel
) – the modeliter (
Gtk.TreeIter
) – aGtk.TreeIter
indicating the row to set the value fordata (
object
orNone
) – user data passed toGtk.CellLayout.set_cell_data_func
()
A function which should set the value of cell_layout’s cell renderer(s) as appropriate.
- Gtk.ClipboardClearFunc(clipboard, user_data_or_owner)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
user_data_or_owner (
object
orNone
) – the user_data argument passed to gtk_clipboard_set_with_data(), or the owner argument passed to gtk_clipboard_set_with_owner()
A function that will be called when the contents of the clipboard are changed or cleared. Once this has called, the user_data_or_owner argument will not be used again.
- Gtk.ClipboardGetFunc(clipboard, selection_data, info, user_data_or_owner)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
selection_data (
Gtk.SelectionData
) – aGtk.SelectionData
argument in which the requested data should be stored.info (
int
) – the info field corresponding to the requested target from theGtk.TargetEntry
array passed to gtk_clipboard_set_with_data() or gtk_clipboard_set_with_owner().user_data_or_owner (
object
orNone
) – the user_data argument passed to gtk_clipboard_set_with_data(), or the owner argument passed to gtk_clipboard_set_with_owner()
A function that will be called to provide the contents of the selection. If multiple types of data were advertised, the requested type can be determined from the info parameter or by checking the target field of selection_data. If the data could successfully be converted into then it should be stored into the selection_data object by calling
Gtk.SelectionData.set
() (or related functions such asGtk.SelectionData.set_text
()). If no data is set, the requestor will be informed that the attempt to get the data failed.
- Gtk.ClipboardImageReceivedFunc(clipboard, pixbuf, *data)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
pixbuf (
GdkPixbuf.Pixbuf
) – the received imagedata (
object
orNone
) – the user_data supplied toGtk.Clipboard.request_image
().
A function to be called when the results of
Gtk.Clipboard.request_image
() are received, or when the request fails.New in version 2.6.
- Gtk.ClipboardReceivedFunc(clipboard, selection_data, *data)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
selection_data (
Gtk.SelectionData
) – aGtk.SelectionData
containing the data was received. If retrieving the data failed, then then length field of selection_data will be negative.data (
object
orNone
) – the user_data supplied toGtk.Clipboard.request_contents
().
A function to be called when the results of
Gtk.Clipboard.request_contents
() are received, or when the request fails.
- Gtk.ClipboardRichTextReceivedFunc(clipboard, format, text, length, *data)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
format (
Gdk.Atom
) – The format of the rich texttext (
str
orNone
) – the rich text received, as a UTF-8 encoded string, orNone
if retrieving the data failed.length (
int
) – Length of the text.data (
object
orNone
) – the user_data supplied toGtk.Clipboard.request_rich_text
().
A function to be called when the results of
Gtk.Clipboard.request_rich_text
() are received, or when the request fails.New in version 2.10.
- Gtk.ClipboardTargetsReceivedFunc(clipboard, atoms, *data)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
atoms ([
Gdk.Atom
] orNone
) – the supported targets, as array ofGdk.Atom
, orNone
if retrieving the data failed.data (
object
orNone
) – the user_data supplied toGtk.Clipboard.request_targets
().
A function to be called when the results of
Gtk.Clipboard.request_targets
() are received, or when the request fails.New in version 2.4.
- Gtk.ClipboardTextReceivedFunc(clipboard, text, *data)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
text (
str
orNone
) – the text received, as a UTF-8 encoded string, orNone
if retrieving the data failed.data (
object
orNone
) – the user_data supplied toGtk.Clipboard.request_text
().
A function to be called when the results of
Gtk.Clipboard.request_text
() are received, or when the request fails.
- Gtk.ClipboardURIReceivedFunc(clipboard, uris, *data)¶
- Parameters:
clipboard (
Gtk.Clipboard
) – theGtk.Clipboard
uris ([
str
]) – the received URIsdata (
object
orNone
) – the user_data supplied toGtk.Clipboard.request_uris
().
A function to be called when the results of
Gtk.Clipboard.request_uris
() are received, or when the request fails.New in version 2.14.
- Gtk.ColorSelectionChangePaletteFunc(colors)¶
- Parameters:
colors ([
Gdk.Color
]) – Array of colors
Deprecated since version 3.4.
- Gtk.ColorSelectionChangePaletteWithScreenFunc(screen, colors)¶
- Parameters:
screen (
Gdk.Screen
) –colors ([
Gdk.Color
]) – Array of colors
New in version 2.2.
Deprecated since version 3.4.
- Gtk.EntryCompletionMatchFunc(completion, key, iter, *user_data)¶
- Parameters:
completion (
Gtk.EntryCompletion
) – theGtk.EntryCompletion
key (
str
) – the string to match, normalized and case-foldediter (
Gtk.TreeIter
) – aGtk.TreeIter
indicating the row to matchuser_data (
object
orNone
) – user data given toGtk.EntryCompletion.set_match_func
()
- Returns:
True
if iter should be displayed as a possible completion for key- Return type:
A function which decides whether the row indicated by iter matches a given key, and should be displayed as a possible completion for key. Note that key is normalized and case-folded (see
GLib.utf8_normalize
() andGLib.utf8_casefold
()). If this is not appropriate, match functions have access to the unmodified key viagtk_entry_get_text (GTK_ENTRY (gtk_entry_completion_get_entry ()))
.
- Gtk.FileFilterFunc(filter_info, *data)¶
- Parameters:
filter_info (
Gtk.FileFilterInfo
) – aGtk.FileFilterInfo
that is filled according to the needed flags passed toGtk.FileFilter.add_custom
()data (
object
orNone
) – user data passed toGtk.FileFilter.add_custom
()
- Returns:
True
if the file should be displayed- Return type:
The type of function that is used with custom filters, see
Gtk.FileFilter.add_custom
().
- Gtk.FlowBoxCreateWidgetFunc(item, *user_data)¶
- Parameters:
item (
GObject.Object
) – the item from the model for which to create a widget foruser_data (
object
orNone
) – user data fromGtk.FlowBox.bind_model
()
- Returns:
a
Gtk.Widget
that represents item- Return type:
Called for flow boxes that are bound to a
Gio.ListModel
withGtk.FlowBox.bind_model
() for each item that gets added to the model.New in version 3.18.
- Gtk.FlowBoxFilterFunc(child, *user_data)¶
- Parameters:
child (
Gtk.FlowBoxChild
) – aGtk.FlowBoxChild
that may be filtered
- Returns:
- Return type:
A function that will be called whenrever a child changes or is added. It lets you control if the child should be visible or not.
New in version 3.12.
- Gtk.FlowBoxForeachFunc(box, child, *user_data)¶
- Parameters:
box (
Gtk.FlowBox
) – aGtk.FlowBox
child (
Gtk.FlowBoxChild
) – aGtk.FlowBoxChild
A function used by
Gtk.FlowBox.selected_foreach
(). It will be called on every selected child of the box.New in version 3.12.
- Gtk.FlowBoxSortFunc(child1, child2, *user_data)¶
- Parameters:
child1 (
Gtk.FlowBoxChild
) – the first childchild2 (
Gtk.FlowBoxChild
) – the second child
- Returns:
< 0 if child1 should be before child2, 0 if the are equal, and > 0 otherwise
- Return type:
A function to compare two children to determine which should come first.
New in version 3.12.
- Gtk.FontFilterFunc(family, face, *data)¶
- Parameters:
family (
Pango.FontFamily
) – aPango.FontFamily
face (
Pango.FontFace
) – aPango.FontFace
belonging to familydata (
object
orNone
) – user data passed toGtk.FontChooser.set_filter_func
()
- Returns:
True
if the font should be displayed- Return type:
The type of function that is used for deciding what fonts get shown in a
Gtk.FontChooser
. SeeGtk.FontChooser.set_filter_func
().
- Gtk.IconViewForeachFunc(icon_view, path, *data)¶
- Parameters:
icon_view (
Gtk.IconView
) – aGtk.IconView
path (
Gtk.TreePath
) – TheGtk.TreePath
of a selected row
A function used by
Gtk.IconView.selected_foreach
() to map all selected rows. It will be called on every selected row in the view.
- Gtk.KeySnoopFunc(grab_widget, event, *func_data)¶
- Parameters:
grab_widget (
Gtk.Widget
) – the widget to which the event will be deliveredevent (
Gdk.EventKey
) – the key eventfunc_data (
object
orNone
) – data supplied to gtk_key_snooper_install()
- Returns:
True
to stop further processing of event,False
to continue.- Return type:
Key snooper functions are called before normal event delivery. They can be used to implement custom key event handling.
- Gtk.ListBoxCreateWidgetFunc(item, *user_data)¶
- Parameters:
item (
GObject.Object
) – the item from the model for which to create a widget for
- Returns:
a
Gtk.Widget
that represents item- Return type:
Called for list boxes that are bound to a
Gio.ListModel
withGtk.ListBox.bind_model
() for each item that gets added to the model.Versions of GTK+ prior to 3.18 called
Gtk.Widget.show_all
() on the rows created by theGtk.ListBoxCreateWidgetFunc
, but this forced all widgets inside the row to be shown, and is no longer the case. Applications should be updated to show the desired row widgets.New in version 3.16.
- Gtk.ListBoxFilterFunc(row, *user_data)¶
- Parameters:
row (
Gtk.ListBoxRow
) – the row that may be filtered
- Returns:
- Return type:
Will be called whenever the row changes or is added and lets you control if the row should be visible or not.
New in version 3.10.
- Gtk.ListBoxForeachFunc(box, row, *user_data)¶
- Parameters:
box (
Gtk.ListBox
) – aGtk.ListBox
row (
Gtk.ListBoxRow
) – aGtk.ListBoxRow
A function used by
Gtk.ListBox.selected_foreach
(). It will be called on every selected child of the box.New in version 3.14.
- Gtk.ListBoxSortFunc(row1, row2, *user_data)¶
- Parameters:
row1 (
Gtk.ListBoxRow
) – the first rowrow2 (
Gtk.ListBoxRow
) – the second row
- Returns:
< 0 if row1 should be before row2, 0 if they are equal and > 0 otherwise
- Return type:
Compare two rows to determine which should be first.
New in version 3.10.
- Gtk.ListBoxUpdateHeaderFunc(row, before, *user_data)¶
- Parameters:
row (
Gtk.ListBoxRow
) – the row to updatebefore (
Gtk.ListBoxRow
orNone
) – the row before row, orNone
if it is first
Whenever row changes or which row is before row changes this is called, which lets you update the header on row. You may remove or set a new one via
Gtk.ListBoxRow.set_header
() or just change the state of the current header widget.New in version 3.10.
- Gtk.MenuDetachFunc(attach_widget, menu)¶
- Parameters:
attach_widget (
Gtk.Widget
) – theGtk.Widget
that the menu is being detached from.
A user function supplied when calling
Gtk.Menu.attach_to_widget
() which will be called when the menu is later detached from the widget.
- Gtk.MenuPositionFunc(menu, x, y, *user_data)¶
- Parameters:
x (
int
) – address of theint
representing the horizontal position where the menu shall be drawn.y (
int
) – address of theint
representing the vertical position where the menu shall be drawn. This is an output parameter.user_data (
object
orNone
) – the data supplied by the user in theGtk.Menu.popup
() data parameter.
- Returns:
- x:
address of the
int
representing the horizontal position where the menu shall be drawn.- y:
address of the
int
representing the vertical position where the menu shall be drawn. This is an output parameter.- push_in:
This parameter controls how menus placed outside the monitor are handled. If this is set to
True
and part of the menu is outside the monitor then GTK+ pushes the window into the visible area, effectively modifying the popup position. Note that moving and possibly resizing the menu around will alter the scroll position to keep the menu items “in place”, i.e. at the same monitor position they would have been without resizing. In practice, this behavior is only useful for combobox popups or option menus and cannot be used to simply confine a menu to monitor boundaries. In that case, changing the scroll offset is not desirable.
- Return type:
A user function supplied when calling
Gtk.Menu.popup
() which controls the positioning of the menu when it is displayed. The function sets the x and y parameters to the coordinates where the menu is to be drawn. To make the menu appear on a different monitor than the mouse pointer,Gtk.Menu.set_monitor
() must be called.
- Gtk.ModuleDisplayInitFunc(display)¶
- Parameters:
display (
Gdk.Display
) – an openGdk.Display
A multihead-aware GTK+ module may have a gtk_module_display_init() function with this prototype. GTK+ calls this function for each opened display.
New in version 2.2.
- Gtk.ModuleInitFunc(argv)¶
-
Each GTK+ module must have a function gtk_module_init() with this prototype. This function is called after loading the module.
- Gtk.PageSetupDoneFunc(page_setup, *data)¶
- Parameters:
page_setup (
Gtk.PageSetup
) – theGtk.PageSetup
that has beendata (
object
orNone
) – user data that has been passed toGtk.print_run_page_setup_dialog_async
()
The type of function that is passed to
Gtk.print_run_page_setup_dialog_async
().This function will be called when the page setup dialog is dismissed, and also serves as destroy notify for data.
- Gtk.PrintSettingsFunc(key, value, *user_data)¶
- Gtk.RcPropertyParser(pspec, rc_string, property_value)¶
- Parameters:
pspec (
GObject.ParamSpec
) –rc_string (
GLib.String
) –property_value (
GObject.Value
) –
- Return type:
- Gtk.RecentFilterFunc(filter_info, *user_data)¶
- Parameters:
filter_info (
Gtk.RecentFilterInfo
) – aGtk.RecentFilterInfo
that is filled according to the needed flags passed toGtk.RecentFilter.add_custom
()user_data (
object
orNone
) – user data passed toGtk.RecentFilter.add_custom
()
- Returns:
True
if the file should be displayed- Return type:
The type of function that is used with custom filters, see
Gtk.RecentFilter.add_custom
().
- Gtk.RecentSortFunc(a, b, *user_data)¶
- Parameters:
a (
Gtk.RecentInfo
) –b (
Gtk.RecentInfo
) –
- Return type:
- Gtk.StylePropertyParser(string, value)¶
- Parameters:
string (
str
) –value (
GObject.Value
) –
- Return type:
- Gtk.TextBufferDeserializeFunc(register_buffer, content_buffer, iter, data, create_tags, *user_data)¶
- Parameters:
register_buffer (
Gtk.TextBuffer
) – theGtk.TextBuffer
the format is registered withcontent_buffer (
Gtk.TextBuffer
) – theGtk.TextBuffer
to deserialize intoiter (
Gtk.TextIter
) – insertion point for the deserialized textdata (
bytes
) – data to deserializeuser_data (
object
orNone
) – user data that was specified when registering the format
- Returns:
- Return type:
A function that is called to deserialize rich text that has been serialized with
Gtk.TextBuffer.serialize
(), and insert it at iter.
- Gtk.TextBufferSerializeFunc(register_buffer, content_buffer, start, end, *user_data)¶
- Parameters:
register_buffer (
Gtk.TextBuffer
) – theGtk.TextBuffer
for which the format is registeredcontent_buffer (
Gtk.TextBuffer
) – theGtk.TextBuffer
to serializestart (
Gtk.TextIter
) – start of the block of text to serializeend (
Gtk.TextIter
) – end of the block of text to serializeuser_data (
object
orNone
) – user data that was specified when registering the format
- Returns:
a newly-allocated array of guint8 which contains the serialized data, or
None
if an error occurred- Return type:
A function that is called to serialize the content of a text buffer. It must return the serialized form of the content.
- Gtk.TextCharPredicate(ch, *user_data)¶
- Gtk.TextTagTableForeach(tag, *data)¶
- Parameters:
tag (
Gtk.TextTag
) – theGtk.TextTag
data (
object
orNone
) – data passed toGtk.TextTagTable.foreach
()
- Gtk.TickCallback(widget, frame_clock, *user_data)¶
- Parameters:
widget (
Gtk.Widget
) – the widgetframe_clock (
Gdk.FrameClock
) – the frame clock for the widget (same as callingGtk.Widget.get_frame_clock
())user_data (
object
orNone
) – user data passed toGtk.Widget.add_tick_callback
().
- Returns:
GLib.SOURCE_CONTINUE
if the tick callback should continue to be called,GLib.SOURCE_REMOVE
if the tick callback should be removed.- Return type:
Callback type for adding a function to update animations. See
Gtk.Widget.add_tick_callback
().New in version 3.8.
- Gtk.TranslateFunc(path, *func_data)¶
- Parameters:
path (
str
) – The id of the message. InGtk.ActionGroup
this will be a label or tooltip from aGtk.ActionEntry
.func_data (
object
orNone
) – user data passed in when registering the function
- Returns:
the translated message
- Return type:
The function used to translate messages in e.g.
Gtk.IconFactory
andGtk.ActionGroup
.Deprecated since version 3.10.
- Gtk.TreeCellDataFunc(tree_column, cell, tree_model, iter, *data)¶
- Parameters:
tree_column (
Gtk.TreeViewColumn
) – AGtk.TreeViewColumn
cell (
Gtk.CellRenderer
) – TheGtk.CellRenderer
that is being rendered by tree_columntree_model (
Gtk.TreeModel
) – TheGtk.TreeModel
being renderediter (
Gtk.TreeIter
) – AGtk.TreeIter
of the current row rendered
A function to set the properties of a cell instead of just using the straight mapping between the cell and the model. This is useful for customizing the cell renderer. For example, a function might get an integer from the tree_model, and render it to the “text” attribute of “cell” by converting it to its written equivalent. This is set by calling
Gtk.TreeViewColumn.set_cell_data_func
()
- Gtk.TreeDestroyCountFunc(tree_view, path, children, *user_data)¶
- Parameters:
tree_view (
Gtk.TreeView
) –path (
Gtk.TreePath
) –children (
int
) –
- Gtk.TreeIterCompareFunc(model, a, b, *user_data)¶
- Parameters:
model (
Gtk.TreeModel
) – TheGtk.TreeModel
the comparison is withina (
Gtk.TreeIter
) – AGtk.TreeIter
in modelb (
Gtk.TreeIter
) – AnotherGtk.TreeIter
in modeluser_data (
object
orNone
) – Data passed when the compare func is assigned e.g. byGtk.TreeSortable.set_sort_func
()
- Returns:
a negative integer, zero or a positive integer depending on whether a sorts before, with or after b
- Return type:
A
Gtk.TreeIterCompareFunc
should return a negative integer, zero, or a positive integer if a sorts before b, a sorts with b, or a sorts after b respectively. If two iters compare as equal, their order in the sorted model is undefined. In order to ensure that theGtk.TreeSortable
behaves as expected, theGtk.TreeIterCompareFunc
must define a partial order on the model, i.e. it must be reflexive, antisymmetric and transitive.For example, if model is a product catalogue, then a compare function for the “price” column could be one which returns
price_of(@a) - price_of(@b)
.
- Gtk.TreeModelFilterModifyFunc(model, iter, column, *data)¶
- Parameters:
model (
Gtk.TreeModel
) – theGtk.TreeModelFilter
iter (
Gtk.TreeIter
) – aGtk.TreeIter
pointing to the row whose display values are determinedcolumn (
int
) – the column whose display value is determineddata (
object
orNone
) – user data given toGtk.TreeModelFilter.set_modify_func
()
- Returns:
A
GObject.Value
which is already initialized for with the correct type for the column column.- Return type:
value:
GObject.Value
A function which calculates display values from raw values in the model. It must fill value with the display value for the column column in the row indicated by iter.
Since this function is called for each data access, it’s not a particularly efficient operation.
- Gtk.TreeModelFilterVisibleFunc(model, iter, *data)¶
- Parameters:
model (
Gtk.TreeModel
) – the child model of theGtk.TreeModelFilter
iter (
Gtk.TreeIter
) – aGtk.TreeIter
pointing to the row in model whose visibility is determineddata (
object
orNone
) – user data given toGtk.TreeModelFilter.set_visible_func
()
- Returns:
Whether the row indicated by iter is visible.
- Return type:
A function which decides whether the row indicated by iter is visible.
- Gtk.TreeModelForeachFunc(model, path, iter, *data)¶
- Parameters:
model (
Gtk.TreeModel
) – theGtk.TreeModel
being iteratedpath (
Gtk.TreePath
) – the currentGtk.TreePath
iter (
Gtk.TreeIter
) – the currentGtk.TreeIter
data (
object
orNone
) – The user data passed toGtk.TreeModel.foreach
()
- Returns:
- Return type:
Type of the callback passed to
Gtk.TreeModel.foreach
() to iterate over the rows in a tree model.
- Gtk.TreeSelectionForeachFunc(model, path, iter, *data)¶
- Parameters:
model (
Gtk.TreeModel
) – TheGtk.TreeModel
being viewedpath (
Gtk.TreePath
) – TheGtk.TreePath
of a selected rowiter (
Gtk.TreeIter
) – AGtk.TreeIter
pointing to a selected row
A function used by
Gtk.TreeSelection.selected_foreach
() to map all selected rows. It will be called on every selected row in the view.
- Gtk.TreeSelectionFunc(selection, model, path, path_currently_selected, *data)¶
- Parameters:
selection (
Gtk.TreeSelection
) – AGtk.TreeSelection
model (
Gtk.TreeModel
) – AGtk.TreeModel
being viewedpath (
Gtk.TreePath
) – TheGtk.TreePath
of the row in questionpath_currently_selected (
bool
) –True
, if the path is currently selected
- Returns:
True
, if the selection state of the row can be toggled- Return type:
A function used by
Gtk.TreeSelection.set_select_function
() to filter whether or not a row may be selected. It is called whenever a row’s state might change. A return value ofTrue
indicates to selection that it is okay to change the selection.
- Gtk.TreeViewColumnDropFunc(tree_view, column, prev_column, next_column, *data)¶
- Parameters:
tree_view (
Gtk.TreeView
) – AGtk.TreeView
column (
Gtk.TreeViewColumn
) – TheGtk.TreeViewColumn
being draggedprev_column (
Gtk.TreeViewColumn
) – AGtk.TreeViewColumn
on one side of columnnext_column (
Gtk.TreeViewColumn
) – AGtk.TreeViewColumn
on the other side of column
- Returns:
True
, if column can be dropped in this spot- Return type:
Function type for determining whether column can be dropped in a particular spot (as determined by prev_column and next_column). In left to right locales, prev_column is on the left of the potential drop spot, and next_column is on the right. In right to left mode, this is reversed. This function should return
True
if the spot is a valid drop spot. Please note that returningTrue
does not actually indicate that the column drop was made, but is meant only to indicate a possible drop spot to the user.
- Gtk.TreeViewMappingFunc(tree_view, path, *user_data)¶
- Parameters:
tree_view (
Gtk.TreeView
) – AGtk.TreeView
path (
Gtk.TreePath
) – The path that’s expanded
Function used for
Gtk.TreeView.map_expanded_rows
().
- Gtk.TreeViewRowSeparatorFunc(model, iter, *data)¶
- Parameters:
model (
Gtk.TreeModel
) – theGtk.TreeModel
iter (
Gtk.TreeIter
) – aGtk.TreeIter
pointing at a row in model
- Returns:
True
if the row is a separator- Return type:
Function type for determining whether the row pointed to by iter should be rendered as a separator. A common way to implement this is to have a boolean column in the model, whose values the
Gtk.TreeViewRowSeparatorFunc
returns.
- Gtk.TreeViewSearchEqualFunc(model, column, key, iter, *search_data)¶
- Parameters:
model (
Gtk.TreeModel
) – theGtk.TreeModel
being searchedcolumn (
int
) – the search column set byGtk.TreeView.set_search_column
()key (
str
) – the key string to compare withiter (
Gtk.TreeIter
) – aGtk.TreeIter
pointing the row of model that should be compared with key.search_data (
object
orNone
) – user data fromGtk.TreeView.set_search_equal_func
()
- Returns:
- Return type:
A function used for checking whether a row in model matches a search key string entered by the user. Note the return value is reversed from what you would normally expect, though it has some similarity to strcmp() returning 0 for equal strings.
- Gtk.TreeViewSearchPositionFunc(tree_view, search_dialog, *user_data)¶
- Parameters:
tree_view (
Gtk.TreeView
) –search_dialog (
Gtk.Widget
) –