wibox: move struct definition into wibox.h
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
416f88f84f
commit
93c782f524
1
screen.h
1
screen.h
|
@ -23,6 +23,7 @@
|
|||
#define AWESOME_SCREEN_H
|
||||
|
||||
#include "structs.h"
|
||||
#include "wibox.h"
|
||||
|
||||
struct a_screen
|
||||
{
|
||||
|
|
47
structs.h
47
structs.h
|
@ -59,13 +59,7 @@ typedef enum
|
|||
WINDOW_TYPE_DND
|
||||
} window_type_t;
|
||||
|
||||
/** Wibox types */
|
||||
typedef enum
|
||||
{
|
||||
WIBOX_TYPE_NORMAL = 0,
|
||||
WIBOX_TYPE_TITLEBAR
|
||||
} wibox_type_t;
|
||||
|
||||
typedef struct wibox_t wibox_t;
|
||||
typedef struct a_screen screen_t;
|
||||
typedef struct button_t button_t;
|
||||
typedef struct widget_t widget_t;
|
||||
|
@ -81,45 +75,6 @@ ARRAY_TYPE(button_t *, button)
|
|||
ARRAY_TYPE(tag_t *, tag)
|
||||
ARRAY_TYPE(screen_t, screen)
|
||||
|
||||
/** Wibox type */
|
||||
typedef struct
|
||||
{
|
||||
/** Lua references */
|
||||
luaA_ref_array_t refs;
|
||||
/** Ontop */
|
||||
bool ontop;
|
||||
/** Visible */
|
||||
bool isvisible;
|
||||
/** Position */
|
||||
position_t position;
|
||||
/** Wibox type */
|
||||
wibox_type_t type;
|
||||
/** Window */
|
||||
simple_window_t sw;
|
||||
/** Alignment */
|
||||
alignment_t align;
|
||||
/** Screen */
|
||||
screen_t *screen;
|
||||
/** Widget list */
|
||||
widget_node_array_t widgets;
|
||||
luaA_ref widgets_table;
|
||||
/** Widget the mouse is over */
|
||||
widget_t *mouse_over;
|
||||
/** Mouse over event handler */
|
||||
luaA_ref mouse_enter, mouse_leave;
|
||||
/** Need update */
|
||||
bool need_update;
|
||||
/** Cursor */
|
||||
char *cursor;
|
||||
/** Background image */
|
||||
image_t *bg_image;
|
||||
/* Banned? used for titlebars */
|
||||
bool isbanned;
|
||||
/** Button bindings */
|
||||
button_array_t buttons;
|
||||
} wibox_t;
|
||||
ARRAY_TYPE(wibox_t *, wibox)
|
||||
|
||||
/* Strut */
|
||||
typedef struct
|
||||
{
|
||||
|
|
52
wibox.h
52
wibox.h
|
@ -25,6 +25,55 @@
|
|||
#include "widget.h"
|
||||
#include "swindow.h"
|
||||
|
||||
/** Wibox types */
|
||||
typedef enum
|
||||
{
|
||||
WIBOX_TYPE_NORMAL = 0,
|
||||
WIBOX_TYPE_TITLEBAR
|
||||
} wibox_type_t;
|
||||
|
||||
/** Wibox type */
|
||||
struct wibox_t
|
||||
{
|
||||
/** Lua references */
|
||||
luaA_ref_array_t refs;
|
||||
/** Ontop */
|
||||
bool ontop;
|
||||
/** Visible */
|
||||
bool isvisible;
|
||||
/** Position */
|
||||
position_t position;
|
||||
/** Wibox type */
|
||||
wibox_type_t type;
|
||||
/** Window */
|
||||
simple_window_t sw;
|
||||
/** Alignment */
|
||||
alignment_t align;
|
||||
/** Screen */
|
||||
screen_t *screen;
|
||||
/** Widget list */
|
||||
widget_node_array_t widgets;
|
||||
luaA_ref widgets_table;
|
||||
/** Widget the mouse is over */
|
||||
widget_t *mouse_over;
|
||||
/** Mouse over event handler */
|
||||
luaA_ref mouse_enter, mouse_leave;
|
||||
/** Need update */
|
||||
bool need_update;
|
||||
/** Cursor */
|
||||
char *cursor;
|
||||
/** Background image */
|
||||
image_t *bg_image;
|
||||
/* Banned? used for titlebars */
|
||||
bool isbanned;
|
||||
/** Button bindings */
|
||||
button_array_t buttons;
|
||||
};
|
||||
|
||||
void wibox_unref_simplified(wibox_t **);
|
||||
|
||||
DO_ARRAY(wibox_t *, wibox, wibox_unref_simplified)
|
||||
|
||||
void wibox_refresh(void);
|
||||
void wibox_update_positions(void);
|
||||
|
||||
|
@ -34,8 +83,6 @@ void wibox_position_update(wibox_t *);
|
|||
wibox_t * wibox_getbywin(xcb_window_t);
|
||||
void wibox_detach(wibox_t *);
|
||||
|
||||
void wibox_unref_simplified(wibox_t **);
|
||||
|
||||
static inline void
|
||||
wibox_moveresize(wibox_t *wibox, area_t geometry)
|
||||
{
|
||||
|
@ -55,7 +102,6 @@ wibox_moveresize(wibox_t *wibox, area_t geometry)
|
|||
}
|
||||
|
||||
LUA_OBJECT_FUNCS(wibox_t, wibox, "wibox")
|
||||
ARRAY_FUNCS(wibox_t *, wibox, wibox_unref_simplified)
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue