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


Golang C.wlc_handle函數代碼示例

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


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

示例1: viewHandlesSliceToCArray

func viewHandlesSliceToCArray(arr []View) (*C.wlc_handle, C.size_t) {
	carr := C.handle_array_init(C.size_t(len(arr)))
	for i, h := range arr {
		C.handle_array_insert(carr, C.wlc_handle(h), C.int(i))
	}

	return carr, C.size_t(len(arr))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:8,代碼來源:util.go

示例2: GetClass

// GetClass gets class. (shell-surface only).
func (v View) GetClass() string {
	cclass := C.wlc_view_get_class(C.wlc_handle(v))
	return C.GoString(cclass)
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:5,代碼來源:view.go

示例3: GetMutableViews

// GetMutableViews gets mutable views in creation order.
//This is mainly useful for wm's who need another view stack for inplace
//sorting. For example tiling wms, may want to use this to keep their tiling
//order separated from floating order.
func (o Output) GetMutableViews() []View {
	var len C.size_t
	handles := C.wlc_output_get_mutable_views(C.wlc_handle(o), &len)
	return viewHandlesCArraytoGoSlice(handles, int(len))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:9,代碼來源:output.go

示例4: GetMask

// GetMask gets current visibility bitmask.
func (o Output) GetMask() uint32 {
	return uint32(C.wlc_output_get_mask(C.wlc_handle(o)))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:output.go

示例5: SetResolution

// SetResolution sets output resolution.
func (o Output) SetResolution(resolution Size, scale uint32) {
	csize := resolution.c()
	defer C.free(unsafe.Pointer(csize))
	C.wlc_output_set_resolution(C.wlc_handle(o), csize, C.uint32_t(scale))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:6,代碼來源:output.go

示例6: SetSleep

// SetSleep sets sleep status: wake up / sleep.
func (o Output) SetSleep(sleep bool) {
	C.wlc_output_set_sleep(C.wlc_handle(o), C._Bool(sleep))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:output.go

示例7: Name

// Name gets output name.
func (o Output) Name() string {
	cname := C.wlc_output_get_name(C.wlc_handle(o))
	return C.GoString(cname)
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:5,代碼來源:output.go

示例8: SetType

// SetType sets type bit. TOggle indicates whether it is set or not.
func (v View) SetType(typ ViewTypeBit, toggle bool) {
	C.wlc_view_set_type(C.wlc_handle(v), uint32(typ), C._Bool(toggle))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例9: SendToBack

// SendToBack sends view behind everything.
func (v View) SendToBack() {
	C.wlc_view_send_to_back(C.wlc_handle(v))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例10: SetOutput

// SetOutput sets output for view. Alternatively output.SetViews() can be used.
func (v View) SetOutput(output Output) {
	C.wlc_view_set_output(C.wlc_handle(v), C.wlc_handle(output))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例11: GetOutput

// GetOutput gets output of view.
func (v View) GetOutput() Output {
	return Output(C.wlc_view_get_output(C.wlc_handle(v)))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例12: Close

// Close closes view.
func (v View) Close() {
	C.wlc_view_close(C.wlc_handle(v))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例13: Focus

// Focus focuses view.
func (v View) Focus() {
	C.wlc_view_focus(C.wlc_handle(v))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例14: GetPID

// GetPID gets pid of program owning the view.
func (v View) GetPID() int {
	return int(C.wlc_view_get_pid(C.wlc_handle(v)))
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:4,代碼來源:view.go

示例15: GetAppID

// GetAppID gets app id. (xdg-surface only).
func (v View) GetAppID() string {
	capp := C.wlc_view_get_app_id(C.wlc_handle(v))
	return C.GoString(capp)
}
開發者ID:mikkeloscar,項目名稱:go-wlc,代碼行數:5,代碼來源:view.go


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