From 84ad096896e9948c722a957d07ed6868e252a9f7 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 29 Aug 2024 17:00:11 +0200 Subject: Initial commit --- includes/rect.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 includes/rect.h (limited to 'includes/rect.h') diff --git a/includes/rect.h b/includes/rect.h new file mode 100644 index 0000000..fca9602 --- /dev/null +++ b/includes/rect.h @@ -0,0 +1,32 @@ +#ifndef RECT_H +#define RECT_H + +#include "oo.h" + +#define TYPE Rect + +DEFINE_OBJECT(TYPE); + +CONSTRUCTOR(TYPE); + +void METHOD_ARG(TYPE, init, int l, int t, int w, int h); +int METHOD_ARG(TYPE, toString, char* buffer); + +GETTER(TYPE, int, left); +SETTER(TYPE, int, left); + +GETTER(TYPE, int, top); +SETTER(TYPE, int, top); + +GETTER(TYPE, int, width); +SETTER(TYPE, int, width); + +GETTER(TYPE, int, height); +SETTER(TYPE, int, height); + +GETTER(TYPE, int, right); +GETTER(TYPE, int, bottom); + +#undef TYPE + +#endif -- cgit v1.2.3