1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731
|
// Code generated by "./generator ./com.deepin.daemon.display"; DO NOT EDIT.
package display
import (
"errors"
"unsafe"
"github.com/godbus/dbus"
"pkg.deepin.io/lib/dbusutil/proxy"
)
type Display struct {
display // interface com.deepin.daemon.Display
proxy.Object
}
func NewDisplay(conn *dbus.Conn) *Display {
obj := new(Display)
obj.Object.Init_(conn, "com.deepin.daemon.Display", "/com/deepin/daemon/Display")
return obj
}
type display struct{}
func (v *display) GetObject_() *proxy.Object {
return (*proxy.Object)(unsafe.Pointer(v))
}
func (*display) GetInterfaceName_() string {
return "com.deepin.daemon.Display"
}
// method ApplyChanges
func (v *display) GoApplyChanges(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".ApplyChanges", flags, ch)
}
func (v *display) ApplyChanges(flags dbus.Flags) error {
return (<-v.GoApplyChanges(flags, make(chan *dbus.Call, 1)).Done).Err
}
// method AssociateTouch
func (v *display) GoAssociateTouch(flags dbus.Flags, ch chan *dbus.Call, arg0 string, arg1 string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".AssociateTouch", flags, ch, arg0, arg1)
}
func (v *display) AssociateTouch(flags dbus.Flags, arg0 string, arg1 string) error {
return (<-v.GoAssociateTouch(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// method ChangeBrightness
func (v *display) GoChangeBrightness(flags dbus.Flags, ch chan *dbus.Call, arg0 bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".ChangeBrightness", flags, ch, arg0)
}
func (v *display) ChangeBrightness(flags dbus.Flags, arg0 bool) error {
return (<-v.GoChangeBrightness(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method DeleteCustomMode
func (v *display) GoDeleteCustomMode(flags dbus.Flags, ch chan *dbus.Call, arg0 string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteCustomMode", flags, ch, arg0)
}
func (v *display) DeleteCustomMode(flags dbus.Flags, arg0 string) error {
return (<-v.GoDeleteCustomMode(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method GetBrightness
func (v *display) GoGetBrightness(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".GetBrightness", flags, ch)
}
func (*display) StoreGetBrightness(call *dbus.Call) (arg0 map[string]float64, err error) {
err = call.Store(&arg0)
return
}
func (v *display) GetBrightness(flags dbus.Flags) (arg0 map[string]float64, err error) {
return v.StoreGetBrightness(
<-v.GoGetBrightness(flags, make(chan *dbus.Call, 1)).Done)
}
// method ListOutputNames
func (v *display) GoListOutputNames(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".ListOutputNames", flags, ch)
}
func (*display) StoreListOutputNames(call *dbus.Call) (arg0 []string, err error) {
err = call.Store(&arg0)
return
}
func (v *display) ListOutputNames(flags dbus.Flags) (arg0 []string, err error) {
return v.StoreListOutputNames(
<-v.GoListOutputNames(flags, make(chan *dbus.Call, 1)).Done)
}
// method ListOutputsCommonModes
func (v *display) GoListOutputsCommonModes(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".ListOutputsCommonModes", flags, ch)
}
func (*display) StoreListOutputsCommonModes(call *dbus.Call) (arg0 []ModeInfo, err error) {
err = call.Store(&arg0)
return
}
func (v *display) ListOutputsCommonModes(flags dbus.Flags) (arg0 []ModeInfo, err error) {
return v.StoreListOutputsCommonModes(
<-v.GoListOutputsCommonModes(flags, make(chan *dbus.Call, 1)).Done)
}
// method ModifyConfigName
func (v *display) GoModifyConfigName(flags dbus.Flags, ch chan *dbus.Call, arg0 string, arg1 string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".ModifyConfigName", flags, ch, arg0, arg1)
}
func (v *display) ModifyConfigName(flags dbus.Flags, arg0 string, arg1 string) error {
return (<-v.GoModifyConfigName(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// method RefreshBrightness
func (v *display) GoRefreshBrightness(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".RefreshBrightness", flags, ch)
}
func (v *display) RefreshBrightness(flags dbus.Flags) error {
return (<-v.GoRefreshBrightness(flags, make(chan *dbus.Call, 1)).Done).Err
}
// method Reset
func (v *display) GoReset(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".Reset", flags, ch)
}
func (v *display) Reset(flags dbus.Flags) error {
return (<-v.GoReset(flags, make(chan *dbus.Call, 1)).Done).Err
}
// method ResetChanges
func (v *display) GoResetChanges(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".ResetChanges", flags, ch)
}
func (v *display) ResetChanges(flags dbus.Flags) error {
return (<-v.GoResetChanges(flags, make(chan *dbus.Call, 1)).Done).Err
}
// method Save
func (v *display) GoSave(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".Save", flags, ch)
}
func (v *display) Save(flags dbus.Flags) error {
return (<-v.GoSave(flags, make(chan *dbus.Call, 1)).Done).Err
}
// method SetAndSaveBrightness
func (v *display) GoSetAndSaveBrightness(flags dbus.Flags, ch chan *dbus.Call, arg0 string, arg1 float64) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetAndSaveBrightness", flags, ch, arg0, arg1)
}
func (v *display) SetAndSaveBrightness(flags dbus.Flags, arg0 string, arg1 float64) error {
return (<-v.GoSetAndSaveBrightness(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// method SetBrightness
func (v *display) GoSetBrightness(flags dbus.Flags, ch chan *dbus.Call, arg0 string, arg1 float64) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetBrightness", flags, ch, arg0, arg1)
}
func (v *display) SetBrightness(flags dbus.Flags, arg0 string, arg1 float64) error {
return (<-v.GoSetBrightness(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// method SetPrimary
func (v *display) GoSetPrimary(flags dbus.Flags, ch chan *dbus.Call, arg0 string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPrimary", flags, ch, arg0)
}
func (v *display) SetPrimary(flags dbus.Flags, arg0 string) error {
return (<-v.GoSetPrimary(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method SwitchMode
func (v *display) GoSwitchMode(flags dbus.Flags, ch chan *dbus.Call, arg0 uint8, arg1 string) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SwitchMode", flags, ch, arg0, arg1)
}
func (v *display) SwitchMode(flags dbus.Flags, arg0 uint8, arg1 string) error {
return (<-v.GoSwitchMode(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// property HasChanged b
func (v *display) HasChanged() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "HasChanged",
}
}
// property DisplayMode y
func (v *display) DisplayMode() proxy.PropByte {
return proxy.PropByte{
Impl: v,
Name: "DisplayMode",
}
}
// property ScreenWidth q
func (v *display) ScreenWidth() proxy.PropUint16 {
return proxy.PropUint16{
Impl: v,
Name: "ScreenWidth",
}
}
// property ScreenHeight q
func (v *display) ScreenHeight() proxy.PropUint16 {
return proxy.PropUint16{
Impl: v,
Name: "ScreenHeight",
}
}
// property Primary s
func (v *display) Primary() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Primary",
}
}
// property CurrentCustomId s
func (v *display) CurrentCustomId() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "CurrentCustomId",
}
}
// property CustomIdList as
func (v *display) CustomIdList() proxy.PropStringArray {
return proxy.PropStringArray{
Impl: v,
Name: "CustomIdList",
}
}
// property PrimaryRect (nnqq)
func (v *display) PrimaryRect() PropDisplayPrimaryRect {
return PropDisplayPrimaryRect{
Impl: v,
}
}
type PropDisplayPrimaryRect struct {
Impl proxy.Implementer
}
func (p PropDisplayPrimaryRect) Get(flags dbus.Flags) (value Rectangle, err error) {
err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
"PrimaryRect", &value)
return
}
func (p PropDisplayPrimaryRect) ConnectChanged(cb func(hasValue bool, value Rectangle)) error {
if cb == nil {
return errors.New("nil callback")
}
cb0 := func(hasValue bool, value interface{}) {
if hasValue {
var v Rectangle
err := dbus.Store([]interface{}{value}, &v)
if err != nil {
return
}
cb(true, v)
} else {
cb(false, Rectangle{})
}
}
return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
"PrimaryRect", cb0)
}
// property Monitors ao
func (v *display) Monitors() proxy.PropObjectPathArray {
return proxy.PropObjectPathArray{
Impl: v,
Name: "Monitors",
}
}
// property Brightness a{sd}
func (v *display) Brightness() PropDisplayBrightness {
return PropDisplayBrightness{
Impl: v,
}
}
type PropDisplayBrightness struct {
Impl proxy.Implementer
}
func (p PropDisplayBrightness) Get(flags dbus.Flags) (value map[string]float64, err error) {
err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
"Brightness", &value)
return
}
func (p PropDisplayBrightness) ConnectChanged(cb func(hasValue bool, value map[string]float64)) error {
if cb == nil {
return errors.New("nil callback")
}
cb0 := func(hasValue bool, value interface{}) {
if hasValue {
var v map[string]float64
err := dbus.Store([]interface{}{value}, &v)
if err != nil {
return
}
cb(true, v)
} else {
cb(false, nil)
}
}
return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
"Brightness", cb0)
}
// property TouchMap a{ss}
func (v *display) TouchMap() PropDisplayTouchMap {
return PropDisplayTouchMap{
Impl: v,
}
}
type PropDisplayTouchMap struct {
Impl proxy.Implementer
}
func (p PropDisplayTouchMap) Get(flags dbus.Flags) (value map[string]string, err error) {
err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
"TouchMap", &value)
return
}
func (p PropDisplayTouchMap) ConnectChanged(cb func(hasValue bool, value map[string]string)) error {
if cb == nil {
return errors.New("nil callback")
}
cb0 := func(hasValue bool, value interface{}) {
if hasValue {
var v map[string]string
err := dbus.Store([]interface{}{value}, &v)
if err != nil {
return
}
cb(true, v)
} else {
cb(false, nil)
}
}
return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
"TouchMap", cb0)
}
// property MaxBacklightBrightness u
func (v *display) MaxBacklightBrightness() proxy.PropUint32 {
return proxy.PropUint32{
Impl: v,
Name: "MaxBacklightBrightness",
}
}
// property ColorTemperatureMode i
func (v *display) ColorTemperatureMode() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "ColorTemperatureMode",
}
}
// property ColorTemperatureManual i
func (v *display) ColorTemperatureManual() proxy.PropInt32 {
return proxy.PropInt32{
Impl: v,
Name: "ColorTemperatureManual",
}
}
type Monitor struct {
monitor // interface com.deepin.daemon.Display.Monitor
proxy.Object
}
func NewMonitor(conn *dbus.Conn, path dbus.ObjectPath) (*Monitor, error) {
if !path.IsValid() {
return nil, errors.New("path is invalid")
}
obj := new(Monitor)
obj.Object.Init_(conn, "com.deepin.daemon.Display", path)
return obj, nil
}
type monitor struct{}
func (v *monitor) GetObject_() *proxy.Object {
return (*proxy.Object)(unsafe.Pointer(v))
}
func (*monitor) GetInterfaceName_() string {
return "com.deepin.daemon.Display.Monitor"
}
// method Enable
func (v *monitor) GoEnable(flags dbus.Flags, ch chan *dbus.Call, arg0 bool) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".Enable", flags, ch, arg0)
}
func (v *monitor) Enable(flags dbus.Flags, arg0 bool) error {
return (<-v.GoEnable(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method SetMode
func (v *monitor) GoSetMode(flags dbus.Flags, ch chan *dbus.Call, arg0 uint32) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetMode", flags, ch, arg0)
}
func (v *monitor) SetMode(flags dbus.Flags, arg0 uint32) error {
return (<-v.GoSetMode(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method SetModeBySize
func (v *monitor) GoSetModeBySize(flags dbus.Flags, ch chan *dbus.Call, arg0 uint16, arg1 uint16) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetModeBySize", flags, ch, arg0, arg1)
}
func (v *monitor) SetModeBySize(flags dbus.Flags, arg0 uint16, arg1 uint16) error {
return (<-v.GoSetModeBySize(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// method SetPosition
func (v *monitor) GoSetPosition(flags dbus.Flags, ch chan *dbus.Call, arg0 int16, arg1 int16) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPosition", flags, ch, arg0, arg1)
}
func (v *monitor) SetPosition(flags dbus.Flags, arg0 int16, arg1 int16) error {
return (<-v.GoSetPosition(flags, make(chan *dbus.Call, 1), arg0, arg1).Done).Err
}
// method SetReflect
func (v *monitor) GoSetReflect(flags dbus.Flags, ch chan *dbus.Call, arg0 uint16) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetReflect", flags, ch, arg0)
}
func (v *monitor) SetReflect(flags dbus.Flags, arg0 uint16) error {
return (<-v.GoSetReflect(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method SetRefreshRate
func (v *monitor) GoSetRefreshRate(flags dbus.Flags, ch chan *dbus.Call, arg0 float64) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetRefreshRate", flags, ch, arg0)
}
func (v *monitor) SetRefreshRate(flags dbus.Flags, arg0 float64) error {
return (<-v.GoSetRefreshRate(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// method SetRotation
func (v *monitor) GoSetRotation(flags dbus.Flags, ch chan *dbus.Call, arg0 uint16) *dbus.Call {
return v.GetObject_().Go_(v.GetInterfaceName_()+".SetRotation", flags, ch, arg0)
}
func (v *monitor) SetRotation(flags dbus.Flags, arg0 uint16) error {
return (<-v.GoSetRotation(flags, make(chan *dbus.Call, 1), arg0).Done).Err
}
// property Name s
func (v *monitor) Name() proxy.PropString {
return proxy.PropString{
Impl: v,
Name: "Name",
}
}
// property Enabled b
func (v *monitor) Enabled() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "Enabled",
}
}
// property Connected b
func (v *monitor) Connected() proxy.PropBool {
return proxy.PropBool{
Impl: v,
Name: "Connected",
}
}
// property X n
func (v *monitor) X() proxy.PropInt16 {
return proxy.PropInt16{
Impl: v,
Name: "X",
}
}
// property Y n
func (v *monitor) Y() proxy.PropInt16 {
return proxy.PropInt16{
Impl: v,
Name: "Y",
}
}
// property Width q
func (v *monitor) Width() proxy.PropUint16 {
return proxy.PropUint16{
Impl: v,
Name: "Width",
}
}
// property Height q
func (v *monitor) Height() proxy.PropUint16 {
return proxy.PropUint16{
Impl: v,
Name: "Height",
}
}
// property Rotation q
func (v *monitor) Rotation() proxy.PropUint16 {
return proxy.PropUint16{
Impl: v,
Name: "Rotation",
}
}
// property Reflect q
func (v *monitor) Reflect() proxy.PropUint16 {
return proxy.PropUint16{
Impl: v,
Name: "Reflect",
}
}
// property RefreshRate d
func (v *monitor) RefreshRate() proxy.PropDouble {
return proxy.PropDouble{
Impl: v,
Name: "RefreshRate",
}
}
// property Rotations aq
func (v *monitor) Rotations() proxy.PropUint16Array {
return proxy.PropUint16Array{
Impl: v,
Name: "Rotations",
}
}
// property Reflects aq
func (v *monitor) Reflects() proxy.PropUint16Array {
return proxy.PropUint16Array{
Impl: v,
Name: "Reflects",
}
}
// property BestMode (uqqd)
func (v *monitor) BestMode() PropModeInfo {
return PropModeInfo{
Impl: v,
Name: "BestMode",
}
}
// property CurrentMode (uqqd)
func (v *monitor) CurrentMode() PropModeInfo {
return PropModeInfo{
Impl: v,
Name: "CurrentMode",
}
}
// property Modes a(uqqd)
func (v *monitor) Modes() PropModeInfoSlice {
return PropModeInfoSlice{
Impl: v,
Name: "Modes",
}
}
// property PreferredModes a(uqqd)
func (v *monitor) PreferredModes() PropModeInfoSlice {
return PropModeInfoSlice{
Impl: v,
Name: "PreferredModes",
}
}
type PropModeInfo struct {
Impl proxy.Implementer
Name string
}
func (p PropModeInfo) Get(flags dbus.Flags) (value ModeInfo, err error) {
err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
p.Name, &value)
return
}
func (p PropModeInfo) Set(flags dbus.Flags, value ModeInfo) error {
return p.Impl.GetObject_().SetProperty_(flags, p.Impl.GetInterfaceName_(), p.Name, value)
}
func (p PropModeInfo) ConnectChanged(cb func(hasValue bool, value ModeInfo)) error {
if cb == nil {
return errors.New("nil callback")
}
cb0 := func(hasValue bool, value interface{}) {
if hasValue {
var v ModeInfo
err := dbus.Store([]interface{}{value}, &v)
if err != nil {
return
}
cb(true, v)
} else {
cb(false, ModeInfo{})
}
}
return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
p.Name, cb0)
}
type PropModeInfoSlice struct {
Impl proxy.Implementer
Name string
}
func (p PropModeInfoSlice) Get(flags dbus.Flags) (value []ModeInfo, err error) {
err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
p.Name, &value)
return
}
func (p PropModeInfoSlice) Set(flags dbus.Flags, value []ModeInfo) error {
return p.Impl.GetObject_().SetProperty_(flags, p.Impl.GetInterfaceName_(), p.Name, value)
}
func (p PropModeInfoSlice) ConnectChanged(cb func(hasValue bool, value []ModeInfo)) error {
if cb == nil {
return errors.New("nil callback")
}
cb0 := func(hasValue bool, value interface{}) {
if hasValue {
var v []ModeInfo
err := dbus.Store([]interface{}{value}, &v)
if err != nil {
return
}
cb(true, v)
} else {
cb(false, nil)
}
}
return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
p.Name, cb0)
}
|