# E:/DevIL/src-IL/src/il_states.c File Reference

`#include "il_internal.h"`
`#include "il_states.h"`
`#include <stdlib.h>`

## Functions

void | ilDefaultStates ()
| Set all states to their defaults.
ILconst_string ILAPIENTRY | ilGetString (ILenum StringName)
| Returns a constant string detailing aspects about this library.
char * | iClipString (char *String, ILuint MaxLen)
char * | iGetString (ILenum StringName)
ILboolean ILAPIENTRY | ilEnable (ILenum Mode)
| Enables a mode.
ILboolean ILAPIENTRY | ilDisable (ILenum Mode)
| Disables a mode.
ILboolean | ilAble (ILenum Mode, ILboolean Flag)
ILboolean ILAPIENTRY | ilIsEnabled (ILenum Mode)
| Checks whether the mode is enabled.
ILboolean ILAPIENTRY | ilIsDisabled (ILenum Mode)
| Checks whether the mode is disabled.
void ILAPIENTRY | ilGetBooleanv (ILenum Mode, ILboolean *Param)
| Sets Param equal to the current value of the Mode.
ILboolean ILAPIENTRY | ilGetBoolean (ILenum Mode)
| Returns the current value of the Mode.
ILimage * | iGetBaseImage (void)
ILuint | iGetActiveNum (ILenum Type)
| Internal function to figure out where we are in an image chain.
void ILAPIENTRY | ilGetIntegerv (ILenum Mode, ILint *Param)
| Sets Param equal to the current value of the Mode.
void ILAPIENTRY | iGetIntegervImage (ILimage *Image, ILenum Mode, ILint *Param)
| Sets Param equal to the current value of the Mode.
ILint ILAPIENTRY | ilGetInteger (ILenum Mode)
| Returns the current value of the Mode.
ILboolean ILAPIENTRY | ilOriginFunc (ILenum Mode)
| Sets the default origin to be used.
ILboolean ILAPIENTRY | ilFormatFunc (ILenum Mode)
| Sets the default format to be used.
ILboolean ILAPIENTRY | ilTypeFunc (ILenum Mode)
| Sets the default type to be used.
ILboolean ILAPIENTRY | ilCompressFunc (ILenum Mode)
void ILAPIENTRY | ilPushAttrib (ILuint Bits)
| Pushes the states indicated by Bits onto the state stack.
void ILAPIENTRY | ilPopAttrib ()
| Pops the last entry off the state stack into the current states.
void ILAPIENTRY | ilHint (ILenum Target, ILenum Mode)
| Specifies implementation-dependent performance hints.
ILenum | iGetHint (ILenum Target)
void ILAPIENTRY | ilSetString (ILenum Mode, const char *String)
void ILAPIENTRY | ilSetInteger (ILenum Mode, ILint Param)
ILint | iGetInt (ILenum Mode)

## Variables

ILconst_string | _ilVendor = IL_TEXT("Abysmal Software")
ILconst_string | _ilVersion = IL_TEXT("Developer's Image Library (DevIL) 1.7.5")
char * | _ilLoadExt
char * | _ilSaveExt

## Function Documentation

char* iClipString | ( | char * | String,
|  | ILuint | MaxLen |
| ) |  |  |

Referenced by iGetString().

ILuint iGetActiveNum | ( | ILenum | Type | ) |

Internal function to figure out where we are in an image chain.

Referenced by ilGetIntegerv().

ILimage* iGetBaseImage | ( | void |  | ) |

Referenced by iGetActiveNum().

ILenum iGetHint | ( | ILenum | Target | ) |

Referenced by iLoadHdrInternal(), ilReadUncompBmp(), iReadNonRleSgi(), iSavePnmInternal(), iUncompressDcx(), iUncompressPcx(), iUncompressSmall(), and iUncompressTgaData().

ILint iGetInt | ( | ILenum | Mode | ) |

Referenced by iConvertImage(), iLoadPcdInternal(), iSaveDdsInternal(), iSaveJpegInternal(), iSavePngInternal(), iSaveSgiInternal(), iSaveTargaInternal(), iSaveWbmpInternal(), and iTargaSize().

void ILAPIENTRY iGetIntegervImage | ( | ILimage * | Image,
|  | ILenum | Mode,
|  | ILint * | Param |
| ) |  |  |

Sets Param equal to the current value of the Mode.

Referenced by GetCubemapInfo(), ilGetIntegerv(), and iluGetImageInfo().

char* iGetString | ( | ILenum | StringName | ) |

Referenced by ilSaveCHeader(), iSavePngInternal(), iSaveTargaInternal(), and iTargaSize().

ILboolean ilAble | ( | ILenum | Mode,
|  | ILboolean | Flag |
| ) |  |  |

Referenced by ilDisable(), and ilEnable().

ILboolean ILAPIENTRY ilCompressFunc | ( | ILenum | Mode | ) |

void ilDefaultStates | ( | void |  | ) |

Set all states to their defaults.

Referenced by ilInit(), and ilPushAttrib().

ILboolean ILAPIENTRY ilDisable | ( | ILenum | Mode | ) |

Disables a mode.

Referenced by ilState::Disable().

ILboolean ILAPIENTRY ilEnable | ( | ILenum | Mode | ) |

Enables a mode.

Referenced by ilState::Enable().

ILboolean ILAPIENTRY ilFormatFunc | ( | ILenum | Mode | ) |

Sets the default format to be used.

Referenced by ilSetInteger().

ILboolean ILAPIENTRY ilGetBoolean | ( | ILenum | Mode | ) |

Returns the current value of the Mode.

Referenced by ilState::GetBool(), ilFixCur(), iLoadDoomFlatInternal(), iLoadDoomInternal(), iLoadMdlInternal(), ilSaveBmp(), ilSaveCHeader(), ilSaveDds(), ilSaveExr(), ilSaveHdr(), ilSaveJascPal(), ilSaveJp2(), ilSaveJpeg(), ilSaveMng(), ilSavePcx(), ilSavePng(), ilSavePnm(), ilSavePsd(), ilSaveRaw(), ilSaveSgi(), ilSaveTarga(), ilSaveTiff(), ilSaveWbmp(), and iSaveJpegInternal().

void ILAPIENTRY ilGetBooleanv | ( | ILenum | Mode,
|  | ILboolean * | Param |
| ) |  |  |

Sets Param equal to the current value of the Mode.

Referenced by ilState::Get(), and ilGetBoolean().

ILint ILAPIENTRY ilGetInteger | ( | ILenum | Mode | ) |

Returns the current value of the Mode.

Referenced by AllocImage(), ilImage::Bitpp(), ilImage::Bpp(), ilImage::Depth(), ilImage::Format(), ilState::GetInt(), ilImage::Height(), ilAddAlphaKey(), ilCopyPixels1D(), ilCopyPixels2D(), ilCopyPixels3D(), ilDxtcDataToImage(), ilFixCur(), ilFixImage(), ilFreeImageDxtcData(), ilGetBooleanv(), ilImageToDxtcData(), iLoadRawInternal(), iLoadVtfInternal(), ilSaveJascPal(), ilSetPixels1D(), ilSetPixels2D(), ilSetPixels3D(), iluScaleAlpha(), iluScaleColours(), iNeuQuant(), iSaveBitmapInternal(), iSaveDdsInternal(), iSavePngInternal(), ilImage::NumImages(), ilImage::NumMipmaps(), ilImage::PaletteAlphaIndex(), ilImage::PaletteType(), ReadMipmaps(), ilImage::Type(), ilImage::Width(), and WriteHeader().

void ILAPIENTRY ilGetIntegerv | ( | ILenum | Mode,
|  | ILint * | Param |
| ) |  |  |

Sets Param equal to the current value of the Mode.

Referenced by ilState::Get(), iGetInt(), and ilGetInteger().

ILconst_string ILAPIENTRY ilGetString | ( | ILenum | StringName | ) |

Returns a constant string detailing aspects about this library.

Referenced by ilState::GetString().

void ILAPIENTRY ilHint | ( | ILenum | Target,
|  | ILenum | Mode |
| ) |  |  |

Specifies implementation-dependent performance hints.

ILboolean ILAPIENTRY ilIsDisabled | ( | ILenum | Mode | ) |

Checks whether the mode is disabled.

Referenced by ilState::IsDisabled().

ILboolean ILAPIENTRY ilIsEnabled | ( | ILenum | Mode | ) |

Checks whether the mode is enabled.

Referenced by Compress(), ilBlit(), ilCompressDXT(), ilConvertImage(), ilCopyPixels1D(), ilCopyPixels2D(), ilCopyPixels3D(), ilFixCur(), ilIsDisabled(), iLoadRawInternal(), ilSetPixels1D(), ilSetPixels2D(), ilSetPixels3D(), and ilState::IsEnabled().

ILboolean ILAPIENTRY ilOriginFunc | ( | ILenum | Mode | ) |

Sets the default origin to be used.

Referenced by ilSetInteger(), and ilState::Origin().

void ILAPIENTRY ilPopAttrib | ( | void |  | ) |

Pops the last entry off the state stack into the current states.

Referenced by ilState::Pop().

void ILAPIENTRY ilPushAttrib | ( | ILuint | Bits | ) |

Pushes the states indicated by Bits onto the state stack.

Referenced by ilState::Push().

void ILAPIENTRY ilSetInteger | ( | ILenum | Mode,
|  | ILint | Param |
| ) |  |  |

void ILAPIENTRY ilSetString | ( | ILenum | Mode,
|  | const char * | String |
| ) |  |  |

ILboolean ILAPIENTRY ilTypeFunc | ( | ILenum | Mode | ) |

Sets the default type to be used.

Referenced by ilSetInteger().

## Variable Documentation

char* _ilLoadExt

Initial value:

     "" IL_BMP_EXT IL_CUT_EXT IL_DCX_EXT IL_DDS_EXT
                                                                            IL_EXR_EXT IL_GIF_EXT IL_HDR_EXT IL_ICNS_EXT
                                                                            IL_ICO_EXT IL_IFF_EXT IL_JPG_EXT IL_JP2_EXT
                                                                            IL_LIF_EXT IL_MDL_EXT IL_MNG_EXT IL_PCD_EXT
                                                                            IL_PCX_EXT IL_PIC_EXT IL_PIX_EXT IL_PNG_EXT
                                                                            IL_PNM_EXT IL_PSD_EXT IL_PSP_EXT IL_PXR_EXT
                                                                            IL_RAW_EXT IL_SGI_EXT IL_SUN_EXT IL_TGA_EXT
                                                                            IL_TIF_EXT IL_VTF_EXT IL_WAL_EXT IL_XPM_EXT

Referenced by ilGetString().

char* _ilSaveExt

Initial value:

     "" IL_BMP_EXT IL_CHEAD_EXT IL_DDS_EXT IL_EXR_EXT
                                                                            IL_HDR_EXT IL_JP2_EXT IL_JPG_EXT IL_PCX_EXT
                                                                            IL_PNG_EXT IL_PNM_EXT IL_PSD_EXT IL_RAW_EXT
                                                                            IL_SGI_EXT IL_TGA_EXT IL_TIF_EXT IL_WBMP_EXT

Referenced by ilGetString().

ILconst_string _ilVendor = IL_TEXT("Abysmal Software")

Referenced by ilGetString().

ILconst_string _ilVersion = IL_TEXT("Developer's Image Library (DevIL) 1.7.5")

Referenced by ilGetString().