From b9df512f3ae02e942dc44bf56dac18eff9a8f354 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 7 Sep 2009 17:20:19 +0200 Subject: [PATCH] widget: import widget_node definition Signed-off-by: Julien Danjou --- structs.h | 2 -- widget.h | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/structs.h b/structs.h index a866562a..0675b056 100644 --- a/structs.h +++ b/structs.h @@ -39,14 +39,12 @@ typedef struct wibox_t wibox_t; typedef struct a_screen screen_t; typedef struct button_t button_t; typedef struct widget_t widget_t; -typedef struct widget_node_t widget_node_t; typedef struct client_t client_t; typedef struct client_node client_node_t; typedef struct tag tag_t; typedef struct tag_client_node_t tag_client_node_t; typedef struct awesome_t awesome_t; -ARRAY_TYPE(widget_node_t, widget_node) ARRAY_TYPE(button_t *, button) ARRAY_TYPE(tag_t *, tag) ARRAY_TYPE(screen_t, screen) diff --git a/widget.h b/widget.h index 7700386e..dcdec1eb 100644 --- a/widget.h +++ b/widget.h @@ -27,6 +27,7 @@ typedef widget_t *(widget_constructor_t)(widget_t *); typedef void (widget_destructor_t)(widget_t *); +typedef struct widget_node widget_node_t; /** Widget */ struct widget_t @@ -52,13 +53,16 @@ struct widget_t bool isvisible; }; -struct widget_node_t +void widget_node_delete(widget_node_t *); + +struct widget_node { /** The widget object */ widget_t *widget; /** The geometry where the widget was drawn */ area_t geometry; }; +DO_ARRAY(widget_node_t, widget_node, widget_node_delete) widget_t *widget_getbycoords(orientation_t, widget_node_array_t *, int, int, int16_t *, int16_t *); void widget_render(wibox_t *); @@ -75,9 +79,6 @@ widget_constructor_t widget_graph; widget_constructor_t widget_systray; widget_constructor_t widget_imagebox; -void widget_node_delete(widget_node_t *); -ARRAY_FUNCS(widget_node_t, widget_node, widget_node_delete) - #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80