Commit d7c6dacedfe8d80956f965230b0cbc4d7fa94080
1 parent
bec84bcb
Exists in
master
and in
3 other branches
Changint toogle descriptor type name to a more standard one.
Showing
3 changed files
with
17 additions
and
8 deletions
Show diff stats
src/core/toggles/table.c
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | |
| 41 | 41 | /*---[ Implement ]------------------------------------------------------------------------------------------------------------*/ |
| 42 | 42 | |
| 43 | -const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | |
| 43 | +const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | |
| 44 | 44 | { |
| 45 | 45 | { |
| 46 | 46 | .id = LIB3270_TOGGLE_MONOCASE, |
| ... | ... | @@ -328,7 +328,12 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = |
| 328 | 328 | |
| 329 | 329 | }; |
| 330 | 330 | |
| 331 | -LIB3270_EXPORT const LIB3270_TOGGLE_ENTRY * lib3270_get_toggle_list() | |
| 331 | +LIB3270_EXPORT const LIB3270_TOGGLE * lib3270_get_toggles() | |
| 332 | +{ | |
| 333 | + return toggle_descriptor; | |
| 334 | +} | |
| 335 | + | |
| 336 | +LIB3270_EXPORT const LIB3270_TOGGLE * lib3270_get_toggle_list() | |
| 332 | 337 | { |
| 333 | 338 | return toggle_descriptor; |
| 334 | 339 | } | ... | ... |
src/include/lib3270/toggle.h
| ... | ... | @@ -91,7 +91,7 @@ |
| 91 | 91 | } LIB3270_TOGGLE_TYPE; |
| 92 | 92 | |
| 93 | 93 | |
| 94 | - typedef struct _lib3270_toggle_entry | |
| 94 | + typedef struct _lib3270_toggle | |
| 95 | 95 | { |
| 96 | 96 | LIB3270_PROPERTY_HEAD |
| 97 | 97 | |
| ... | ... | @@ -99,15 +99,19 @@ |
| 99 | 99 | const char def; ///< @brief Default value. |
| 100 | 100 | const char * key; ///< @brief Default key (or NULL if no default). |
| 101 | 101 | const char * icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html) |
| 102 | - const char * label; ///< @brief Button label (or NULL). | |
| 102 | + const char * label; ///< @brief Label for button or menu (NULL if isn't available). | |
| 103 | 103 | |
| 104 | - } LIB3270_TOGGLE_ENTRY; | |
| 104 | + } LIB3270_TOGGLE; | |
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | - * @brief Get the toggle description table. | |
| 107 | + * @brief Get the toggle descriptors. | |
| 108 | + * | |
| 109 | + * @return Pointer to all available toggles. | |
| 108 | 110 | * |
| 109 | 111 | */ |
| 110 | - LIB3270_EXPORT const LIB3270_TOGGLE_ENTRY * lib3270_get_toggle_list(); | |
| 112 | + LIB3270_EXPORT const LIB3270_TOGGLE * lib3270_get_toggles(); | |
| 113 | + | |
| 114 | + LIB3270_EXPORT const LIB3270_TOGGLE * LIB3270_DEPRECATED(lib3270_get_toggle_list()); | |
| 111 | 115 | |
| 112 | 116 | /** |
| 113 | 117 | * @brief get toggle state. | ... | ... |
src/include/togglesc.h
| ... | ... | @@ -36,5 +36,5 @@ |
| 36 | 36 | |
| 37 | 37 | LIB3270_INTERNAL void initialize_toggles(H3270 *session); |
| 38 | 38 | LIB3270_INTERNAL void shutdown_toggles(H3270 *session); |
| 39 | - LIB3270_INTERNAL const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1]; | |
| 39 | + LIB3270_INTERNAL const LIB3270_TOGGLE toggle_descriptor[LIB3270_TOGGLE_COUNT+1]; | |
| 40 | 40 | ... | ... |