linux

package
v2.0.0-...-21d7e90 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GTK_FILE_CHOOSER_ACTION_OPEN          C.GtkFileChooserAction = C.GTK_FILE_CHOOSER_ACTION_OPEN
	GTK_FILE_CHOOSER_ACTION_SAVE          C.GtkFileChooserAction = C.GTK_FILE_CHOOSER_ACTION_SAVE
	GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER C.GtkFileChooserAction = C.GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
)

Variables

This section is empty.

Functions

func GtkCheckMenuItemWithLabel

func GtkCheckMenuItemWithLabel(label string) *C.GtkWidget

func GtkMenuItemWithLabel

func GtkMenuItemWithLabel(label string) *C.GtkWidget

func GtkRadioMenuItemWithLabel

func GtkRadioMenuItemWithLabel(label string, group *C.GSList) *C.GtkWidget

Types

type Calloc

type Calloc struct {
	// contains filtered or unexported fields
}

Calloc handles alloc/dealloc of C data

func NewCalloc

func NewCalloc() Calloc

NewCalloc creates a new allocator

func (Calloc) Free

func (c Calloc) Free()

Free frees all allocated C memory

func (Calloc) String

func (c Calloc) String(in string) *C.char

String creates a new C string and retains a reference to it

type EventNotify

type EventNotify struct {
	Name string        `json:"name"`
	Data []interface{} `json:"data"`
}

type Frontend

type Frontend struct {
	// contains filtered or unexported fields
}

func NewFrontend

func NewFrontend(ctx context.Context, appoptions *options.App, myLogger *logger.Logger, appBindings *binding.Bindings, dispatcher frontend.Dispatcher) *Frontend

func (*Frontend) BrowserOpenURL

func (f *Frontend) BrowserOpenURL(url string)

BrowserOpenURL Use the default browser to open the url

func (*Frontend) Callback

func (f *Frontend) Callback(message string)

func (*Frontend) ExecJS

func (f *Frontend) ExecJS(js string)

func (*Frontend) Hide

func (f *Frontend) Hide()

func (*Frontend) MenuSetApplicationMenu

func (f *Frontend) MenuSetApplicationMenu(menu *menu.Menu)

func (*Frontend) MenuUpdateApplicationMenu

func (f *Frontend) MenuUpdateApplicationMenu()

func (*Frontend) MessageDialog

func (f *Frontend) MessageDialog(dialogOptions frontend.MessageDialogOptions) (string, error)

func (*Frontend) Notify

func (f *Frontend) Notify(name string, data ...interface{})

func (*Frontend) OpenDirectoryDialog

func (f *Frontend) OpenDirectoryDialog(dialogOptions frontend.OpenDialogOptions) (string, error)

func (*Frontend) OpenFileDialog

func (f *Frontend) OpenFileDialog(dialogOptions frontend.OpenDialogOptions) (result string, err error)

func (*Frontend) OpenMultipleFilesDialog

func (f *Frontend) OpenMultipleFilesDialog(dialogOptions frontend.OpenDialogOptions) ([]string, error)

func (*Frontend) Quit

func (f *Frontend) Quit()

func (*Frontend) Run

func (f *Frontend) Run(ctx context.Context) error

func (*Frontend) SaveFileDialog

func (f *Frontend) SaveFileDialog(dialogOptions frontend.SaveDialogOptions) (string, error)

func (*Frontend) ScreenGetAll

func (f *Frontend) ScreenGetAll() ([]Screen, error)

func (*Frontend) Show

func (f *Frontend) Show()

func (*Frontend) WindowCenter

func (f *Frontend) WindowCenter()

func (*Frontend) WindowFullscreen

func (f *Frontend) WindowFullscreen()

func (*Frontend) WindowGetPosition

func (f *Frontend) WindowGetPosition() (int, int)

func (*Frontend) WindowGetSize

func (f *Frontend) WindowGetSize() (int, int)

func (*Frontend) WindowHide

func (f *Frontend) WindowHide()

func (*Frontend) WindowIsFullscreen

func (f *Frontend) WindowIsFullscreen() bool

func (*Frontend) WindowIsMaximised

func (f *Frontend) WindowIsMaximised() bool

func (*Frontend) WindowIsMinimised

func (f *Frontend) WindowIsMinimised() bool

func (*Frontend) WindowIsNormal

func (f *Frontend) WindowIsNormal() bool

func (*Frontend) WindowMaximise

func (f *Frontend) WindowMaximise()

func (*Frontend) WindowMinimise

func (f *Frontend) WindowMinimise()

func (*Frontend) WindowReload

func (f *Frontend) WindowReload()

func (*Frontend) WindowReloadApp

func (f *Frontend) WindowReloadApp()

func (*Frontend) WindowSetAlwaysOnTop

func (f *Frontend) WindowSetAlwaysOnTop(b bool)

func (*Frontend) WindowSetBackgroundColour

func (f *Frontend) WindowSetBackgroundColour(col *options.RGBA)

func (*Frontend) WindowSetDarkTheme

func (f *Frontend) WindowSetDarkTheme()

func (*Frontend) WindowSetLightTheme

func (f *Frontend) WindowSetLightTheme()

func (*Frontend) WindowSetMaxSize

func (f *Frontend) WindowSetMaxSize(width int, height int)

func (*Frontend) WindowSetMinSize

func (f *Frontend) WindowSetMinSize(width int, height int)

func (*Frontend) WindowSetPosition

func (f *Frontend) WindowSetPosition(x, y int)

func (*Frontend) WindowSetSize

func (f *Frontend) WindowSetSize(width, height int)

func (*Frontend) WindowSetSystemDefaultTheme

func (f *Frontend) WindowSetSystemDefaultTheme()

func (*Frontend) WindowSetTitle

func (f *Frontend) WindowSetTitle(title string)

func (*Frontend) WindowShow

func (f *Frontend) WindowShow()

func (*Frontend) WindowToggleMaximise

func (f *Frontend) WindowToggleMaximise()

func (*Frontend) WindowUnfullscreen

func (f *Frontend) WindowUnfullscreen()

func (*Frontend) WindowUnmaximise

func (f *Frontend) WindowUnmaximise()

func (*Frontend) WindowUnminimise

func (f *Frontend) WindowUnminimise()

type Screen

type Screen = frontend.Screen

func GetAllScreens

func GetAllScreens(window *C.GtkWindow) ([]Screen, error)

type Window

type Window struct {
	// contains filtered or unexported fields
}

func NewWindow

func NewWindow(appoptions *options.App, debug bool) *Window

func (*Window) Center

func (w *Window) Center()

func (*Window) Close

func (w *Window) Close()

func (*Window) Destroy

func (w *Window) Destroy()

func (*Window) ExecJS

func (w *Window) ExecJS(js string)

func (*Window) Fullscreen

func (w *Window) Fullscreen()

func (*Window) GetPosition

func (w *Window) GetPosition() (int, int)

func (*Window) Hide

func (w *Window) Hide()

func (*Window) IsFullScreen

func (w *Window) IsFullScreen() bool

func (*Window) IsMaximised

func (w *Window) IsMaximised() bool

func (*Window) IsMinimised

func (w *Window) IsMinimised() bool

func (*Window) IsNormal

func (w *Window) IsNormal() bool

func (*Window) Maximise

func (w *Window) Maximise()

func (*Window) MessageDialog

func (w *Window) MessageDialog(dialogOptions frontend.MessageDialogOptions)

func (*Window) Minimise

func (w *Window) Minimise()

func (*Window) OpenFileDialog

func (w *Window) OpenFileDialog(dialogOptions frontend.OpenDialogOptions, multipleFiles int, action C.GtkFileChooserAction)

func (*Window) Quit

func (w *Window) Quit()

func (*Window) Run

func (w *Window) Run(url string)

func (*Window) SetApplicationMenu

func (w *Window) SetApplicationMenu(inmenu *menu.Menu)

func (*Window) SetBackgroundColour

func (w *Window) SetBackgroundColour(r uint8, g uint8, b uint8, a uint8)

func (*Window) SetDecorated

func (w *Window) SetDecorated(frameless bool)

func (*Window) SetKeepAbove

func (w *Window) SetKeepAbove(top bool)

func (*Window) SetMaxSize

func (w *Window) SetMaxSize(maxWidth int, maxHeight int)

func (*Window) SetMinSize

func (w *Window) SetMinSize(minWidth int, minHeight int)

func (*Window) SetPosition

func (w *Window) SetPosition(x int, y int)

func (*Window) SetResizable

func (w *Window) SetResizable(resizable bool)

func (*Window) SetSize

func (w *Window) SetSize(width int, height int)

func (*Window) SetTitle

func (w *Window) SetTitle(title string)

func (*Window) SetWindowIcon

func (w *Window) SetWindowIcon(icon []byte)

func (*Window) Show

func (w *Window) Show()

func (*Window) Size

func (w *Window) Size() (int, int)

func (*Window) StartDrag

func (w *Window) StartDrag()

func (*Window) ToggleMaximise

func (w *Window) ToggleMaximise()

func (*Window) UnFullscreen

func (w *Window) UnFullscreen()

func (*Window) UnMaximise

func (w *Window) UnMaximise()

func (*Window) UnMinimise

func (w *Window) UnMinimise()

Jump to

Keyboard shortcuts

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