當前位置: 首頁>>代碼示例>>Golang>>正文


Golang xprop.ChangeProp32函數代碼示例

本文整理匯總了Golang中github.com/Nightgunner5/xgbutil/xprop.ChangeProp32函數的典型用法代碼示例。如果您正苦於以下問題:Golang ChangeProp32函數的具體用法?Golang ChangeProp32怎麽用?Golang ChangeProp32使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ChangeProp32函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: DesktopLayoutSet

// _NET_DESKTOP_LAYOUT set
func DesktopLayoutSet(xu *xgbutil.XUtil, orientation, columns, rows,
	startingCorner uint) error {

	return xprop.ChangeProp32(xu, xu.RootWin(), "_NET_DESKTOP_LAYOUT",
		"CARDINAL", orientation, columns, rows,
		startingCorner)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:8,代碼來源:ewmh.go

示例2: WmStateSet

// WM_STATE set
func WmStateSet(xu *xgbutil.XUtil, win xproto.Window, state *WmState) error {
	raw := []uint{
		state.State,
		uint(state.Icon),
	}

	return xprop.ChangeProp32(xu, win, "WM_STATE", "WM_STATE", raw...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:9,代碼來源:icccm.go

示例3: WmIconSet

// _NET_WM_ICON set
func WmIconSet(xu *xgbutil.XUtil, win xproto.Window, icons []WmIcon) error {
	raw := make([]uint, 0, 10000) // start big
	for _, icon := range icons {
		raw = append(raw, icon.Width, icon.Height)
		raw = append(raw, icon.Data...)
	}

	return xprop.ChangeProp32(xu, win, "_NET_WM_ICON", "CARDINAL", raw...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:10,代碼來源:ewmh.go

示例4: WmWindowTypeSet

// _NET_WM_WINDOW_TYPE set
// This will create any atoms used in 'atomNames' if they don't already exist.
func WmWindowTypeSet(xu *xgbutil.XUtil, win xproto.Window,
	atomNames []string) error {

	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}
	return xprop.ChangeProp32(xu, win, "_NET_WM_WINDOW_TYPE", "ATOM", atoms...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例5: WmProtocolsSet

// WM_PROTOCOLS set
func WmProtocolsSet(xu *xgbutil.XUtil, win xproto.Window,
	atomNames []string) error {

	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}
	return xprop.ChangeProp32(xu, win, "WM_PROTOCOLS", "ATOM", atoms...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:10,代碼來源:icccm.go

示例6: SupportedSet

// _NET_SUPPORTED set
// This will create any atoms in the argument if they don't already exist.
func SupportedSet(xu *xgbutil.XUtil, atomNames []string) error {
	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}

	return xprop.ChangeProp32(xu, xu.RootWin(), "_NET_SUPPORTED", "ATOM",
		atoms...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例7: WmStrutSet

// _NET_WM_STRUT set
func WmStrutSet(xu *xgbutil.XUtil, win xproto.Window, struts *WmStrut) error {
	rawStruts := make([]uint, 4)
	rawStruts[0] = struts.Left
	rawStruts[1] = struts.Right
	rawStruts[2] = struts.Top
	rawStruts[3] = struts.Bottom

	return xprop.ChangeProp32(xu, win, "_NET_WM_STRUT", "CARDINAL",
		rawStruts...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例8: WmHintsSet

// WM_HINTS set
// Make sure to set the flags in the Hints struct correctly!
func WmHintsSet(xu *xgbutil.XUtil, win xproto.Window, hints *Hints) error {
	raw := []uint{
		hints.Flags, hints.Input, hints.InitialState,
		uint(hints.IconPixmap), uint(hints.IconWindow),
		uint(hints.IconX), uint(hints.IconY),
		uint(hints.IconMask),
		uint(hints.WindowGroup),
	}
	return xprop.ChangeProp32(xu, win, "WM_HINTS", "WM_HINTS", raw...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:12,代碼來源:icccm.go

示例9: DesktopViewportSet

// _NET_DESKTOP_VIEWPORT set
func DesktopViewportSet(xu *xgbutil.XUtil, viewports []DesktopViewport) error {
	coords := make([]uint, len(viewports)*2)
	for i, viewport := range viewports {
		coords[i*2] = uint(viewport.X)
		coords[i*2+1] = uint(viewport.Y)
	}

	return xprop.ChangeProp32(xu, xu.RootWin(), "_NET_DESKTOP_VIEWPORT",
		"CARDINAL", coords...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例10: ShowingDesktopSet

// _NET_SHOWING_DESKTOP set
func ShowingDesktopSet(xu *xgbutil.XUtil, show bool) error {
	var showInt uint
	if show {
		showInt = 1
	} else {
		showInt = 0
	}
	return xprop.ChangeProp32(xu, xu.RootWin(), "_NET_SHOWING_DESKTOP",
		"CARDINAL", showInt)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例11: WmHandledIconsSet

// _NET_WM_HANDLED_ICONS set
func WmHandledIconsSet(xu *xgbutil.XUtil, handle bool) error {
	var handled uint
	if handle {
		handled = 1
	} else {
		handled = 0
	}
	return xprop.ChangeProp32(xu, xu.RootWin(), "_NET_WM_HANDLED_ICONS",
		"CARDINAL", handled)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例12: FrameExtentsSet

// _NET_FRAME_EXTENTS set
func FrameExtentsSet(xu *xgbutil.XUtil, win xproto.Window,
	extents *FrameExtents) error {
	raw := make([]uint, 4)
	raw[0] = uint(extents.Left)
	raw[1] = uint(extents.Right)
	raw[2] = uint(extents.Top)
	raw[3] = uint(extents.Bottom)

	return xprop.ChangeProp32(xu, win, "_NET_FRAME_EXTENTS", "CARDINAL", raw...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:11,代碼來源:ewmh.go

示例13: WmAllowedActionsSet

// _NET_WM_ALLOWED_ACTIONS set
func WmAllowedActionsSet(xu *xgbutil.XUtil, win xproto.Window,
	atomNames []string) error {

	atoms, err := xprop.StrToAtoms(xu, atomNames)
	if err != nil {
		return err
	}

	return xprop.ChangeProp32(xu, win, "_NET_WM_ALLOWED_ACTIONS", "ATOM",
		atoms...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:12,代碼來源:ewmh.go

示例14: WmIconSizeSet

// WM_ICON_SIZE set
func WmIconSizeSet(xu *xgbutil.XUtil, win xproto.Window,
	icondim *IconSize) error {

	raw := []uint{
		icondim.MinWidth, icondim.MinHeight,
		icondim.MaxWidth, icondim.MaxHeight,
		icondim.WidthInc, icondim.HeightInc,
	}

	return xprop.ChangeProp32(xu, win, "WM_ICON_SIZE", "WM_ICON_SIZE", raw...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:12,代碼來源:icccm.go

示例15: WmIconGeometrySet

// _NET_WM_ICON_GEOMETRY set
func WmIconGeometrySet(xu *xgbutil.XUtil, win xproto.Window,
	geom *WmIconGeometry) error {

	rawGeom := make([]uint, 4)
	rawGeom[0] = uint(geom.X)
	rawGeom[1] = uint(geom.Y)
	rawGeom[2] = geom.Width
	rawGeom[3] = geom.Height

	return xprop.ChangeProp32(xu, win, "_NET_WM_ICON_GEOMETRY", "CARDINAL",
		rawGeom...)
}
開發者ID:Nightgunner5,項目名稱:xgbutil,代碼行數:13,代碼來源:ewmh.go


注:本文中的github.com/Nightgunner5/xgbutil/xprop.ChangeProp32函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。