libcm is a C development framework with an emphasis on audio signal processing applications.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

cmUiDrvr.h 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. #ifndef cmUiDrvr_h
  2. #define cmUiDrvr_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef unsigned cmUiRC_t;
  7. enum
  8. {
  9. kOkUiRC = cmOkRC,
  10. kAppNotFoundUiRC,
  11. kCtlNotFoundUiRC,
  12. kPanelNotFoundUiRC,
  13. kPanelFullUiRC,
  14. kDrvrErrUiRC,
  15. kInvalidCtlOpUiRC,
  16. kInvalidColRowUiRC,
  17. kInvalidIdUiRC,
  18. };
  19. typedef enum
  20. {
  21. kInvalidUiCId,
  22. kPanelUiCId,
  23. kBtnUiCId,
  24. kCheckUiCId,
  25. kMenuBtnUiCId,
  26. kListUiCId,
  27. kLabelUiCId,
  28. kTextUiCId,
  29. kNumberUiCId,
  30. kSliderUiCId,
  31. kProgressUiCId,
  32. kMeterUiCId,
  33. kFilenameUiCId,
  34. kDirUiCId,
  35. } cmUiCId_t;
  36. typedef enum
  37. {
  38. kInvalidDId,
  39. kCreateCtlDId,
  40. kDestroyCtlDId,
  41. kSetValDId,
  42. kDestroyAllDId
  43. } cmUiDId_t;
  44. enum
  45. {
  46. // All controls recognize kValUiFl and kLblUiFl
  47. kValUiFl = 0x000001,
  48. kLblUiFl = 0x000002,
  49. // Flags for Number,Progress,Meter
  50. kMinUiFl = 0x00004,
  51. kMaxUiFl = 0x00010,
  52. kIncUiFl = 0x00020,
  53. kNumMask = kValUiFl | kMinUiFl | kMaxUiFl | kIncUiFl,
  54. kHorzUiFl = 0x00040,
  55. kVertUiFl = 0x00080,
  56. // Flags for Filename and Dir
  57. kFnPatUiFl = 0x00100, // file pattern string
  58. kFnDirUiFl = 0x00200, // toggle file btn type
  59. kFnMask = kFnPatUiFl | kFnDirUiFl,
  60. // Append list or menu element.
  61. kAppendUiFl = 0x00400,
  62. kLeftUiFl = 0x01000,
  63. kTopUiFl = 0x02000,
  64. kRightUiFl = 0x04000,
  65. kBottomUiFl = 0x08000,
  66. kHCtrUiFl = 0x10000,
  67. kVCtrUiFl = 0x20000,
  68. kInsideUiFl = 0x40000,
  69. };
  70. // A control can be uniquely idenfied by
  71. // appId and usrId (appId's are unique among app's)
  72. // (usrId's are unique among ctl's on an app)
  73. // appId's and usrId's should be zero based low numbers
  74. // because they are used internally as indexes.
  75. typedef struct
  76. {
  77. void* cbArg; //
  78. cmUiDId_t dId; // function selector id
  79. unsigned appId; // app id (plug-in instance id)
  80. unsigned usrId; // ctl id
  81. unsigned panelId; // parent panel id
  82. cmUiCId_t cId; // UI control type
  83. unsigned flags; // See kXXXUiFl above.
  84. int x;
  85. int y;
  86. int w;
  87. int h;
  88. int ival;
  89. double fval;
  90. const char* sval;
  91. } cmUiDriverArg_t;
  92. typedef cmUiRC_t (*cmUiDriverFunc_t)( const cmUiDriverArg_t* a );
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96. #endif