#include "allegro.h" 
#include "seal.h" 
#include "app.h" 
#include "dialogs.h" 
#include "button.h" 

#define MSG_B1 10001

void testapp_init() 
{ 
  t_rect r = rect_assign(100, 100, 300, 200); 
  p_appwin win = appwin_init(malloc(sizeof(t_appwin)), r, "Window's title", WF_MINIMIZE, ap_id, NULL); 
  p_button b1;

  OBJECT(desktop)->insert(OBJECT(desktop), OBJECT(win)); 

  r = rect_assign(5, 25, 85, 45);
  b1 = button_init(malloc(sizeof(t_button)), r, "Button 1", MSG_B1, BF_NORMAL);
  OBJECT(win)->insert(OBJECT(win), OBJECT(b1));
} 

app_begin(void) 
{ 
  if (ap_process == AP_INIT) { 
    testapp_init(); 
  }; 
} app_end;
