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 (
objectorNone) – 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.Builderobject (
GObject.Object) – object to connect a signal tosignal_name (
str) – name of the signalhandler_name (
str) – name of the handlerconnect_object (
GObject.ObjectorNone) – aGObject.Object, if non-None, use g_signal_connect_object()flags (
GObject.ConnectFlags) –GObject.ConnectFlagsto 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 (
objectorNone) – 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
Nonewhen 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:
 Trueto 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:
 Trueto 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.CellLayoutcell (
Gtk.CellRenderer) – the cell renderer whose value is to be settree_model (
Gtk.TreeModel) – the modeliter (
Gtk.TreeIter) – aGtk.TreeIterindicating the row to set the value fordata (
objectorNone) – 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.Clipboarduser_data_or_owner (
objectorNone) – 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.Clipboardselection_data (
Gtk.SelectionData) – aGtk.SelectionDataargument in which the requested data should be stored.info (
int) – the info field corresponding to the requested target from theGtk.TargetEntryarray passed to gtk_clipboard_set_with_data() or gtk_clipboard_set_with_owner().user_data_or_owner (
objectorNone) – 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.Clipboardpixbuf (
GdkPixbuf.Pixbuf) – the received imagedata (
objectorNone) – 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.Clipboardselection_data (
Gtk.SelectionData) – aGtk.SelectionDatacontaining the data was received. If retrieving the data failed, then then length field of selection_data will be negative.data (
objectorNone) – 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.Clipboardformat (
Gdk.Atom) – The format of the rich texttext (
strorNone) – the rich text received, as a UTF-8 encoded string, orNoneif retrieving the data failed.length (
int) – Length of the text.data (
objectorNone) – 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.Clipboardatoms ([
Gdk.Atom] orNone) – the supported targets, as array ofGdk.Atom, orNoneif retrieving the data failed.data (
objectorNone) – 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.Clipboardtext (
strorNone) – the text received, as a UTF-8 encoded string, orNoneif retrieving the data failed.data (
objectorNone) – 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.Clipboarduris ([
str]) – the received URIsdata (
objectorNone) – 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.EntryCompletionkey (
str) – the string to match, normalized and case-foldediter (
Gtk.TreeIter) – aGtk.TreeIterindicating the row to matchuser_data (
objectorNone) – user data given toGtk.EntryCompletion.set_match_func()
- Returns:
 Trueif 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.FileFilterInfothat is filled according to the needed flags passed toGtk.FileFilter.add_custom()data (
objectorNone) – user data passed toGtk.FileFilter.add_custom()
- Returns:
 Trueif 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 (
objectorNone) – user data fromGtk.FlowBox.bind_model()
- Returns:
 a
Gtk.Widgetthat represents item- Return type:
 
Called for flow boxes that are bound to a
Gio.ListModelwithGtk.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.FlowBoxChildthat 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.FlowBoxchild (
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.FontFamilyface (
Pango.FontFace) – aPango.FontFacebelonging to familydata (
objectorNone) – user data passed toGtk.FontChooser.set_filter_func()
- Returns:
 Trueif 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.IconViewpath (
Gtk.TreePath) – TheGtk.TreePathof 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 (
objectorNone) – data supplied to gtk_key_snooper_install()
- Returns:
 Trueto stop further processing of event,Falseto 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.Widgetthat represents item- Return type:
 
Called for list boxes that are bound to a
Gio.ListModelwithGtk.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.ListBoxrow (
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.ListBoxRoworNone) – the row before row, orNoneif 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.Widgetthat 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 theintrepresenting the horizontal position where the menu shall be drawn.y (
int) – address of theintrepresenting the vertical position where the menu shall be drawn. This is an output parameter.user_data (
objectorNone) – the data supplied by the user in theGtk.Menu.popup() data parameter.
- Returns:
 - x:
 address of the
intrepresenting the horizontal position where the menu shall be drawn.- y:
 address of the
intrepresenting 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
Trueand 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.PageSetupthat has beendata (
objectorNone) – 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.RecentFilterInfothat is filled according to the needed flags passed toGtk.RecentFilter.add_custom()user_data (
objectorNone) – user data passed toGtk.RecentFilter.add_custom()
- Returns:
 Trueif 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.TextBufferthe format is registered withcontent_buffer (
Gtk.TextBuffer) – theGtk.TextBufferto deserialize intoiter (
Gtk.TextIter) – insertion point for the deserialized textdata (
bytes) – data to deserializeuser_data (
objectorNone) – 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.TextBufferfor which the format is registeredcontent_buffer (
Gtk.TextBuffer) – theGtk.TextBufferto serializestart (
Gtk.TextIter) – start of the block of text to serializeend (
Gtk.TextIter) – end of the block of text to serializeuser_data (
objectorNone) – user data that was specified when registering the format
- Returns:
 a newly-allocated array of guint8 which contains the serialized data, or
Noneif 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.TextTagdata (
objectorNone) – 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 (
objectorNone) – user data passed toGtk.Widget.add_tick_callback().
- Returns:
 GLib.SOURCE_CONTINUEif the tick callback should continue to be called,GLib.SOURCE_REMOVEif 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.ActionGroupthis will be a label or tooltip from aGtk.ActionEntry.func_data (
objectorNone) – user data passed in when registering the function
- Returns:
 the translated message
- Return type:
 
The function used to translate messages in e.g.
Gtk.IconFactoryandGtk.ActionGroup.Deprecated since version 3.10.
- Gtk.TreeCellDataFunc(tree_column, cell, tree_model, iter, *data)¶
 - Parameters:
 tree_column (
Gtk.TreeViewColumn) – AGtk.TreeViewColumncell (
Gtk.CellRenderer) – TheGtk.CellRendererthat is being rendered by tree_columntree_model (
Gtk.TreeModel) – TheGtk.TreeModelbeing renderediter (
Gtk.TreeIter) – AGtk.TreeIterof 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.TreeModelthe comparison is withina (
Gtk.TreeIter) – AGtk.TreeIterin modelb (
Gtk.TreeIter) – AnotherGtk.TreeIterin modeluser_data (
objectorNone) – 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.TreeIterCompareFuncshould 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.TreeSortablebehaves as expected, theGtk.TreeIterCompareFuncmust 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.TreeModelFilteriter (
Gtk.TreeIter) – aGtk.TreeIterpointing to the row whose display values are determinedcolumn (
int) – the column whose display value is determineddata (
objectorNone) – user data given toGtk.TreeModelFilter.set_modify_func()
- Returns:
 A
GObject.Valuewhich 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.TreeModelFilteriter (
Gtk.TreeIter) – aGtk.TreeIterpointing to the row in model whose visibility is determineddata (
objectorNone) – 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.TreeModelbeing iteratedpath (
Gtk.TreePath) – the currentGtk.TreePathiter (
Gtk.TreeIter) – the currentGtk.TreeIterdata (
objectorNone) – 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.TreeModelbeing viewedpath (
Gtk.TreePath) – TheGtk.TreePathof a selected rowiter (
Gtk.TreeIter) – AGtk.TreeIterpointing 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.TreeSelectionmodel (
Gtk.TreeModel) – AGtk.TreeModelbeing viewedpath (
Gtk.TreePath) – TheGtk.TreePathof 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 ofTrueindicates 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.TreeViewcolumn (
Gtk.TreeViewColumn) – TheGtk.TreeViewColumnbeing draggedprev_column (
Gtk.TreeViewColumn) – AGtk.TreeViewColumnon one side of columnnext_column (
Gtk.TreeViewColumn) – AGtk.TreeViewColumnon 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
Trueif the spot is a valid drop spot. Please note that returningTruedoes 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.TreeViewpath (
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.TreeModeliter (
Gtk.TreeIter) – aGtk.TreeIterpointing at a row in model
- Returns:
 Trueif 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.TreeViewRowSeparatorFuncreturns.
- Gtk.TreeViewSearchEqualFunc(model, column, key, iter, *search_data)¶
 - Parameters:
 model (
Gtk.TreeModel) – theGtk.TreeModelbeing searchedcolumn (
int) – the search column set byGtk.TreeView.set_search_column()key (
str) – the key string to compare withiter (
Gtk.TreeIter) – aGtk.TreeIterpointing the row of model that should be compared with key.search_data (
objectorNone) – 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) –