stamen

Stamen - static menu generator
git clone git://git.dimitrijedobrota.com/stamen.git
Log | Files | Refs | README | LICENSE

stamen.h (717B)


      1 #pragma once
      2 
      3 #include "stddef.h"  // NOLINT
      4 
      5 #ifdef __cplusplus
      6 extern "C"
      7 {
      8 namespace stamen {
      9 #endif
     10 
     11 typedef int (*stamen_callback_f)(size_t);  // NOLINT
     12 
     13 typedef struct stamen_item_t stamen_item_t;  // NOLINT
     14 struct stamen_item_t
     15 {
     16   stamen_callback_f callback;
     17   const char* prompt;
     18 };
     19 
     20 typedef int (*stamen_display_f)(const char*,  // NOLINT
     21                                 const stamen_item_t[],
     22                                 size_t);
     23 
     24 #if !defined __cplusplus || defined WITH_C_BINDINGS
     25 
     26 int stamen_builtin_display(const char* title,
     27                            const stamen_item_t itemv[],
     28                            size_t size);
     29 
     30 #endif
     31 
     32 #ifdef __cplusplus
     33 }  // namespace stamen
     34 }  // extern "C"
     35 #endif