aboutsummaryrefslogtreecommitdiff
path: root/layer_box.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-09-26 21:09:43 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-09-26 21:09:43 +0200
commit7110cea433b6aa4ce973b5c89c9ff9721e64ef55 (patch)
tree9ad43d1c7430ec938dd5f9cfb1279bb43c7083b6 /layer_box.h
parent6179c8f8f1a32c430a496176a03c8a04f50fc160 (diff)
downloadosc-graphics-7110cea433b6aa4ce973b5c89c9ff9721e64ef55.tar.gz
moved layer registration from OSCServer into main.cpp using new OSCServer::register_layer() method
also use a static CtorInfo structure in every layer class instead of macros
Diffstat (limited to 'layer_box.h')
-rw-r--r--layer_box.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/layer_box.h b/layer_box.h
index 413ee07..1e4e5e3 100644
--- a/layer_box.h
+++ b/layer_box.h
@@ -7,18 +7,17 @@
#include "osc_server.h"
#include "layer.h"
-#define LayerBox_Info_Name "box"
-#define LayerBox_Info_Types "iii" /* r, g, b */
+#define COLOR_TYPES "iii" /* r, g, b */
class LayerBox : public Layer {
Sint16 x1, y1, x2, y2;
Uint8 r, g, b, a;
public:
- static void register_layer() {}
-
LayerBox(const char *name, SDL_Rect geo, float opacity,
SDL_Color color);
+
+ static CtorInfo ctor_info;
static Layer *
ctor_osc(const char *name, SDL_Rect geo, float opacity, lo_arg **argv)
{
@@ -27,6 +26,7 @@ public:
};
return new LayerBox(name, geo, opacity, color);
}
+
~LayerBox();
void frame(SDL_Surface *target);