Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: experimental/PdfViewer/SkPdfSoundActionDictionary_autogen.h

Issue 16975013: Deal with ca and CA transparency operators in pdf. add comments to generated classes. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #ifndef __DEFINED__SkPdfSoundActionDictionary 1 #ifndef __DEFINED__SkPdfSoundActionDictionary
2 #define __DEFINED__SkPdfSoundActionDictionary 2 #define __DEFINED__SkPdfSoundActionDictionary
3 3
4 #include "SkPdfEnums_autogen.h" 4 #include "SkPdfEnums_autogen.h"
5 #include "SkPdfArray_autogen.h" 5 #include "SkPdfArray_autogen.h"
6 #include "SkPdfDictionary_autogen.h" 6 #include "SkPdfDictionary_autogen.h"
7 7
8 // Additional entries specific to a sound action
8 class SkPdfSoundActionDictionary : public SkPdfDictionary { 9 class SkPdfSoundActionDictionary : public SkPdfDictionary {
9 public: 10 public:
10 virtual SkPdfObjectType getType() const { return kSoundActionDictionary_SkPdfO bjectType;} 11 virtual SkPdfObjectType getType() const { return kSoundActionDictionary_SkPdfO bjectType;}
11 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSoundAc tionDictionary_SkPdfObjectType + 1);} 12 virtual SkPdfObjectType getTypeEnd() const { return (SkPdfObjectType)(kSoundAc tionDictionary_SkPdfObjectType + 1);}
12 public: 13 public:
13 virtual SkPdfSoundActionDictionary* asSoundActionDictionary() {return this;} 14 virtual SkPdfSoundActionDictionary* asSoundActionDictionary() {return this;}
14 virtual const SkPdfSoundActionDictionary* asSoundActionDictionary() const {ret urn this;} 15 virtual const SkPdfSoundActionDictionary* asSoundActionDictionary() const {ret urn this;}
15 16
16 private: 17 private:
17 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;} 18 virtual SkPdfALinkAnnotationDictionary* asALinkAnnotationDictionary() {return NULL;}
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 515
515 public: 516 public:
516 private: 517 private:
517 public: 518 public:
518 SkPdfSoundActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {} 519 SkPdfSoundActionDictionary(const PdfMemDocument* podofoDoc = NULL, const PdfOb ject* podofoObj = NULL) : SkPdfDictionary(podofoDoc, podofoObj) {}
519 520
520 virtual bool valid() const {return true;} 521 virtual bool valid() const {return true;}
521 522
522 SkPdfSoundActionDictionary& operator=(const SkPdfSoundActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 523 SkPdfSoundActionDictionary& operator=(const SkPdfSoundActionDictionary& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
523 524
525 /** (Required) The type of action that this dictionary describes; must be Sound
526 * for a sound action.
527 **/
528 bool has_S() const {
529 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", " ", NULL));
530 }
531
524 std::string S() const { 532 std::string S() const {
525 std::string ret; 533 std::string ret;
526 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret; 534 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "S", "", &re t)) return ret;
527 // TODO(edisonn): warn about missing required field, assert for known good p dfs 535 // TODO(edisonn): warn about missing required field, assert for known good p dfs
528 return ""; 536 return "";
529 } 537 }
530 538
539 /** (Required) A sound object defining the sound to be played (see Section 8.7,
540 * "Sounds"; see also implementation note 76 in Appendix H).
541 **/
542 bool has_Sound() const {
543 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound ", "", NULL));
544 }
545
531 SkPdfStream Sound() const { 546 SkPdfStream Sound() const {
532 SkPdfStream ret; 547 SkPdfStream ret;
533 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", " ", &ret)) return ret; 548 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Sound", " ", &ret)) return ret;
534 // TODO(edisonn): warn about missing required field, assert for known good p dfs 549 // TODO(edisonn): warn about missing required field, assert for known good p dfs
535 return SkPdfStream(); 550 return SkPdfStream();
536 } 551 }
537 552
553 /** (Optional) The volume at which to play the sound, in the range -1.0 to 1.0.
554 * Higher values denote greater volume; negative values mute the sound.
555 * Default value: 1.0.
556 **/
557 bool has_Volume() const {
558 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volum e", "", NULL));
559 }
560
538 double Volume() const { 561 double Volume() const {
539 double ret; 562 double ret;
540 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume", "", &ret)) return ret; 563 if (DoubleFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Volume", "", &ret)) return ret;
541 // TODO(edisonn): warn about missing required field, assert for known good p dfs 564 // TODO(edisonn): warn about missing required field, assert for known good p dfs
542 return 0; 565 return 0;
543 } 566 }
544 567
568 /** (Optional) A flag specifying whether to play the sound synchronously or
569 * asynchronously. If this flag is true, the viewer application will retain con trol,
570 * allowing no further user interaction other than canceling the sound, until t he
571 * sound has been completely played. Default value: false.
572 **/
573 bool has_Synchronous() const {
574 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synch ronous", "", NULL));
575 }
576
545 bool Synchronous() const { 577 bool Synchronous() const {
546 bool ret; 578 bool ret;
547 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous ", "", &ret)) return ret; 579 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Synchronous ", "", &ret)) return ret;
548 // TODO(edisonn): warn about missing required field, assert for known good p dfs 580 // TODO(edisonn): warn about missing required field, assert for known good p dfs
549 return false; 581 return false;
550 } 582 }
551 583
584 /** (Optional) A flag specifying whether to repeat the sound indefinitely. If th is
585 * entry is present, the Synchronous entry is ignored. Default value: false.
586 **/
587 bool has_Repeat() const {
588 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repea t", "", NULL));
589 }
590
552 bool Repeat() const { 591 bool Repeat() const {
553 bool ret; 592 bool ret;
554 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repeat", "" , &ret)) return ret; 593 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Repeat", "" , &ret)) return ret;
555 // TODO(edisonn): warn about missing required field, assert for known good p dfs 594 // TODO(edisonn): warn about missing required field, assert for known good p dfs
556 return false; 595 return false;
557 } 596 }
558 597
598 /** (Optional) A flag specifying whether to mix this sound with any other sound
599 * already playing. If this flag is false, any previously playing sound will be
600 * stopped before starting this sound; this can be used to stop a repeating sou nd
601 * (see Repeat, above). Default value: false.
602 **/
603 bool has_Mix() const {
604 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix", "", NULL));
605 }
606
559 bool Mix() const { 607 bool Mix() const {
560 bool ret; 608 bool ret;
561 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix", "", & ret)) return ret; 609 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Mix", "", & ret)) return ret;
562 // TODO(edisonn): warn about missing required field, assert for known good p dfs 610 // TODO(edisonn): warn about missing required field, assert for known good p dfs
563 return false; 611 return false;
564 } 612 }
565 613
566 }; 614 };
567 615
568 #endif // __DEFINED__SkPdfSoundActionDictionary 616 #endif // __DEFINED__SkPdfSoundActionDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698