本文整理匯總了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))
}
示例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)
}
示例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))
}
示例4: GetMask
// GetMask gets current visibility bitmask.
func (o Output) GetMask() uint32 {
return uint32(C.wlc_output_get_mask(C.wlc_handle(o)))
}
示例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))
}
示例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))
}
示例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)
}
示例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))
}
示例9: SendToBack
// SendToBack sends view behind everything.
func (v View) SendToBack() {
C.wlc_view_send_to_back(C.wlc_handle(v))
}
示例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))
}
示例11: GetOutput
// GetOutput gets output of view.
func (v View) GetOutput() Output {
return Output(C.wlc_view_get_output(C.wlc_handle(v)))
}
示例12: Close
// Close closes view.
func (v View) Close() {
C.wlc_view_close(C.wlc_handle(v))
}
示例13: Focus
// Focus focuses view.
func (v View) Focus() {
C.wlc_view_focus(C.wlc_handle(v))
}
示例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)))
}
示例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)
}