cmake_demo/library/circle.h

29 lines
418 B
C

#ifndef _CIRCLE_H_
#define _CIRCLE_H_
#include "common.h"
#include "shape.h"
struct _circle
{
int invalid;
// super
struct _shape *shape;
// attribute
double radius;
// method
// void (*area)(void *self);
// void (*draw)(void *self);
};
struct _circle *circle_new(double radius);
double circle_area(void *self, void *parent);
void circle_draw(void *self, void *parent);
#endif