コード例 #1
0
ファイル: conversation.go プロジェクト: 0x27/coyim
// Expects to be called from the GUI thread.
// Expects to be called when conv is already locked
func insertWithTag(buff *gtk.TextBuffer, tagName, text string) {
	charCount := buff.GetCharCount()
	insertAtEnd(buff, text)
	oldEnd := buff.GetIterAtOffset(charCount)
	newEnd := buff.GetEndIter()
	buff.ApplyTagByName(tagName, oldEnd, newEnd)
}
コード例 #2
0
ファイル: conversation.go プロジェクト: 0x27/coyim
// Expects to be called from the GUI thread.
// Expects to be called when conv is already locked
func insertAtEnd(buff *gtk.TextBuffer, text string) {
	buff.Insert(buff.GetEndIter(), text)
}