#include <stdlib.h>
#include <stdio.h>
#include "zenity_wrap.c"

int main(int argc, char *argv[]) {

  string message = "Damn! you completely forgot!" ;
  
  zenity_info(message);
  zenity_warning(message);
  zenity_error(message);

  bool b = zenity_question("It's ok?");
  printf("b=%d\n", b);

  string name = zenity_entry("Your name?");
  printf("name=\"%s\"\n", name);

  // int zenity_scale (string text, int value, int min_value, int max_value, int step, int on_cancel);
  int age = zenity_scale("Your age?", 16, 0, 130, 1, 42);
  printf("x=%d\n", age);

  string date = zenity_calendar("When?");
  printf("date='%s'\n", date);

  // string zenity_radiolist (string text, string header1, string header2, int arg_no, ...);
  string choice  = zenity_radiolist("Fruit", "Click here", "Description", 3, "orange", "lemon", "banana");
  printf("choice=\"%s\"\n", choice);

  // string zenity_checklist (string text, string header1, string header2, bool checkall, string separator, int arg_no, ...);
  string choices = zenity_checklist("Fruit", "Click here", "Description", true, ":", 3, "orange", "lemon", "banana");
  printf("choices=\"%s\"\n", choices);
  
  // string zenity_file_selection (bool save, bool confirm_overwrite, string file_filter);
  string filename = zenity_file_selection(true, true, "*.c");
  printf("filename=\"%s\"\n", filename);

  // string zenity_file_selection_multiple (string separator, string file_filter);
  string filenames = zenity_file_selection_multiple(":", "*.c");
  printf("filenames=\"%s\"\n", filenames);

  // string zenity_directory_selection (string file_filter);
  string dir = zenity_directory_selection("*A*");  // Filter files containing the letter 'A'
  printf("dir=\"%s\"\n", dir);
  
  // string zenity_directory_selection_multiple (string separator, string file_filter);
  fresh_string dirs = zenity_directory_selection_multiple(" ","*A*");
  printf("dirs=\"%s\"\n", dirs);

  //---  
  return(exit_code_of_bool(b));
}

