Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Attributes
imgContainer Class Reference

#include <imgContainer.h>

Inheritance diagram for imgContainer:
Inheritance graph
[legend]
Collaboration diagram for imgContainer:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_IMGICONTAINER 
imgContainer ()
virtual ~imgContainer ()
void init (in PRInt32 aWidth, in PRInt32 aHeight, in imgIContainerObserver aObserver)
 Create a new aWidth x aHeight sized image container.
gfxIImageFrame getFrameAt (in unsigned long index)
void appendFrame (in gfxIImageFrame item)
 Adds item to the end of the list of frames.
void removeFrame (in gfxIImageFrame item)
void endFrameDecode (in unsigned long framenumber, in unsigned long timeout)
void decodingComplete ()
void clear ()
void startAnimation ()
void stopAnimation ()
void resetAnimation ()
void get (in string prop, in nsIIDRef iid,[iid_is(iid), retval] out nsQIResult result)
 Gets a property with a given name.
void set (in string prop, in nsISupports value)
 Sets a property with a given name to a given value.
boolean has (in string prop)
 Returns true if the property with the given name exists.
void undefine (in string prop)
 Undefines a property.
void getKeys (out PRUint32 count,[array, size_is(count), retval] out string keys)
 Returns an array of the keys.

Public Attributes

readonly attribute gfx_format preferredAlphaChannelFormat
readonly attribute PRInt32 width
 The width of the container rectangle.
readonly attribute PRInt32 height
 The height of the container rectangle.
readonly attribute gfxIImageFrame currentFrame
 Get the current frame that would be drawn if the image was to be drawn now.
readonly attribute unsigned long numFrames
const short kNormalAnimMode = 0
 Animation mode Constants 0 = normal 1 = don't animate 2 = loop once.
const short kDontAnimMode = 1
const short kLoopOnceAnimMode = 2
attribute unsigned short animationMode
attribute long loopCount
 number of times to loop the image.

Private Attributes

nsIntSize mSize
nsCOMPtr< gfxIImageFramemFrame
nsCOMPtr< nsIPropertiesmProperties

Detailed Description

Definition at line 58 of file imgContainer.h.


Constructor & Destructor Documentation

Definition at line 49 of file imgContainer.cpp.

                           :
  mSize(0,0),
  mFrame(nsnull)
{
  mProperties = do_CreateInstance("@mozilla.org/properties;1");
}

Here is the call graph for this function:

Definition at line 57 of file imgContainer.cpp.

{
  mFrame = nsnull;
}

Member Function Documentation

Adds item to the end of the list of frames.

Parameters:
itemframe to add.
void imgIContainer::clear ( ) [inherited]
void imgIContainer::endFrameDecode ( in unsigned long  framenumber,
in unsigned long  timeout 
) [inherited]
void nsIProperties::get ( in string  prop,
in nsIIDRef  iid,
[iid_is(iid), retval] out nsQIResult  result 
) [inherited]

Gets a property with a given name.

Returns:
NS_ERROR_FAILURE if a property with that name doesn't exist.
NS_ERROR_NO_INTERFACE if the found property fails to QI to the given iid.

Here is the caller graph for this function:

gfxIImageFrame imgIContainer::getFrameAt ( in unsigned long  index) [inherited]
void nsIProperties::getKeys ( out PRUint32  count,
[array, size_is(count), retval] out string  keys 
) [inherited]

Returns an array of the keys.

Here is the caller graph for this function:

boolean nsIProperties::has ( in string  prop) [inherited]

Returns true if the property with the given name exists.

Here is the caller graph for this function:

void imgIContainer::init ( in PRInt32  aWidth,
in PRInt32  aHeight,
in imgIContainerObserver  aObserver 
) [inherited]

Create a new aWidth x aHeight sized image container.

Parameters:
aWidthThe width of the container in which all the gfxIImageFrame children will fit.
aHeightThe height of the container in which all the gfxIImageFrame children will fit.
aObserverObserver to send animation notifications to.
void nsIProperties::set ( in string  prop,
in nsISupports  value 
) [inherited]

Sets a property with a given name to a given value.

Here is the caller graph for this function:

void nsIProperties::undefine ( in string  prop) [inherited]

Undefines a property.

Returns:
NS_ERROR_FAILURE if a property with that name doesn't already exist.

Here is the caller graph for this function:


Member Data Documentation

attribute unsigned short imgIContainer::animationMode [inherited]

Definition at line 103 of file imgIContainer.idl.

Get the current frame that would be drawn if the image was to be drawn now.

Definition at line 88 of file imgIContainer.idl.

readonly attribute PRInt32 imgIContainer::height [inherited]

The height of the container rectangle.

Definition at line 82 of file imgIContainer.idl.

const short imgIContainer::kDontAnimMode = 1 [inherited]

Definition at line 100 of file imgIContainer.idl.

const short imgIContainer::kLoopOnceAnimMode = 2 [inherited]

Definition at line 101 of file imgIContainer.idl.

const short imgIContainer::kNormalAnimMode = 0 [inherited]

Animation mode Constants 0 = normal 1 = don't animate 2 = loop once.

Definition at line 99 of file imgIContainer.idl.

number of times to loop the image.

Note:
-1 means forever.

Definition at line 135 of file imgIContainer.idl.

Definition at line 70 of file imgContainer.h.

Definition at line 71 of file imgContainer.h.

Definition at line 69 of file imgContainer.h.

readonly attribute unsigned long imgIContainer::numFrames [inherited]

Definition at line 91 of file imgIContainer.idl.

Definition at line 72 of file imgIContainer.idl.

readonly attribute PRInt32 imgIContainer::width [inherited]

The width of the container rectangle.

Definition at line 77 of file imgIContainer.idl.


The documentation for this class was generated from the following files: