| OLD | NEW |
| 1 #ifndef __DEFINED__SkPdfMovieAnnotationDictionary | 1 #ifndef __DEFINED__SkPdfMovieAnnotationDictionary |
| 2 #define __DEFINED__SkPdfMovieAnnotationDictionary | 2 #define __DEFINED__SkPdfMovieAnnotationDictionary |
| 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 movie annotation | 9 // Additional entries specific to a movie annotation |
| 10 class SkPdfMovieAnnotationDictionary : public SkPdfDictionary { | 10 class SkPdfMovieAnnotationDictionary : public SkPdfDictionary { |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 SkPdfMovieAnnotationDictionary& operator=(const SkPdfMovieAnnotationDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} | 526 SkPdfMovieAnnotationDictionary& operator=(const SkPdfMovieAnnotationDictionary
& from) {this->fPodofoDoc = from.fPodofoDoc; this->fPodofoObj = from.fPodofoObj;
return *this;} |
| 527 | 527 |
| 528 /** (Required) The type of annotation that this dictionary describes; must be Mo
vie | 528 /** (Required) The type of annotation that this dictionary describes; must be Mo
vie |
| 529 * for a movie annotation. | 529 * for a movie annotation. |
| 530 **/ | 530 **/ |
| 531 bool has_Subtype() const { | 531 bool has_Subtype() const { |
| 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); | 532 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subty
pe", "", NULL)); |
| 533 } | 533 } |
| 534 | 534 |
| 535 std::string Subtype() const { | 535 std::string Subtype() const; |
| 536 std::string ret; | |
| 537 if (NameFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Subtype", "
", &ret)) return ret; | |
| 538 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 539 return ""; | |
| 540 } | |
| 541 | |
| 542 /** (Required) A movie dictionary describing the movie's static characteristics
(see | 536 /** (Required) A movie dictionary describing the movie's static characteristics
(see |
| 543 * Section 8.8, "Movies"). | 537 * Section 8.8, "Movies"). |
| 544 **/ | 538 **/ |
| 545 bool has_Movie() const { | 539 bool has_Movie() const { |
| 546 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Movie
", "", NULL)); | 540 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Movie
", "", NULL)); |
| 547 } | 541 } |
| 548 | 542 |
| 549 SkPdfDictionary* Movie() const { | 543 SkPdfDictionary* Movie() const; |
| 550 SkPdfDictionary* ret; | |
| 551 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Movie
", "", &ret)) return ret; | |
| 552 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 553 return NULL; | |
| 554 } | |
| 555 | |
| 556 /** (Optional; PDF 1.4) An alternate representation of the annotation's contents
in | 544 /** (Optional; PDF 1.4) An alternate representation of the annotation's contents
in |
| 557 * human-readable form, useful when extracting the document's contents in sup- | 545 * human-readable form, useful when extracting the document's contents in sup- |
| 558 * port of accessibility to disabled users or for other purposes (see Section 9
.8.2, | 546 * port of accessibility to disabled users or for other purposes (see Section 9
.8.2, |
| 559 * "Alternate Descriptions"). | 547 * "Alternate Descriptions"). |
| 560 **/ | 548 **/ |
| 561 bool has_Contents() const { | 549 bool has_Contents() const { |
| 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); | 550 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Conte
nts", "", NULL)); |
| 563 } | 551 } |
| 564 | 552 |
| 565 std::string Contents() const { | 553 std::string Contents() const; |
| 566 std::string ret; | |
| 567 if (StringFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "Contents"
, "", &ret)) return ret; | |
| 568 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 569 return ""; | |
| 570 } | |
| 571 | |
| 572 /** (Optional) A flag or dictionary specifying whether and how to play the movie | 554 /** (Optional) A flag or dictionary specifying whether and how to play the movie |
| 573 * when the annotation is activated. If this value is a dictionary, it is a mov
ie activa- | 555 * when the annotation is activated. If this value is a dictionary, it is a mov
ie activa- |
| 574 * tion dictionary (see Section 8.8, "Movies") specifying how to play the movie
; if it | 556 * tion dictionary (see Section 8.8, "Movies") specifying how to play the movie
; if it |
| 575 * is the boolean value true, the movie should be played using default activati
on | 557 * is the boolean value true, the movie should be played using default activati
on |
| 576 * parameters; if it is false, the movie should not be played at all. Default v
alue: | 558 * parameters; if it is false, the movie should not be played at all. Default v
alue: |
| 577 * true. | 559 * true. |
| 578 **/ | 560 **/ |
| 579 bool has_A() const { | 561 bool has_A() const { |
| 580 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "
", NULL)); | 562 return (ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "
", NULL)); |
| 581 } | 563 } |
| 582 | 564 |
| 583 bool isAABoolean() const { | 565 bool isAABoolean() const { |
| 584 SkPdfObject* ret = NULL; | 566 SkPdfObject* ret = NULL; |
| 585 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "",
&ret)) return false; | 567 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "",
&ret)) return false; |
| 586 return ret->podofo()->GetDataType() == ePdfDataType_Bool; | 568 return ret->podofo()->GetDataType() == ePdfDataType_Bool; |
| 587 } | 569 } |
| 588 | 570 |
| 589 bool getAAsBoolean() const { | 571 bool getAAsBoolean() const; |
| 590 bool ret = false; | |
| 591 if (BoolFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "", &re
t)) return ret; | |
| 592 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 593 return false; | |
| 594 } | |
| 595 | |
| 596 bool isAADictionary() const { | 572 bool isAADictionary() const { |
| 597 SkPdfObject* ret = NULL; | 573 SkPdfObject* ret = NULL; |
| 598 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "",
&ret)) return false; | 574 if (!ObjectFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "",
&ret)) return false; |
| 599 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; | 575 return ret->podofo()->GetDataType() == ePdfDataType_Dictionary; |
| 600 } | 576 } |
| 601 | 577 |
| 602 SkPdfDictionary* getAAsDictionary() const { | 578 SkPdfDictionary* getAAsDictionary() const; |
| 603 SkPdfDictionary* ret = NULL; | |
| 604 if (DictionaryFromDictionary(fPodofoDoc, fPodofoObj->GetDictionary(), "A", "
", &ret)) return ret; | |
| 605 // TODO(edisonn): warn about missing required field, assert for known good p
dfs | |
| 606 return NULL; | |
| 607 } | |
| 608 | |
| 609 }; | 579 }; |
| 610 | 580 |
| 611 #endif // __DEFINED__SkPdfMovieAnnotationDictionary | 581 #endif // __DEFINED__SkPdfMovieAnnotationDictionary |
| OLD | NEW |