State

ALLEGRO_STATE

typedef struct ALLEGRO_STATE ALLEGRO_STATE;

Opaque type which is passed to al_store_state/al_restore_state.

ALLEGRO_STATE_FLAGS

typedef enum ALLEGRO_STATE_FLAGS

Flags which can be passed to al_store_state/al_restore_state as bit combinations. The following flags store or restore settings corresponding to the following al_set_/al_get_ calls:

  • ALLEGRO_STATE_NEW_DISPLAY_PARAMETERS - new_display_format, new_display_refresh_rate, new_display_flags
  • ALLEGRO_STATE_NEW_BITMAP_PARAMETERS - new_bitmap_format, new_bitmap_flags
  • ALLEGRO_STATE_DISPLAY - current_display
  • ALLEGRO_STATE_TARGET_BITMAP - target_bitmap
  • ALLEGRO_STATE_BLENDER - blender
  • ALLEGRO_STATE_NEW_FILE_INTERFACE - new_file_interface
  • ALLEGRO_STATE_BITMAP - same as ALLEGRO_STATE_NEW_BITMAP_PARAMETERS and ALLEGRO_STATE_TARGET_BITMAP
  • ALLEGRO_STATE_ALL - all of the above

al_restore_state

void al_restore_state(ALLEGRO_STATE const *state)

Restores part of the state of the current thread from the given ALLEGRO_STATE object.

See also: al_store_state, ALLEGRO_STATE_FLAGS

al_store_state

void al_store_state(ALLEGRO_STATE *state, int flags)

Stores part of the state of the current thread in the given ALLEGRO_STATE objects. The flags parameter can take any bit-combination of the flags described under ALLEGRO_STATE_FLAGS.

See also: al_restore_state

al_get_errno

int al_get_errno(void)

Some Allegro functions will set an error number as well as returning an error code. Call this function to retrieve the last error number set for the calling thread.

al_set_errno

void al_set_errno(int errnum)

Set the error number for for the calling thread.

Last updated: 2009-09-13 09:23:32 UTC