OLD | NEW |
1 #ifndef __DEFINED__SkPdfSoundActionDictionary | 1 #ifndef __DEFINED__SkPdfSoundActionDictionary |
2 #define __DEFINED__SkPdfSoundActionDictionary | 2 #define __DEFINED__SkPdfSoundActionDictionary |
3 | 3 |
4 #include "SkPdfUtils.h" | 4 #include "SkPdfUtils.h" |
5 #include "SkPdfEnums_autogen.h" | 5 #include "SkPdfEnums_autogen.h" |
6 #include "SkPdfArray_autogen.h" | 6 #include "SkPdfArray_autogen.h" |
7 #include "SkPdfDictionary_autogen.h" | 7 #include "SkPdfDictionary_autogen.h" |
8 | 8 |
9 // Additional entries specific to a sound action | 9 // Additional entries specific to a sound action |
10 class SkPdfSoundActionDictionary : public SkPdfDictionary { | 10 class SkPdfSoundActionDictionary : public SkPdfDictionary { |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 SkPdfSoundActionDictionary& operator=(const SkPdfSoundActionDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} | 526 SkPdfSoundActionDictionary& operator=(const SkPdfSoundActionDictionary& from)
{this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return
*this;} |
527 | 527 |
528 /** (Required) The type of action that this dictionary describes; must be Sound | 528 /** (Required) The type of action that this dictionary describes; must be Sound |
529 * for a sound action. | 529 * for a sound action. |
530 **/ | 530 **/ |
531 bool has_S() const { | 531 bool has_S() const { |
532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "
", NULL)); |
533 } | 533 } |
534 | 534 |
535 std::string S() const { | 535 std::string S() const; |
536 std::string ret; | |
537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re
t)) return ret; | |
538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
539 return ""; | |
540 } | |
541 | |
542 /** (Required) A sound object defining the sound to be played (see Section 8.7, | 536 /** (Required) A sound object defining the sound to be played (see Section 8.7, |
543 * "Sounds"; see also implementation note 76 in Appendix H). | 537 * "Sounds"; see also implementation note 76 in Appendix H). |
544 **/ | 538 **/ |
545 bool has_Sound() const { | 539 bool has_Sound() const { |
546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound
", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound
", "", NULL)); |
547 } | 541 } |
548 | 542 |
549 SkPdfStream* Sound() const { | 543 SkPdfStream* Sound() const; |
550 SkPdfStream* ret; | |
551 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", "
", &ret)) return ret; | |
552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
553 return NULL; | |
554 } | |
555 | |
556 /** (Optional) The volume at which to play the sound, in the range -1.0 to 1.0. | 544 /** (Optional) The volume at which to play the sound, in the range -1.0 to 1.0. |
557 * Higher values denote greater volume; negative values mute the sound. | 545 * Higher values denote greater volume; negative values mute the sound. |
558 * Default value: 1.0. | 546 * Default value: 1.0. |
559 **/ | 547 **/ |
560 bool has_Volume() const { | 548 bool has_Volume() const { |
561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volum
e", "", NULL)); | 549 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volum
e", "", NULL)); |
562 } | 550 } |
563 | 551 |
564 double Volume() const { | 552 double Volume() const; |
565 double ret; | |
566 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume",
"", &ret)) return ret; | |
567 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
568 return 0; | |
569 } | |
570 | |
571 /** (Optional) A flag specifying whether to play the sound synchronously or | 553 /** (Optional) A flag specifying whether to play the sound synchronously or |
572 * asynchronously. If this flag is true, the viewer application will retain con
trol, | 554 * asynchronously. If this flag is true, the viewer application will retain con
trol, |
573 * allowing no further user interaction other than canceling the sound, until t
he | 555 * allowing no further user interaction other than canceling the sound, until t
he |
574 * sound has been completely played. Default value: false. | 556 * sound has been completely played. Default value: false. |
575 **/ | 557 **/ |
576 bool has_Synchronous() const { | 558 bool has_Synchronous() const { |
577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synch
ronous", "", NULL)); | 559 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synch
ronous", "", NULL)); |
578 } | 560 } |
579 | 561 |
580 bool Synchronous() const { | 562 bool Synchronous() const; |
581 bool ret; | |
582 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous
", "", &ret)) return ret; | |
583 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
584 return false; | |
585 } | |
586 | |
587 /** (Optional) A flag specifying whether to repeat the sound indefinitely. If th
is | 563 /** (Optional) A flag specifying whether to repeat the sound indefinitely. If th
is |
588 * entry is present, the Synchronous entry is ignored. Default value: false. | 564 * entry is present, the Synchronous entry is ignored. Default value: false. |
589 **/ | 565 **/ |
590 bool has_Repeat() const { | 566 bool has_Repeat() const { |
591 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repea
t", "", NULL)); | 567 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repea
t", "", NULL)); |
592 } | 568 } |
593 | 569 |
594 bool Repeat() const { | 570 bool Repeat() const; |
595 bool ret; | |
596 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repeat", ""
, &ret)) return ret; | |
597 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
598 return false; | |
599 } | |
600 | |
601 /** (Optional) A flag specifying whether to mix this sound with any other sound | 571 /** (Optional) A flag specifying whether to mix this sound with any other sound |
602 * already playing. If this flag is false, any previously playing sound will be | 572 * already playing. If this flag is false, any previously playing sound will be |
603 * stopped before starting this sound; this can be used to stop a repeating sou
nd | 573 * stopped before starting this sound; this can be used to stop a repeating sou
nd |
604 * (see Repeat, above). Default value: false. | 574 * (see Repeat, above). Default value: false. |
605 **/ | 575 **/ |
606 bool has_Mix() const { | 576 bool has_Mix() const { |
607 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix",
"", NULL)); | 577 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix",
"", NULL)); |
608 } | 578 } |
609 | 579 |
610 bool Mix() const { | 580 bool Mix() const; |
611 bool ret; | |
612 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix", "", &
ret)) return ret; | |
613 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
614 return false; | |
615 } | |
616 | |
617 }; | 581 }; |
618 | 582 |
619 #endif // __DEFINED__SkPdfSoundActionDictionary | 583 #endif // __DEFINED__SkPdfSoundActionDictionary |
OLD | NEW |