extras

package
v0.0.5-0...-0379fef Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const EmbedMainCSS = ".embed { border-left: 4px solid #%06X; }"

Variables

This section is empty.

Functions

func NewAnyAttachmentUnsafe

func NewAnyAttachmentUnsafe(name, url string, size uint64) gtkutils.ExtendedWidget

func NewAttachmentUnsafe

func NewAttachmentUnsafe(msg *discord.Message) []gtk.IWidget

func NewEmbedUnsafe

func NewEmbedUnsafe(s *ningen.State, msg *discord.Message) []gtk.IWidget

func NewSaver

func NewSaver(filename string, onSave func(string)) func()

func SpawnPreviewDialog

func SpawnPreviewDialog(proxy, imageURL string)

func SpawnUploader

func SpawnUploader(callback func(absolutePath []string))

func WithPreviewer

func WithPreviewer(fc *gtk.FileChooserDialog)

Types

type MessageUploader

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

func NewMessageUploader

func NewMessageUploader(paths []string) (*MessageUploader, error)

func (*MessageUploader) Close

func (m *MessageUploader) Close()

func (*MessageUploader) MakeSendData

func (m *MessageUploader) MakeSendData(message *discord.Message) api.SendMessageData

type PreviewDialog

type PreviewDialog struct {
	*handy.Dialog
	Content *gtk.Box

	Image *gtk.Image

	OpenOriginal *gtk.Button
	ImageView    *gtk.ScrolledWindow

	Proxy string
	URL   string
}

func (*PreviewDialog) Fetch

func (pd *PreviewDialog) Fetch(w, h int)

type ProgressUploader

type ProgressUploader struct {
	*gtk.Box

	Name string
	// contains filtered or unexported fields
}

func NewProgressUploader

func NewProgressUploader(Name string, r io.ReadCloser, s int64) *ProgressUploader

func (*ProgressUploader) Close

func (p *ProgressUploader) Close() error

func (*ProgressUploader) Read

func (p *ProgressUploader) Read(b []byte) (int, error)

type Uploader

type Uploader struct {
	*gtk.FileChooserNativeDialog
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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