widget: import widget_node definition
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
8533c1d35d
commit
b9df512f3a
|
@ -39,14 +39,12 @@ typedef struct wibox_t wibox_t;
|
||||||
typedef struct a_screen screen_t;
|
typedef struct a_screen screen_t;
|
||||||
typedef struct button_t button_t;
|
typedef struct button_t button_t;
|
||||||
typedef struct widget_t widget_t;
|
typedef struct widget_t widget_t;
|
||||||
typedef struct widget_node_t widget_node_t;
|
|
||||||
typedef struct client_t client_t;
|
typedef struct client_t client_t;
|
||||||
typedef struct client_node client_node_t;
|
typedef struct client_node client_node_t;
|
||||||
typedef struct tag tag_t;
|
typedef struct tag tag_t;
|
||||||
typedef struct tag_client_node_t tag_client_node_t;
|
typedef struct tag_client_node_t tag_client_node_t;
|
||||||
typedef struct awesome_t awesome_t;
|
typedef struct awesome_t awesome_t;
|
||||||
|
|
||||||
ARRAY_TYPE(widget_node_t, widget_node)
|
|
||||||
ARRAY_TYPE(button_t *, button)
|
ARRAY_TYPE(button_t *, button)
|
||||||
ARRAY_TYPE(tag_t *, tag)
|
ARRAY_TYPE(tag_t *, tag)
|
||||||
ARRAY_TYPE(screen_t, screen)
|
ARRAY_TYPE(screen_t, screen)
|
||||||
|
|
9
widget.h
9
widget.h
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
typedef widget_t *(widget_constructor_t)(widget_t *);
|
typedef widget_t *(widget_constructor_t)(widget_t *);
|
||||||
typedef void (widget_destructor_t)(widget_t *);
|
typedef void (widget_destructor_t)(widget_t *);
|
||||||
|
typedef struct widget_node widget_node_t;
|
||||||
|
|
||||||
/** Widget */
|
/** Widget */
|
||||||
struct widget_t
|
struct widget_t
|
||||||
|
@ -52,13 +53,16 @@ struct widget_t
|
||||||
bool isvisible;
|
bool isvisible;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct widget_node_t
|
void widget_node_delete(widget_node_t *);
|
||||||
|
|
||||||
|
struct widget_node
|
||||||
{
|
{
|
||||||
/** The widget object */
|
/** The widget object */
|
||||||
widget_t *widget;
|
widget_t *widget;
|
||||||
/** The geometry where the widget was drawn */
|
/** The geometry where the widget was drawn */
|
||||||
area_t geometry;
|
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 *);
|
widget_t *widget_getbycoords(orientation_t, widget_node_array_t *, int, int, int16_t *, int16_t *);
|
||||||
void widget_render(wibox_t *);
|
void widget_render(wibox_t *);
|
||||||
|
@ -75,9 +79,6 @@ widget_constructor_t widget_graph;
|
||||||
widget_constructor_t widget_systray;
|
widget_constructor_t widget_systray;
|
||||||
widget_constructor_t widget_imagebox;
|
widget_constructor_t widget_imagebox;
|
||||||
|
|
||||||
void widget_node_delete(widget_node_t *);
|
|
||||||
ARRAY_FUNCS(widget_node_t, widget_node, widget_node_delete)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue