window

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecoOpt

type DecoOpt int

options: DECO_AUTO_SHOW_HIDE

const (
	DECO_AUTO_SHOW_HIDE   DecoOpt = 1 << 1
	DECO_INIT_TRANSPARENT DecoOpt = 1 << 2
)

type WinDecorationStructure

type WinDecorationStructure struct {
	DefaultCssName,

	AdditionalCss string

	TransparentFG,
	TransparentBG *gdk.RGBA

	Options DecoOpt

	CallbackALTPressed func(isTitleDisplayed bool)
	// contains filtered or unexported fields
}

WinDecorationStructure: structure to hold methods and bahaviors for the window decoration.

func WinDecorationStructureNew

func WinDecorationStructureNew(
	window *gtk.Window,
	eventResize,
	eventMinimize,
	eventRoot *gtk.EventBox, options ...DecoOpt) (wds *WinDecorationStructure, err error)

WinDecorationStructureNew: create a new structure to hold decorations methods and manage behaviors.

func (*WinDecorationStructure) CssApply

func (wds *WinDecorationStructure) CssApply(cssIn string) (err error)

CssApply:

func (*WinDecorationStructure) DiscreteHideWindow

func (wds *WinDecorationStructure) DiscreteHideWindow()

DiscreteHideWindow:

func (*WinDecorationStructure) DiscreteShowWindow

func (wds *WinDecorationStructure) DiscreteShowWindow()

DiscreteShowWindow:

func (*WinDecorationStructure) Init

func (wds *WinDecorationStructure) Init() (err error)

func (*WinDecorationStructure) SignalHandleBlockUnblock

func (wds *WinDecorationStructure) SignalHandleBlockUnblock(
	ifaceWdgt gtk.IWidget,
	callbackEnter,
	callbackLeave func())

SignalHandleBlockUnblock: Block / unblock the MOVING window signal for a given Widget. NOTE: Does not work well on TextView, the use of his ScrolledWindow container is required.

func (*WinDecorationStructure) SplashWin

func (wds *WinDecorationStructure) SplashWin(image *gtk.Image, text string) (err error)

SplashWin: display a splash window with image inside it.

func (*WinDecorationStructure) TransparentBackground

func (wds *WinDecorationStructure) TransparentBackground(foreground, background *gdk.RGBA) (err error)

TransparentBackground: Make background window transparent using r, g, b -> colors 0-255 and, a -> alpha as float 0.0 - 1.0 Note: Window's CSS name is changed to match the embeded one. Note1: The targeted window must not been shown before 1st call.

func (*WinDecorationStructure) TransparentBackgroundReset

func (wds *WinDecorationStructure) TransparentBackgroundReset()

TransparentBackgroundReset:

func (*WinDecorationStructure) WidgetFader

func (wds *WinDecorationStructure) WidgetFader(
	iWidget gtk.IWidget,
	seconds float64,
	callbackDone func(),
	fadeOut ...bool)

WidgetFader: Provide fadeIn or fadeOut in seconds using the given widget. NOTE: the timer is not really accurate, using 10sec timer, the real time passed is 10sec +- 580ms. Not really a problem for simple splash screen or similar.

func (*WinDecorationStructure) WinDispRootImg

func (wds *WinDecorationStructure) WinDispRootImg(isRoot bool)

WinDispRootImg: Display icon ROOT if needed

Jump to

Keyboard shortcuts

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