call function pointer from progmem

What is the correct syntax for calling a function from a pointer in progmem? What combination of cast and pgm_read_word or whatever do I need to call a function from this struct.

typedef boolean (*Item_Function)();
typedef struct MenuItem_t {
    char text[16];
    Item_Function func;
} MenuItem;

MenuItem PROGMEM firstList[4] = { { "Item_one", fun1 }, { "Item_two", fun2 }, { "Item_three",
        fun3 }, { "Item_four", fun4 } };

MenuItem* itemPtr = firstList;

void setup(){
    
     // Here I want to use the itemPtr to call the function from the 
     //      struct instance it is currently pointing to.
     // In this case it should call fun1()

}

You had a few things wrong, but here is how you do it.

boolean fun1() {
  Serial.println(F("Function 1"));
}
boolean fun2() {
  Serial.println(F("Function 2"));
}
boolean fun3() {
  Serial.println(F("Function 3"));
}
boolean fun4() {
  Serial.println(F("Function 4"));
}

typedef boolean (*Item_Function)();

const typedef struct MenuItem_t {
  char *text;
  Item_Function func;
} MenuItem;

MenuItem firstList[4] PROGMEM = {
  { "Item_one", &fun1 }, // need to have reference to the function
  { "Item_two", &fun2 },
  { "Item_three", &fun3},
  { "Item_four", &fun4 }
};

MenuItem* itemPtr = firstList;

void setup() {

  // Here I want to use the itemPtr to call the function from the
  //      struct instance it is currently pointing to.
  // In this case it should call fun1()

  boolean (*function)(void); // function buffer

  Serial.begin(115200);
  for (byte i = 0; i < 4; i++)
  {
    Serial.println((char*)pgm_read_word(&(firstList[i].text)));
    function = (Item_Function)pgm_read_word(&(firstList[i].func)); // this needs to be assigned to another function pointer in order to use it.

    function(); // run the function.
    Serial.println();
  }

}
void loop() {}

This solution should be added to the PROGMEM page.

Does the const really go on the struct def and not on the def of firstList (where I still seem to have left it off)? That's about the spot where I start getting confused with C++. Not doubting, trying to learn the whys.

 function = (Item_Function)pgm_read_word(&(firstList[i].func)); // this needs to be assigned to another function pointer in order to use it.

Yup, thanks. That's the line I was looking for. I didn't think about assigning to another pointer. I was trying to figure out where in there to put ().

Does the const really go on the struct def and not on the def of firstList (where I still seem to have left it off).

That's the only place it seems to work.

OK. I'm compiling in 1.0.6 so it wasn't complaining about me not having it.

Ah, i'm using 1.6.0. Things like this should be documented better on the reference page.

It's one of the big differences post 1.0 that everything in progmem has to be declared const. It makes sense.