diff --git a/Panel.c b/Panel.c index 9d4dc1086..8c756eb53 100644 --- a/Panel.c +++ b/Panel.c @@ -18,10 +18,12 @@ in the source distribution for its full text. #include #include "CRT.h" +#include "FunctionBar.h" #include "ListItem.h" #include "Macros.h" #include "ProvideCurses.h" #include "RichString.h" +#include "Vector.h" #include "XUtils.h" @@ -33,7 +35,7 @@ const PanelClass Panel_class = { .eventHandler = Panel_selectByTyping, }; -Panel* Panel_new(int x, int y, int w, int h, const ObjectClass* type, bool owner, FunctionBar* fuBar) { +Panel* Panel_new(int x, int y, int w, int h, const ObjectClass* type, bool owner, struct FunctionBar_* fuBar) { Panel* this = xMalloc(sizeof(Panel)); Object_setClass(this, Class(Panel)); Panel_init(this, x, y, w, h, type, owner, fuBar); @@ -46,7 +48,7 @@ void Panel_delete(Object* cast) { free(this); } -void Panel_init(Panel* this, int x, int y, int w, int h, const ObjectClass* type, bool owner, FunctionBar* fuBar) { +void Panel_init(Panel* this, int x, int y, int w, int h, const ObjectClass* type, bool owner, struct FunctionBar_* fuBar) { this->x = x; this->y = y; this->w = w; @@ -219,9 +221,9 @@ void Panel_setSelected(Panel* this, int selected) { } } -void Panel_splice(Panel* this, Vector* from) { - assert(this != NULL); - assert(from != NULL); +void Panel_splice(Panel* this, struct Vector_* from) { + assert (this != NULL); + assert (from != NULL); Vector_splice(this->items, from); this->prevSelected = -1; diff --git a/Panel.h b/Panel.h index 416392221..d9f045877 100644 --- a/Panel.h +++ b/Panel.h @@ -11,13 +11,12 @@ in the source distribution for its full text. #include #include "CRT.h" -#include "FunctionBar.h" #include "Object.h" #include "RichString.h" -#include "Vector.h" +struct FunctionBar_; +struct Vector_; -struct Panel_; typedef struct Panel_ Panel; typedef enum HandlerResult_ { @@ -65,7 +64,7 @@ struct Panel_ { Object super; int x, y, w, h; int cursorX, cursorY; - Vector* items; + struct Vector_* items; int selected; int oldSelected; int prevSelected; @@ -77,8 +76,8 @@ struct Panel_ { bool cursorOn; bool wasFocus; int lastMouseBarClickX; /* X position of last mouse click on function bar (LINES-1) */ - FunctionBar* currentBar; - FunctionBar* defaultBar; + struct FunctionBar_* currentBar; + struct FunctionBar_* defaultBar; RichString header; ColorElements selectionColorId; }; @@ -93,11 +92,11 @@ struct Panel_ { extern const PanelClass Panel_class; -Panel* Panel_new(int x, int y, int w, int h, const ObjectClass* type, bool owner, FunctionBar* fuBar); +Panel* Panel_new(int x, int y, int w, int h, const ObjectClass* type, bool owner, struct FunctionBar_* fuBar); void Panel_delete(Object* cast); -void Panel_init(Panel* this, int x, int y, int w, int h, const ObjectClass* type, bool owner, FunctionBar* fuBar); +void Panel_init(Panel* this, int x, int y, int w, int h, const ObjectClass* type, bool owner, struct FunctionBar_* fuBar); void Panel_done(Panel* this); @@ -137,7 +136,7 @@ void Panel_setSelected(Panel* this, int selected); void Panel_draw(Panel* this, bool force_redraw, bool focus, bool highlightSelected, bool hideFunctionBar); -void Panel_splice(Panel* this, Vector* from); +void Panel_splice(Panel* this, struct Vector_* from); bool Panel_onKey(Panel* this, int key);