crystalspace.jbind.impl.video.fontserv
Class csFontServer

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.video.fontserv.csFontServer
All Implemented Interfaces:
iBase, iFontServer, iPointer

public class csFontServer
extends csBase
implements iFontServer

Author:
Quentin Anciaux

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csFontServer(iPointer nPointer)
           
 
Method Summary
 iFont getFont(int iIndex)
          Get Nth loaded font or 0.
 int getFontCount()
          Get number of loaded fonts.
 java.lang.String getName()
          Return the name of the interface
 int getVersion()
          Return the version of the interface
protected  boolean isNativePointerValidSafe(long pointer)
           
 iFont loadFont(java.lang.String filename)
          Load a font by name.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csFontServer

public csFontServer(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase
See Also:
iBase.getVersion()

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase
See Also:
iBase.getName()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe(long pointer)
Specified by:
isNativePointerValidSafe in class csNativeObject
See Also:
csNativeObject.isNativePointerValidSafe(long)

getFont

public iFont getFont(int iIndex)
Description copied from interface: iFontServer
Get Nth loaded font or 0. You can query all loaded fonts with this method, by looping through all indices starting from 0 until you get 0. Note that the returned font is NOT IncRef'd: do it yourself if you store the pointer for long-term use. Implemented in csDefaultFontServer, csFontServerMultiplexor, and csFreeType2Server.

Specified by:
getFont in interface iFontServer
Parameters:
iIndex -
Returns:
See Also:
iFontServer.getFont(int)

getFontCount

public int getFontCount()
Description copied from interface: iFontServer
Get number of loaded fonts. Implemented in csDefaultFontServer, csFontServerMultiplexor, and csFreeType2Server.

Specified by:
getFontCount in interface iFontServer
Returns:
See Also:
iFontServer.getFontCount()

loadFont

public iFont loadFont(java.lang.String filename)
Description copied from interface: iFontServer
Load a font by name. Returns a new iFont object or 0 on failure. Implemented in csDefaultFontServer, csFontServerMultiplexor, and csFreeType2Server.

Specified by:
loadFont in interface iFontServer
Parameters:
filename -
Returns:
See Also:
iFontServer.loadFont(java.lang.String)