OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 IntRect rect() const { return IntRect(IntPoint(), size()); } | 87 IntRect rect() const { return IntRect(IntPoint(), size()); } |
88 int width() const { return size().width(); } | 88 int width() const { return size().width(); } |
89 int height() const { return size().height(); } | 89 int height() const { return size().height(); } |
90 virtual bool getHotSpot(IntPoint&) const { return false; } | 90 virtual bool getHotSpot(IntPoint&) const { return false; } |
91 | 91 |
92 bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); | 92 bool setData(PassRefPtr<SharedBuffer> data, bool allDataReceived); |
93 virtual bool dataChanged(bool /*allDataReceived*/) { return false; } | 93 virtual bool dataChanged(bool /*allDataReceived*/) { return false; } |
94 | 94 |
95 virtual String filenameExtension() const { return String(); } // null string
if unknown | 95 virtual String filenameExtension() const { return String(); } // null string
if unknown |
96 | 96 |
97 virtual void destroyDecodedData(bool destroyAll = true) = 0; | 97 virtual void destroyDecodedData() = 0; |
98 virtual unsigned decodedSize() const = 0; | 98 virtual unsigned decodedSize() const = 0; |
99 | 99 |
100 SharedBuffer* data() { return m_encodedImageData.get(); } | 100 SharedBuffer* data() { return m_encodedImageData.get(); } |
101 | 101 |
102 // Animation begins whenever someone draws the image, so startAnimation() is
not normally called. | 102 // Animation begins whenever someone draws the image, so startAnimation() is
not normally called. |
103 // It will automatically pause once all observers no longer want to render t
he image anywhere. | 103 // It will automatically pause once all observers no longer want to render t
he image anywhere. |
104 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) { } | 104 virtual void startAnimation(bool /*catchUpIfNecessary*/ = true) { } |
105 virtual void stopAnimation() {} | 105 virtual void stopAnimation() {} |
106 virtual void resetAnimation() {} | 106 virtual void resetAnimation() {} |
107 | 107 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 virtual Color solidColor() const { return Color(); } | 143 virtual Color solidColor() const { return Color(); } |
144 | 144 |
145 private: | 145 private: |
146 RefPtr<SharedBuffer> m_encodedImageData; | 146 RefPtr<SharedBuffer> m_encodedImageData; |
147 ImageObserver* m_imageObserver; | 147 ImageObserver* m_imageObserver; |
148 }; | 148 }; |
149 | 149 |
150 } | 150 } |
151 | 151 |
152 #endif | 152 #endif |
OLD | NEW |