Page 1 of 1

How does struct() create an enum in a structure?

Posted: 29 May 2023, 12:52
by Feather
I extracted the definition method of the structure from the .h file, but I didn't find the method to initialize the enum from the AutoHotkey_H help file.
How do I create this enum structure?

Code: Select all

typedef struct {
  uint32 num_channels;
  DataType data_type;
  int align;
} PixelFormat;

 typedef enum {
  TYPE_FLOAT = 0,
  TYPE_UINT8 = 2,
  PIXEL_FORMAT = 3,
} DataType;