That's a bad paste. What ended up working, is this
typedef struct MenuStateStruct {
/*
* Pointer to function that will handle button presses for the state
*/
void (*ActionHandler)(struct MenuStateStruct *pState, Direction_t dir);
/*
* Pointer to function that will take underlying system variable
* and convert it to what should be displayed on lower line of lcd
*/
void (*DisplayVariable)(struct MenuStateStruct *pState);
} MenuState_t;
So i just declare *pState argument not as pointer to variable of type MenuState_t, but rather to structure of type MenuStateStruct. I think it actually means the same, right?
Before, I generally assumed, that when I use a pointer to a type, that type does not have to be declared completly, since pointer to it will always be an uint 32 anyway (or whatever the addressing length would be on the particular machine).