Skip to content

Commit

Permalink
Merge pull request #678 from diamondburned/add/list-store-insert
Browse files Browse the repository at this point in the history
Add a binding for gtk_list_store_insert
  • Loading branch information
andre-hub committed Nov 29, 2020
2 parents e275c5c + 6008556 commit a3dcef6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gtk/gtk.go
Original file line number Diff line number Diff line change
Expand Up @@ -5932,6 +5932,14 @@ func (v *ListStore) InsertWithValues(iter *TreeIter, position int, inColumns []i
return nil
}

// Insert() is a wrapper around gtk_list_store_insert().
func (v *ListStore) Insert(position int) *TreeIter {
var ti C.GtkTreeIter
C.gtk_list_store_insert(v.native(), &ti, C.gint(position))
iter := &TreeIter{ti}
return iter
}

// InsertBefore() is a wrapper around gtk_list_store_insert_before().
func (v *ListStore) InsertBefore(sibling *TreeIter) *TreeIter {
var ti C.GtkTreeIter
Expand Down

0 comments on commit a3dcef6

Please sign in to comment.