view

package
v0.0.0-...-f565332 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2025 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChatRow

func NewChatRow(ctx context.Context, parent UiParent, chat *db.Conversation) (*chatItemRow, error)

func NewMessageRowUi

func NewMessageRowUi(ctx context.Context, parent UiParent, message *models.MessageModel) *messageRowUi

Types

type ChatListUiView

type ChatListUiView struct {
	*gtk.ScrolledWindow
	// contains filtered or unexported fields
}

func NewChatListView

func NewChatListView(parent UiParent) *ChatListUiView

func (*ChatListUiView) Close

func (ch *ChatListUiView) Close()

func (*ChatListUiView) Done

func (ch *ChatListUiView) Done() <-chan struct{}

func (*ChatListUiView) Title

func (ch *ChatListUiView) Title() string

func (*ChatListUiView) Update

func (ch *ChatListUiView) Update(msg *UiMessage) error

type ChatUiView

type ChatUiView struct {
	*gtk.Box
	// contains filtered or unexported fields
}

func NewChatView

func NewChatView(parent UiParent) *ChatUiView

func (*ChatUiView) ClearMessages

func (ch *ChatUiView) ClearMessages(startTimestamp *time.Time, endTimestamp *time.Time)

func (*ChatUiView) Close

func (ch *ChatUiView) Close()

func (*ChatUiView) Done

func (ch *ChatUiView) Done() <-chan struct{}

func (*ChatUiView) LoadMessages

func (ch *ChatUiView) LoadMessages(startTimestamp *time.Time, endTimestamp *time.Time, limit int)

func (*ChatUiView) Title

func (ch *ChatUiView) Title() string

func (*ChatUiView) Update

func (ch *ChatUiView) Update(msg *UiMessage) error

type Message

type Message uint8
const (
	Undefined Message = iota
	Close
	LoadingView
	ErrorView
	QrView
	ChatListView
	ChatView
	ProfileView
)

type MessageUiView

type MessageUiView struct {
	*gtk.Box
	// contains filtered or unexported fields
}

func NewMessageView

func NewMessageView(parent UiParent) *MessageUiView

func (*MessageUiView) Close

func (m *MessageUiView) Close()

func (*MessageUiView) Done

func (m *MessageUiView) Done() <-chan struct{}

func (*MessageUiView) Title

func (m *MessageUiView) Title() string

func (*MessageUiView) Update

func (m *MessageUiView) Update(msg *UiMessage) error

type ProfileUiView

type ProfileUiView struct {
	*gtk.Box
	// contains filtered or unexported fields
}

func NewProfileUiView

func NewProfileUiView(parent UiParent) *ProfileUiView

func (*ProfileUiView) Close

func (pv *ProfileUiView) Close()

func (*ProfileUiView) Done

func (pv *ProfileUiView) Done() <-chan struct{}

func (*ProfileUiView) Title

func (pv *ProfileUiView) Title() string

func (*ProfileUiView) Update

func (pv *ProfileUiView) Update(msg *UiMessage) error

type QrUiView

type QrUiView struct {
	*gtk.ScrolledWindow
	// contains filtered or unexported fields
}

func NewQrUiView

func NewQrUiView(parent UiParent) *QrUiView

func (*QrUiView) Close

func (m *QrUiView) Close()

func (*QrUiView) Done

func (m *QrUiView) Done() <-chan struct{}

func (*QrUiView) RefreshQrCode

func (qr *QrUiView) RefreshQrCode()

func (*QrUiView) ShowError

func (qr *QrUiView) ShowError(err error)

func (*QrUiView) Title

func (qr *QrUiView) Title() string

func (*QrUiView) Update

func (qr *QrUiView) Update(msg *UiMessage) error

type UiMessage

type UiMessage struct {
	Identifier Message
	Payload    interface{}
	Error      error
}

type UiParent

type UiParent interface {
	QueueMessage(v Message, payload interface{})
	GetChatClient() *whatsmeow.Client
	GetChatDB() *db.Database
	GetContacts() (map[types.JID]types.ContactInfo, error)
}

type UiView

type UiView interface {
	gtk.Widgetter
	Update(msg *UiMessage) error
	Done() <-chan struct{}
	Close()
	Title() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL