/*
  main.h - Common declarations and definitions

  created  17/2/24
*/

#ifndef main_h
#define main_h

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#ifndef FALSE
#define FALSE 0
#define TRUE !FALSE
#endif

#ifndef NULL
#define NULL 0
#endif

#define APP_NAME      "Lyrics"
#define APP_SPRITE    "lyrics"
#define APP_DIR       "<"APP_NAME"$Dir>"
#define RESOURCES_DIR "<"APP_NAME"Res$Dir>"


// windows
enum { WIN_INFO,
       WIN_LYRICS,
       WIN_SAVE,
       NUM_WINDOWS};

// menus
enum { MENU_ICONBAR,
       MENU_LYRICS,
       NUM_MENUS};

// Text display icons
#define ICON_OUT      0 // times number of rows

// Save dialog icons
#define ICON_SAVE_SPRITE 0
#define ICON_SAVE_NAME   1
#define ICON_SAVE_OK     2

// ro.flags bits
#define QUIT          0
#define MESSAGES_OPEN 1
#define TEMPLATES_OK  2
#define STOP          3
#define CENTRALISE    4

// global variables
typedef struct ro_glbs_s
{
  int task_handle;
  int handle[NUM_WINDOWS];
  int cur_menu;
  int flags;

  struct vdu_s
  {
    int width;
    int height;
  } vdu;

} ro_glbs_t;

extern ro_glbs_t ro;

#endif
