diff --git a/src/core/toggles/table.c b/src/core/toggles/table.c index 64d72ab..004ebdc 100644 --- a/src/core/toggles/table.c +++ b/src/core/toggles/table.c @@ -40,7 +40,7 @@ /*---[ Implement ]------------------------------------------------------------------------------------------------------------*/ -const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = +const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = { { .id = LIB3270_TOGGLE_MONOCASE, @@ -328,7 +328,12 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = }; -LIB3270_EXPORT const LIB3270_TOGGLE_ENTRY * lib3270_get_toggle_list() +LIB3270_EXPORT const LIB3270_TOGGLE * lib3270_get_toggles() +{ + return toggle_descriptor; +} + +LIB3270_EXPORT const LIB3270_TOGGLE * lib3270_get_toggle_list() { return toggle_descriptor; } diff --git a/src/include/lib3270/toggle.h b/src/include/lib3270/toggle.h index ef690dc..1042eca 100644 --- a/src/include/lib3270/toggle.h +++ b/src/include/lib3270/toggle.h @@ -91,7 +91,7 @@ } LIB3270_TOGGLE_TYPE; - typedef struct _lib3270_toggle_entry + typedef struct _lib3270_toggle { LIB3270_PROPERTY_HEAD @@ -99,15 +99,19 @@ const char def; ///< @brief Default value. const char * key; ///< @brief Default key (or NULL if no default). const char * icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) - const char * label; ///< @brief Button label (or NULL). + const char * label; ///< @brief Label for button or menu (NULL if isn't available). - } LIB3270_TOGGLE_ENTRY; + } LIB3270_TOGGLE; /** - * @brief Get the toggle description table. + * @brief Get the toggle descriptors. + * + * @return Pointer to all available toggles. * */ - LIB3270_EXPORT const LIB3270_TOGGLE_ENTRY * lib3270_get_toggle_list(); + LIB3270_EXPORT const LIB3270_TOGGLE * lib3270_get_toggles(); + + LIB3270_EXPORT const LIB3270_TOGGLE * LIB3270_DEPRECATED(lib3270_get_toggle_list()); /** * @brief get toggle state. diff --git a/src/include/togglesc.h b/src/include/togglesc.h index c881f8f..1347b4d 100644 --- a/src/include/togglesc.h +++ b/src/include/togglesc.h @@ -36,5 +36,5 @@ LIB3270_INTERNAL void initialize_toggles(H3270 *session); LIB3270_INTERNAL void shutdown_toggles(H3270 *session); - LIB3270_INTERNAL const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1]; + LIB3270_INTERNAL const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1]; -- libgit2 0.21.2