#ifdef _WINDOWS
#ifndef WINDOWS
#define WINDOWS
#endif
#endif

#include "ac_plugin.h"

//////////////////////////////////////////////////////////////
// This is our plugin's main function.
static void first_plugin()
{
   // This command throws up a message box to the user.
   // Note that I added "first_plugin : " to the beginning of the
   // text.  This lets the user know what operation was responsible
   // for sending them the message.
   message_dialog( "first_plugin : Hello world!" );
   // This displays a message on the AC3D status bar.
   display_message( "first_plugin : I just sent you a message" );
}
//////////////////////////////////////////////////////////////
// The plugin init function
AC3D_PLUGIN_FUNC int AC3DPluginInit( AC3DPluginInitData *d )
{
   static bool firstTime = true;
   if( firstTime )
   {
      // Add our command to AC3D.
      ac_add_command( "my_first_plugin", first_plugin );
      // Add a new menu item for our plugin under the "Tools" menu.
      // This will show up as "First plugin" under the Tools menu,
      // and will call the function we defined above.
      ac_add_tools_menu_item( "First plugin",
                              "ac3d my_first_plugin",
                              "My first plugin" );
      firstTime = false;
   }
   return 0;
}
//////////////////////////////////////////////////////////////
AC3D_PLUGIN_FUNC int AC3DPluginExit()
{
   return 0;
}
//////////////////////////////////////////////////////////////
AC3D_PLUGIN_FUNC char *AC3DPluginAbout()
{
   return( "First plugin - version 1.0 - Me" );
}
//////////////////////////////////////////////////////////////
AC3D_PLUGIN_FUNC char *AC3DPluginInfo()
{
   return( "This is my first plugin." );
}