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

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
Feather
Posts: 24
Joined: 14 Nov 2022, 02:14

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

Post by Feather » 29 May 2023, 12:52

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;

Return to “AutoHotkey_H”