mirror of
https://github.com/anotherhadi/ilovetui.git
synced 2026-08-21 12:05:49 +02:00
app msgs
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
package app
|
||||
|
||||
import tea "charm.land/bubbletea/v2"
|
||||
|
||||
type QuitMsg struct{}
|
||||
|
||||
func Quit() tea.Cmd {
|
||||
return func() tea.Msg { return QuitMsg{} }
|
||||
}
|
||||
|
||||
type FocusMsg struct{}
|
||||
|
||||
func Focus() tea.Cmd {
|
||||
return func() tea.Msg { return FocusMsg{} }
|
||||
}
|
||||
|
||||
type BlurMsg struct{}
|
||||
|
||||
func Blur() tea.Cmd {
|
||||
return func() tea.Msg { return BlurMsg{} }
|
||||
}
|
||||
|
||||
type RequestFocusMsg struct{}
|
||||
|
||||
func RequestFocus() tea.Cmd {
|
||||
return func() tea.Msg { return RequestFocusMsg{} }
|
||||
}
|
||||
|
||||
type SetTitleMsg struct{ Title string }
|
||||
|
||||
func SetTitle(title string) tea.Cmd {
|
||||
return func() tea.Msg { return SetTitleMsg{Title: title} }
|
||||
}
|
||||
Reference in New Issue
Block a user