// typedef_test.c - small example to show the use of typedef

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

typedef int coord;

struct _Point_
{
  coord x;
  coord y;
};

typedef struct _Point_ Point;

Point *newPoint(coord x,coord y);
void deletePoint(Point *point);
coord getXFromPoint(Point *point);
coord getYFromPoint(Point *point);
void setXInPoint(Point *point,coord x);
void setYInPoint(Point *point,coord y);

typedef struct _Rect_
{
  Point *bottom_left;
  coord width;
  coord height;
} Rectangle;

Rectangle *newRectangle(Point *bottom_left,
                        coord width,coord height);
void deleteRectangle(Rectangle *rect);
Point *getBottomLeftFromRectangle(Rectangle *rect);
coord getWidthFromRectangle(Rectangle *rect);
coord getHeightFromRectangle(Rectangle *rect);
void setBottomLeftInRectangle(Rectangle *rect,
                              Point *bottom_left);
void setWidthInRectangle(Rectangle *rect,coord width);
void setHeightInRectangle(Rectangle *rect,coord height);

int main()
{
  Point *my_point = NULL;
  Rectangle *my_rect = NULL;
      // here we do whatever we want with
      // the variables. I leave this up to you to
      // play around a little.
  return(0);
}
