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

Side by Side Diff: experimental/PdfViewer/autogen/SkPdfMovieDictionary_autogen.h

Issue 17856004: refactoring for pdf viewer lib (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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__SkPdfMovieDictionary 1 #ifndef __DEFINED__SkPdfMovieDictionary
2 #define __DEFINED__SkPdfMovieDictionary 2 #define __DEFINED__SkPdfMovieDictionary
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 // Entries in a movie dictionary 9 // Entries in a movie dictionary
10 class SkPdfMovieDictionary : public SkPdfDictionary { 10 class SkPdfMovieDictionary : public SkPdfDictionary {
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 SkPdfMovieDictionary& operator=(const SkPdfMovieDictionary& from) {this->fPodo foDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;} 526 SkPdfMovieDictionary& operator=(const SkPdfMovieDictionary& from) {this->fPodo foDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj; return *this;}
527 527
528 /** (Required) A file specification identifying a self-describing movie file. 528 /** (Required) A file specification identifying a self-describing movie file.
529 * Note: The format of a "self-describing movie file" is left unspecified, and there is 529 * Note: The format of a "self-describing movie file" is left unspecified, and there is
530 * no guarantee of portability. 530 * no guarantee of portability.
531 **/ 531 **/
532 bool has_F() const { 532 bool has_F() const {
533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL)); 533 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", " ", NULL));
534 } 534 }
535 535
536 SkPdfFileSpec F() const { 536 SkPdfFileSpec F() const;
537 SkPdfFileSpec ret;
538 if (FileSpecFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "F", "", &ret)) return ret;
539 // TODO(edisonn): warn about missing required field, assert for known good p dfs
540 return SkPdfFileSpec();
541 }
542
543 /** (Optional) The width and height of the movie's bounding box, in pixels, 537 /** (Optional) The width and height of the movie's bounding box, in pixels,
544 * specified as [width height]. This entry should be omitted for a movie consis t- 538 * specified as [width height]. This entry should be omitted for a movie consis t-
545 * ing entirely of sound with no visible images. 539 * ing entirely of sound with no visible images.
546 **/ 540 **/
547 bool has_Aspect() const { 541 bool has_Aspect() const {
548 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Aspec t", "", NULL)); 542 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Aspec t", "", NULL));
549 } 543 }
550 544
551 SkPdfArray* Aspect() const { 545 SkPdfArray* Aspect() const;
552 SkPdfArray* ret;
553 if (ArrayFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Aspect", " ", &ret)) return ret;
554 // TODO(edisonn): warn about missing required field, assert for known good p dfs
555 return NULL;
556 }
557
558 /** (Optional) The number of degrees by which the movie is rotated clockwise 546 /** (Optional) The number of degrees by which the movie is rotated clockwise
559 * relative to the page. The value must be a multiple of 90. Default value: 0. 547 * relative to the page. The value must be a multiple of 90. Default value: 0.
560 **/ 548 **/
561 bool has_Rotate() const { 549 bool has_Rotate() const {
562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotat e", "", NULL)); 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotat e", "", NULL));
563 } 551 }
564 552
565 long Rotate() const { 553 long Rotate() const;
566 long ret;
567 if (LongFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Rotate", "" , &ret)) return ret;
568 // TODO(edisonn): warn about missing required field, assert for known good p dfs
569 return 0;
570 }
571
572 /** (Optional) A flag or stream specifying whether and how to display a poster 554 /** (Optional) A flag or stream specifying whether and how to display a poster
573 * image representing the movie. If this value is a stream, it contains an imag e 555 * image representing the movie. If this value is a stream, it contains an imag e
574 * XObject (see Section 4.8, "Images") to be displayed as the poster; if it is the 556 * XObject (see Section 4.8, "Images") to be displayed as the poster; if it is the
575 * boolean value true, the poster image should be retrieved from the movie file 557 * boolean value true, the poster image should be retrieved from the movie file
576 * itself; if it is false, no poster should be displayed. Default value: false. 558 * itself; if it is false, no poster should be displayed. Default value: false.
577 **/ 559 **/
578 bool has_Poster() const { 560 bool has_Poster() const {
579 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poste r", "", NULL)); 561 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poste r", "", NULL));
580 } 562 }
581 563
582 bool isPosterABoolean() const { 564 bool isPosterABoolean() const {
583 SkPdfObject* ret = NULL; 565 SkPdfObject* ret = NULL;
584 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", &ret)) return false; 566 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", &ret)) return false;
585 return ret->podofo()->GetDataType() == ePdfDataType_Bool; 567 return ret->podofo()->GetDataType() == ePdfDataType_Bool;
586 } 568 }
587 569
588 bool getPosterAsBoolean() const { 570 bool getPosterAsBoolean() const;
589 bool ret = false;
590 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "" , &ret)) return ret;
591 // TODO(edisonn): warn about missing required field, assert for known good p dfs
592 return false;
593 }
594
595 bool isPosterAStream() const { 571 bool isPosterAStream() const {
596 SkPdfObject* ret = NULL; 572 SkPdfObject* ret = NULL;
597 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", &ret)) return false; 573 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", &ret)) return false;
598 return ret->podofo()->HasStream(); 574 return ret->podofo()->HasStream();
599 } 575 }
600 576
601 SkPdfStream* getPosterAsStream() const { 577 SkPdfStream* getPosterAsStream() const;
602 SkPdfStream* ret = NULL;
603 if (StreamFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Poster", "", &ret)) return ret;
604 // TODO(edisonn): warn about missing required field, assert for known good p dfs
605 return NULL;
606 }
607
608 }; 578 };
609 579
610 #endif // __DEFINED__SkPdfMovieDictionary 580 #endif // __DEFINED__SkPdfMovieDictionary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698