unit mAWAPI;

interface

uses
  Windows, Messages, SysUtils, Classes;

const
  AW_MAX_ATTRIBUTE_LENGTH = 255;
  AW_BUILD = 37;
  AW_CELL_MIN = -32767;

{$Z4} // this controls enumeration storage: $z2=unsigned words; $z4=unsigned double-word

type
  UChar = Byte;       // unsigned char
  PUChar = ^Byte;     // unsigned char *

  Short = Smallint;
  PShort = ^Smallint; // short *

  UShort = Word;  // unsigned short
  PUShort = ^Word;

  Long = Longint;
  ULong = LongWord;   // unsigned long

type AW_ATTRIBUTE = (
  AW_LOGIN_NAME,
  AW_LOGIN_PASSWORD,
  AW_LOGIN_OWNER,
  AW_LOGIN_PRIVILEGE_PASSWORD,
  AW_LOGIN_PRIVILEGE_NUMBER,
  AW_LOGIN_PRIVILEGE_NAME,
  AW_LOGIN_APPLICATION,
  AW_LOGIN_EMAIL, // not used by the SDK
  AW_UNIVERSE_BROWSER_MINIMUM,
  AW_UNIVERSE_BROWSER_RELEASE,
  AW_UNIVERSE_BROWSER_BETA,
  AW_UNIVERSE_WORLD_MINIMUM,
  AW_UNIVERSE_WORLD_START,
  AW_UNIVERSE_REGISTRATION_REQUIRED,
  AW_UNIVERSE_BUILD_NUMBER,

  AW_UNIVERSE_MONTHLY_CHARGE,
  AW_UNIVERSE_ANNUAL_CHARGE,
  AW_UNIVERSE_REGISTER_METHOD,

  AW_UNIVERSE_TIME,
  AW_UNIVERSE_CITIZEN_CHANGES_ALLOWED,
  AW_UNIVERSE_BROWSER_RELEASE_22,
  AW_UNIVERSE_WELCOME_MESSAGE,	// new 21
  AW_UNIVERSE_WORLD_RELEASE,	// new 21
  AW_UNIVERSE_WORLD_BETA,		// new 21
  AW_UNIVERSE_ALLOW_TOURISTS, // new 24
  AW_UNIVERSE_SEARCH_URL, // new 24
  AW_CITIZEN_NUMBER,
  AW_CITIZEN_NAME,
  AW_CITIZEN_PASSWORD,
  AW_CITIZEN_EMAIL,
  AW_CITIZEN_TIME_LEFT,
  AW_CITIZEN_PRIVILEGE_PASSWORD,
  AW_CITIZEN_IMMIGRATION_TIME,
  AW_CITIZEN_EXPIRATION_TIME,
  AW_CITIZEN_BETA,
  AW_CITIZEN_LAST_LOGIN,
  AW_CITIZEN_BOT_LIMIT,
  AW_CITIZEN_TOTAL_TIME,
  AW_CITIZEN_ENABLED,
  AW_CITIZEN_COMMENT,
  AW_CITIZEN_URL,
  AW_WORLD_NAME,
  AW_WORLD_TITLE,
  AW_WORLD_BACKDROP,
  AW_WORLD_GROUND,
  AW_WORLD_OBJECT_PATH,
  AW_WORLD_OBJECT_REFRESH,
  AW_WORLD_BUILD_RIGHT,
  AW_WORLD_EMINENT_DOMAIN_RIGHT,
  AW_WORLD_ENTER_RIGHT,
  AW_WORLD_SPECIAL_OBJECTS_RIGHT,
  AW_WORLD_FOG_RED,
  AW_WORLD_FOG_GREEN,
  AW_WORLD_FOG_BLUE,
  AW_WORLD_CARETAKER_CAPABILITY,
  AW_WORLD_RESTRICTED_RADIUS,
  AW_WORLD_PUBLIC_SPEAKER_CAPABILITY,
  AW_WORLD_PUBLIC_SPEAKER_RIGHT,
  AW_WORLD_CREATION_TIMESTAMP,
  AW_WORLD_HOME_PAGE,
  AW_WORLD_BUILD_NUMBER,
  AW_WORLD_OBJECT_PASSWORD,
  AW_WORLD_DISABLE_CREATE_URL,
  AW_WORLD_RATING,
  AW_WORLD_WELCOME_MESSAGE,
  AW_WORLD_EJECT_RIGHT,
  AW_WORLD_EJECT_CAPABILITY,
  AW_WORLD_CELL_LIMIT,
  AW_WORLD_BUILD_CAPABILITY,
  AW_WORLD_ALLOW_PASSTHRU,
  AW_WORLD_ALLOW_FLYING,
  AW_WORLD_ALLOW_TELEPORT,
  AW_WORLD_ALLOW_OBJECT_SELECT,
  AW_WORLD_BOTS_RIGHT,
  AW_WORLD_SPEAK_CAPABILITY,
  AW_WORLD_SPEAK_RIGHT,
  AW_WORLD_ALLOW_TOURIST_WHISPER,
  AW_WORLD_LIGHT_X,
  AW_WORLD_LIGHT_Y,
  AW_WORLD_LIGHT_Z,
  AW_WORLD_LIGHT_RED,
  AW_WORLD_LIGHT_GREEN,
  AW_WORLD_LIGHT_BLUE,
  AW_WORLD_AMBIENT_LIGHT_RED,
  AW_WORLD_AMBIENT_LIGHT_GREEN,
  AW_WORLD_AMBIENT_LIGHT_BLUE,
  AW_WORLD_ALLOW_AVATAR_COLLISION,
  AW_WORLD_FOG_ENABLE,
  AW_WORLD_FOG_MINIMUM,
  AW_WORLD_FOG_MAXIMUM,
  AW_WORLD_MAX_USERS,
  AW_WORLD_SIZE,
  AW_WORLD_OBJECT_COUNT,
  AW_WORLD_EXPIRATION,
  AW_WORLD_SPECIAL_COMMANDS_RIGHT,
  AW_WORLD_MAX_LIGHT_RADIUS,
  AW_WORLD_SKYBOX,
  AW_WORLD_MINIMUM_VISIBILITY,
  AW_WORLD_REPEATING_GROUND,
  AW_WORLD_KEYWORDS,
  AW_WORLD_ENABLE_TERRAIN,
  AW_WORLD_ALLOW_3_AXIS_ROTATION,
  AW_WORLD_TERRAIN_TIMESTAMP,
  AW_WORLD_ENTRY_POINT,
  AW_WORLD_SKY_NORTH_RED,
  AW_WORLD_SKY_NORTH_GREEN,
  AW_WORLD_SKY_NORTH_BLUE,
  AW_WORLD_SKY_SOUTH_RED,
  AW_WORLD_SKY_SOUTH_GREEN,
  AW_WORLD_SKY_SOUTH_BLUE,
  AW_WORLD_SKY_EAST_RED,
  AW_WORLD_SKY_EAST_GREEN,
  AW_WORLD_SKY_EAST_BLUE,
  AW_WORLD_SKY_WEST_RED,
  AW_WORLD_SKY_WEST_GREEN,
  AW_WORLD_SKY_WEST_BLUE,
  AW_WORLD_SKY_TOP_RED,
  AW_WORLD_SKY_TOP_GREEN,
  AW_WORLD_SKY_TOP_BLUE,
  AW_WORLD_SKY_BOTTOM_RED,
  AW_WORLD_SKY_BOTTOM_GREEN,
  AW_WORLD_SKY_BOTTOM_BLUE,
  AW_WORLD_CLOUDS_LAYER1_TEXTURE,
  AW_WORLD_CLOUDS_LAYER1_MASK,
  AW_WORLD_CLOUDS_LAYER1_TILE,
  AW_WORLD_CLOUDS_LAYER1_SPEED_X,
  AW_WORLD_CLOUDS_LAYER1_SPEED_Z,
  AW_WORLD_CLOUDS_LAYER1_OPACITY,
  AW_WORLD_CLOUDS_LAYER2_TEXTURE,
  AW_WORLD_CLOUDS_LAYER2_MASK,
  AW_WORLD_CLOUDS_LAYER2_TILE,
  AW_WORLD_CLOUDS_LAYER2_SPEED_X,
  AW_WORLD_CLOUDS_LAYER2_SPEED_Z,
  AW_WORLD_CLOUDS_LAYER2_OPACITY,
  AW_WORLD_CLOUDS_LAYER3_TEXTURE,
  AW_WORLD_CLOUDS_LAYER3_MASK,
  AW_WORLD_CLOUDS_LAYER3_TILE,
  AW_WORLD_CLOUDS_LAYER3_SPEED_X,
  AW_WORLD_CLOUDS_LAYER3_SPEED_Z,
  AW_WORLD_CLOUDS_LAYER3_OPACITY,
  AW_WORLD_DISABLE_CHAT,
  AW_WORLD_ALLOW_CITIZEN_WHISPER,
  AW_WORLD_ALWAYS_SHOW_NAMES,
  AW_WORLD_DISABLE_AVATAR_LIST,
  AW_WORLD_AVATAR_REFRESH_RATE,

  // new in 29
  AW_WORLD_WATER_TEXTURE,
  AW_WORLD_WATER_MASK,
  AW_WORLD_WATER_BOTTOM_TEXTURE,
  AW_WORLD_WATER_BOTTOM_MASK,
  AW_WORLD_WATER_OPACITY,
  AW_WORLD_WATER_RED,
  AW_WORLD_WATER_GREEN,
  AW_WORLD_WATER_BLUE,
  AW_WORLD_WATER_LEVEL,
  AW_WORLD_WATER_SURFACE_MOVE,
  AW_WORLD_WATER_WAVE_MOVE,
  AW_WORLD_WATER_SPEED,
  AW_WORLD_WATER_ENABLED,
  AW_WORLD_EMINENT_DOMAIN_CAPABILITY,
  AW_WORLD_LIGHT_TEXTURE,
  AW_WORLD_LIGHT_MASK,
  AW_WORLD_LIGHT_DRAW_SIZE,
  AW_WORLD_LIGHT_DRAW_FRONT,
  AW_WORLD_LIGHT_DRAW_BRIGHT,
  AW_WORLD_TERRAIN_AMBIENT,
  AW_WORLD_TERRAIN_DIFFUSE,
  AW_WORLD_WATER_VISIBILITY,
  AW_WORLD_SOUND_FOOTSTEP,
  AW_WORLD_SOUND_WATER_ENTER,
  AW_WORLD_SOUND_WATER_EXIT,
  AW_WORLD_GRAVITY,
  AW_WORLD_BUOYANCY,

  AW_WORLD_ALLOW_TOURIST_BUILD, // new 31
  AW_WORLD_WORLD_ENABLE_REFERER, // new 32

  AW_WORLD_WATER_UNDER_TERRAIN, // new 37
  AW_WORLD_TERRAIN_OFFSET, // new 37
  
  AW_MY_X,
  AW_MY_Y,
  AW_MY_Z,
  AW_MY_YAW,
  AW_MY_PITCH,// new 29
  AW_MY_TYPE,
  AW_MY_GESTURE,
  AW_MY_STATE, // new 29
  AW_AVATAR_SESSION,
  AW_AVATAR_NAME,
  AW_AVATAR_X,
  AW_AVATAR_Y,
  AW_AVATAR_Z,
  AW_AVATAR_YAW,
  AW_AVATAR_PITCH,
  AW_AVATAR_TYPE,
  AW_AVATAR_GESTURE,
  AW_AVATAR_STATE,
  AW_AVATAR_ADDRESS,
  AW_AVATAR_VERSION,
  AW_AVATAR_CITIZEN,
  AW_AVATAR_PRIVILEGE,
  AW_CHAT_SESSION,
  AW_CHAT_MESSAGE,
  AW_CELL_X,
  AW_CELL_Z,
  AW_CELL_SEQUENCE,
  AW_CELL_SIZE,
  AW_CELL_ITERATOR,
  AW_CELL_COMBINE, // new 21
  AW_OBJECT_NUMBER,
  AW_OBJECT_X,
  AW_OBJECT_Y,
  AW_OBJECT_Z,
  AW_OBJECT_YAW,
  AW_OBJECT_TILT,      // new 24
  AW_OBJECT_ROLL,      // new 24
  AW_OBJECT_MODEL,
  AW_OBJECT_DESCRIPTION,
  AW_OBJECT_ACTION,
  AW_OBJECT_OLD_NUMBER,
  AW_OBJECT_OLD_X,
  AW_OBJECT_OLD_Z,
  AW_OBJECT_OWNER,
  AW_OBJECT_SESSION,
  AW_OBJECT_BUILD_TIMESTAMP,
  AW_QUERY_COMPLETE,
  AW_CHAT_TYPE,
  AW_LICENSE_NAME,
  AW_LICENSE_PASSWORD,
  AW_LICENSE_USERS,
  AW_LICENSE_RANGE,
  AW_LICENSE_EMAIL,
  AW_LICENSE_COMMENT,
  AW_LICENSE_CREATION_TIME,
  AW_LICENSE_EXPIRATION_TIME,
  AW_LICENSE_LAST_START,
  AW_LICENSE_LAST_ADDRESS, // new 24
  AW_LICENSE_HIDDEN,          // new 24
  AW_LICENSE_ALLOW_TOURISTS,   // new 24
  AW_WORLDLIST_NAME,
  AW_WORLDLIST_STATUS,
  AW_WORLDLIST_USERS,
  AW_WORLDLIST_RATING, // new 29
  AW_WORLDLIST_MORE,   // NEW w/ BUILD 20
  AW_EJECT_SESSION,
  AW_EJECT_DURATION,
  AW_EJECTION_TYPE, // new 24
  AW_EJECTION_ADDRESS,
  AW_EJECTION_EXPIRATION_TIME,
  AW_EJECTION_CREATION_TIME,
  AW_EJECTION_COMMENT,
  AW_DISCONNECT_REASON,
  AW_FILE_RECIPIENT,
  AW_FILE_SENDER,
  AW_FILE_SENDER_NAME,
  AW_FILE_SESSION,
  AW_FILE_ADDRESS,
  AW_FILE_PORT,
  AW_CLICKED_SESSION,
  AW_CLICKED_NAME,
  AW_URL_NAME,
  AW_URL_POST, // new 37
  AW_URL_TARGET,
  AW_URL_TARGET_3D, // new 37
  AW_TELEPORT_WORLD,
  AW_TELEPORT_X,
  AW_TELEPORT_Y,
  AW_TELEPORT_Z,
  AW_TELEPORT_YAW,
  AW_TELEPORT_WARP,
  AW_SERVER_BUILD,    // new 24
  AW_SERVER_NAME,
  AW_SERVER_PASSWORD,
  AW_SERVER_REGISTRY,
  AW_SERVER_CARETAKERS,
  AW_SERVER_ID,
  AW_SERVER_ENABLED,
  AW_SERVER_STATE,
  AW_SERVER_USERS,
  AW_SERVER_MAX_USERS,
  AW_SERVER_OBJECTS,
  AW_SERVER_SIZE,
  AW_SERVER_EXPIRATION,
  AW_SERVER_START_RC,
  AW_SERVER_MORE,
  AW_SERVER_TERRAIN_NODES,
  AW_TERRAIN_X,
  AW_TERRAIN_Z,
  AW_TERRAIN_PAGE_X,
  AW_TERRAIN_PAGE_Z,
  AW_TERRAIN_NODE_X,
  AW_TERRAIN_NODE_Z,
  AW_TERRAIN_NODE_SIZE,
  AW_TERRAIN_NODE_TEXTURE_COUNT,
  AW_TERRAIN_NODE_HEIGHT_COUNT,
  AW_TERRAIN_NODE_TEXTURES,
  AW_TERRAIN_NODE_HEIGHTS,
  AW_TERRAIN_SEQUENCE,
  AW_TERRAIN_COMPLETE,
  AW_ENTER_GLOBAL,
  AW_CONSOLE_RED,
  AW_CONSOLE_GREEN,
  AW_CONSOLE_BLUE,
  AW_CONSOLE_BOLD,
  AW_CONSOLE_ITALICS,
  AW_CONSOLE_MESSAGE,
  
// ---------------------------  
// new 37  
  AW_BOTGRAM_TO,
  AW_BOTGRAM_FROM,
  AW_BOTGRAM_FROM_NAME,
  AW_BOTGRAM_TYPE,
  AW_BOTGRAM_TEXT,
  AW_TOOLBAR_ID,
  AW_TOOLBAR_SESSION,
  AW_USERLIST_MORE,
  AW_USERLIST_NAME,
  AW_USERLIST_WORLD,
  AW_USERLIST_EMAIL,
  AW_USERLIST_CITIZEN,
  AW_USERLIST_PRIVILEGE,
  AW_USERLIST_STATE,
  AW_USERLIST_ADDRESS,
  AW_USERLIST_ENABLED,
  AW_USERLIST_ID,
  // ----------------------

  AW_MAX_ATTRIB);

type AW_EVENT_ATTRIBUTE = (
  AW_EVENT_AVATAR_ADD,
  AW_EVENT_AVATAR_CHANGE,
  AW_EVENT_AVATAR_DELETE,
  AW_EVENT_CELL_BEGIN,
  AW_EVENT_CELL_OBJECT,
  AW_EVENT_CELL_END,
  AW_EVENT_CHAT,
  AW_EVENT_OBJECT_ADD,
  AW_EVENT_OBJECT_DELETE,
  AW_EVENT_UNIVERSE_ATTRIBUTES,
  AW_EVENT_UNIVERSE_DISCONNECT, // new 37
  AW_EVENT_WORLD_ATTRIBUTES,
  AW_EVENT_WORLD_INFO,
  AW_EVENT_WORLD_DISCONNECT,
  AW_EVENT_SEND_FILE,
  AW_EVENT_CONTACT_STATE,
  AW_EVENT_TELEGRAM,
  AW_EVENT_JOIN,
  AW_EVENT_OBJECT_CLICK,
  AW_EVENT_OBJECT_SELECT,
  AW_EVENT_AVATAR_CLICK,
  AW_EVENT_URL,
  AW_EVENT_URL_CLICK, // new 37
  AW_EVENT_TELEPORT,
  AW_EVENT_ADMIN_WORLD_INFO,
  AW_EVENT_ADMIN_WORLD_DELETE,
  AW_EVENT_TERRAIN_BEGIN,
  AW_EVENT_TERRAIN_DATA,
  AW_EVENT_TERRAIN_END,
  AW_EVENT_CONSOLE_MESSAGE,
  AW_EVENT_TERRAIN_CHANGED,
  
  // new 37
  AW_EVENT_BOTGRAM,
	AW_EVENT_TOOLBAR_CLICK,
	AW_EVENT_USER_INFO,


  AW_MAX_EVENT
  );

type AW_CALLBACK = (
  AW_CALLBACK_LOGIN,
  AW_CALLBACK_ENTER,
  AW_CALLBACK_OBJECT_RESULT,
  AW_CALLBACK_LICENSE_ATTRIBUTES,
  AW_CALLBACK_LICENSE_RESULT,
  AW_CALLBACK_CITIZEN_ATTRIBUTES,
  AW_CALLBACK_CITIZEN_RESULT,
  AW_CALLBACK_QUERY,
  AW_CALLBACK_WORLD_LIST,
  AW_CALLBACK_SEND_FILE,
  AW_CALLBACK_JOIN,
  AW_CALLBACK_PASSWORD_SEND,
  AW_CALLBACK_IMMIGRATE,
  AW_CALLBACK_REGISTER,
  AW_CALLBACK_UNIVERSE_EJECTION,
  AW_CALLBACK_UNIVERSE_EJECTION_RESULT,
  AW_CALLBACK_ADDRESS,
  AW_CALLBACK_WORLD_EJECTION,
  AW_CALLBACK_WORLD_EJECTION_RESULT,
  AW_CALLBACK_ADMIN_WORLD_LIST,
  AW_CALLBACK_ADMIN_WORLD_RESULT,
  AW_CALLBACK_DELETE_ALL_OBJECTS_RESULT,
  AW_CALLBACK_CELL_RESULT,
  AW_CALLBACK_RELOAD_REGISTRY,
  AW_CALLBACK_ATTRIBUTES_RESET_RESULT,
  AW_CALLBACK_ADMIN,
  AW_CALLBACK_CONTACT_ADD,
  AW_CALLBACK_TELEGRAM_RESULT,
  AW_CALLBACK_TERRAIN_SET_RESULT,
  AW_CALLBACK_TERRAIN_NEXT_RESULT,
  AW_CALLBACK_TERRAIN_DELETE_ALL_RESULT,
  AW_CALLBACK_TERRAIN_LOAD_NODE_RESULT,
  AW_CALLBACK_BOTGRAM_RESULT,  // new 37
  AW_CALLBACK_USER_LIST,       // new 37
  
  AW_MAX_CALLBACK);

type AW_CHAT_TYPES = (
  AW_CHAT_SAID,
  AW_CHAT_BROADCAST,
  AW_CHAT_WHISPER
) ;

type AW_CONTACT_STATES = (
  AW_CONTACT_OFFLINE,
  AW_CONTACT_ONLINE,
  AW_CONTACT_NOT_A_CITIZEN,
  AW_CONTACT_AFK,
  AW_CONTACT_UNKNOWN
) ;

type AW_WORLD_STATES = (
  AW_WORLDSTATUS_UNKNOWN,
  AW_WORLDSTATUS_PUBLIC,
  AW_WORLDSTATUS_PRIVATE,
  AW_WORLDSTATUS_STOPPED
) ;

type AW_SERVER_STATES =(
  AW_SERVER_STOPPED,
  AW_SERVER_STARTING,
  AW_SERVER_START_WAIT,
  AW_SERVER_RUNNING
);

type  AW_CONNECTION_TYPES=(
  AW_CONNECTION_DIRECT,
  AW_CONNECTION_FIREWALL_NO_PROXY,
  AW_CONNECTION_PROXY_AUTO,
  AW_CONNECTION_PROXY_NO_AUTH,
  AW_CONNECTION_PROXY_BASIC,
  AW_CONNECTION_PROXY_AUTH_NTLM,
  AW_CONNECTION_MAX
);

type  AW_CONNECTION_STATES=(
  AW_CONNECTION_STATE_NOT_CONNECTED,
  AW_CONNECTION_STATE_CONNECTING_TO_PROXY,
  AW_CONNECTION_STATE_NEGOTIATING_WITH_PROXY,
  AW_CONNECTION_STATE_CONNECTING_TO_TUNNEL,
  AW_CONNECTION_STATE_CONNECTING_TO_UNIVERSE,
  AW_CONNECTION_STATE_CONNECTED,
  AW_CONNECTION_STATE_PASSWORD_REQUIRED
);

type  AW_EJECTION_TYPES=(
  AW_EJECT_BY_ADDRESS,
  AW_EJECT_BY_COMPUTER,
  AW_EJECT_BY_CITIZEN
);

type AW_AVATAR_STATES = (
  AW_AVATAR_STATE_WALKING,
  AW_AVATAR_STATE_RUNNING,
  AW_AVATAR_STATE_FLYING,
  AW_AVATAR_STATE_SWIMMING,
  AW_AVATAR_STATE_FALLING,
  AW_AVATAR_STATE_JUMPING,
  AW_AVATAR_STATE_WARPING
);

type AW_REGISTER_METHODS=(
  AW_REGISTER_MONTHLY,
  AW_REGISTER_ANNUAL,
  AW_REGISTER_USER
);

type AWhInst = Pointer;
     PAWhInst = ^AWhInst;
     AWEventProc = procedure; cdecl;
     AWCallbackProc = procedure(rc : Integer); cdecl;

type SectorSeqs = Array[0..2, 0..2] of Integer;
     Sector5Seqs = Array[0..4, 0..4] of Integer;

function  aw_init (build: Integer): Integer; cdecl; external 'aw.dll';
procedure  aw_term ; cdecl; external 'aw.dll';
function  aw_create (const domain: PChar; port: Integer; instance: PAWhInst): Integer; cdecl; external 'aw.dll';
function  aw_create_resolved (address: Cardinal; port: Integer; instance: PAWhInst): Integer; cdecl; external 'aw.dll';
function  aw_destroy : Integer; cdecl; external 'aw.dll';
function  aw_instance : AWhInst; cdecl; external 'aw.dll';
function  aw_instance_set (instance: AWhInst): Integer; cdecl; external 'aw.dll';
function  aw_login : Integer; cdecl; external 'aw.dll';
function  aw_wait (milliseconds: Integer): Integer; cdecl; external 'aw.dll';
function  aw_int (a: AW_ATTRIBUTE): Integer; cdecl; external 'aw.dll';
function  aw_int_set (a: AW_ATTRIBUTE; value: Integer): Integer; cdecl; external 'aw.dll';
function  aw_string (a: AW_ATTRIBUTE): PChar; cdecl; external 'aw.dll';
function  aw_string_set (a: AW_ATTRIBUTE;const value: PChar): Integer; cdecl; external 'aw.dll';
function  aw_bool (a: AW_ATTRIBUTE): Integer; cdecl; external 'aw.dll';
function  aw_bool_set (a: AW_ATTRIBUTE; value: Integer): Integer; cdecl; external 'aw.dll';
function  aw_float (a: AW_ATTRIBUTE): Single; cdecl; external 'aw.dll';
function  aw_float_set (a: AW_ATTRIBUTE; value:  Single): integer; cdecl; external 'aw.dll';
function aw_data(a: AW_ATTRIBUTE; var length: UChar): PChar; cdecl; external 'aw.dll'
function aw_data_set(a: AW_ATTRIBUTE; const value: PChar; length: UChar): integer; cdecl; external 'aw.dll'
function  aw_callback_ (c: AW_CALLBACK): AWCallbackProc; cdecl; external 'aw.dll' name 'aw_callback';
function  aw_callback_set_ (c: AW_CALLBACK; callback: AWCallbackProc): Integer; cdecl; external 'aw.dll' name 'aw_callback_set';
function  aw_event (a: AW_EVENT_ATTRIBUTE): AWEventProc; cdecl; external 'aw.dll';
function  aw_event_set (a: AW_EVENT_ATTRIBUTE; handler: AWEventProc): Integer; cdecl; external 'aw.dll';
function  aw_enter (const world: PChar): Integer; cdecl; external 'aw.dll';
function  aw_exit : Integer; cdecl; external 'aw.dll';
function  aw_say (const awmessage: PChar): Integer; cdecl; external 'aw.dll';
function  aw_whisper (session_id: Integer; const awmessage: PChar): Integer; cdecl; external 'aw.dll';
function  aw_state_change : Integer; cdecl; external 'aw.dll';
function  aw_citizen_attributes_by_name (const name: PChar): Integer; cdecl; external 'aw.dll';
function  aw_citizen_attributes_by_number (citizen: Integer): Integer; cdecl; external 'aw.dll';
function  aw_citizen_add : Integer; cdecl; external 'aw.dll';
function  aw_citizen_change : Integer; cdecl; external 'aw.dll';
function  aw_citizen_delete (citizen: Integer): Integer; cdecl; external 'aw.dll';
function  aw_citizen_next : Integer; cdecl; external 'aw.dll';
function  aw_citizen_previous : Integer; cdecl; external 'aw.dll';
function  aw_license_add : Integer; cdecl; external 'aw.dll';
function  aw_license_attributes (const name: PChar): Integer; cdecl; external 'aw.dll';
function  aw_license_change : Integer; cdecl; external 'aw.dll';
function  aw_license_delete (const name: PChar): Integer; cdecl; external 'aw.dll';
function  aw_license_next : Integer; cdecl; external 'aw.dll';
function  aw_license_previous : Integer;  cdecl; external 'aw.dll';
function  aw_world_list : Integer; cdecl; external 'aw.dll';
function  aw_object_add : Integer; cdecl; external 'aw.dll';
function  aw_object_change : Integer; cdecl; external 'aw.dll';
function  aw_object_delete : Integer; cdecl; external 'aw.dll';
function  aw_object_load : Integer; cdecl; external 'aw.dll';
function  aw_query (x_sector: Integer; z_sector: Integer; sequence: SectorSeqs): Integer; cdecl; external 'aw.dll';
function  aw_query_5x5 (x_sector, z_sector: integer; sequence: Sector5Seqs): Integer; cdecl; external 'aw.dll';
function  aw_random : Integer; cdecl; external 'aw.dll';
function  aw_world_attributes_change : Integer; cdecl; external 'aw.dll';
function  aw_universe_attributes_change : Integer; cdecl; external 'aw.dll';
function  aw_session : Integer; cdecl; external 'aw.dll';
function  aw_world_eject : Integer; cdecl; external 'aw.dll';
function  aw_sector_from_cell (cell: Integer): Integer; cdecl; external 'aw.dll';
function  aw_universe_ejection_add : Integer; cdecl; external 'aw.dll';
function  aw_universe_ejection_delete (address: Integer): Integer; cdecl; external 'aw.dll';
function  aw_universe_ejection_lookup : Integer; cdecl; external 'aw.dll';
function  aw_universe_ejection_next : Integer; cdecl; external 'aw.dll';
function  aw_universe_ejection_previous : Integer; cdecl; external 'aw.dll';
function  aw_object_click : Integer; cdecl; external 'aw.dll';
function  aw_object_select : Integer; cdecl; external 'aw.dll';
function  aw_avatar_click (session_id: Integer): Integer; cdecl; external 'aw.dll';
function  aw_address (session_id: Integer): Integer; cdecl; external 'aw.dll';
function  aw_url_send (session_id: Integer; const url, target: PChar): Integer; cdecl; external 'aw.dll';

function  aw_url_click(const url: PChar): Integer; cdecl; external 'aw.dll'; // new 37

function  aw_teleport(session_id: Integer): Integer; cdecl; external 'aw.dll';
function  aw_world_ejection_add: integer; cdecl; external 'aw.dll';
function  aw_world_ejection_delete: integer; cdecl; external 'aw.dll';
function  aw_world_ejection_lookup: integer; cdecl; external 'aw.dll';
function  aw_world_ejection_next: integer; cdecl; external 'aw.dll';
function  aw_world_ejection_previous: integer; cdecl; external 'aw.dll';
function aw_world_attribute_set (attribute: integer; value: PChar): integer; cdecl; external 'aw.dll';
function aw_world_attribute_get (attribute: integer; read_only: PInteger; value: PChar): integer; cdecl; external 'aw.dll';
function aw_delete_all_objects: integer; cdecl; external 'aw.dll';
function aw_cell_next: integer; cdecl; external 'aw.dll';
function aw_world_reload_registry: integer; cdecl; external 'aw.dll';
function aw_world_attributes_reset: integer; cdecl; external 'aw.dll';
function aw_terrain_set (x,z,count,texture: integer; heights: PShort): integer; cdecl; external 'aw.dll';
function aw_terrain_query (page_x, page_z: integer; sequence: ULong): integer; cdecl; external 'aw.dll';
function aw_terrain_next: integer; cdecl; external 'aw.dll';
function aw_terrain_delete_all: integer; cdecl; external 'aw.dll';
function aw_terrain_load_node: integer; cdecl; external 'aw.dll';
function aw_console_message_ (session_id: integer): integer; cdecl; external 'aw.dll' name 'aw_console_message';
function aw_user_data_set (data: Pointer): integer; cdecl; external 'aw.dll';
function aw_user_data: Pointer; cdecl; external 'aw.dll';
function aw_avatar_set (session_id: integer): integer;  cdecl; external 'aw.dll';

// new 37
function aw_botgram_send: Integer;
function aw_toolbar_click: Integer;
function aw_user_list: Integer;

// world server admin methods:

function aw_server_admin (const domain: PChar; port: integer; password: PChar; instance: PAWhInst): integer; cdecl; external 'aw.dll';
function aw_server_world_add: integer; cdecl; external 'aw.dll';
function aw_server_world_delete (id: integer): integer; cdecl; external 'aw.dll';
function aw_server_world_change (id: integer): integer; cdecl; external 'aw.dll';
function aw_server_world_list: integer; cdecl; external 'aw.dll';
function aw_server_world_start (id: integer): integer; cdecl; external 'aw.dll';
function aw_server_world_stop (id: integer): integer; cdecl; external 'aw.dll';
function aw_server_world_set (id: integer): integer; cdecl; external 'aw.dll';


implementation

end.

