43f9109a14046c02b6a6e3d0e260958670d61836 — octaspire 2 months ago 27e55dd v0.469.0
Nuklear plugin: implement function 'nuklear-slider-int'

* Implement function 'nuklear-slider-int' in the Nuklear plugin and
  update the Nuklear example.

* Add some '...or_unpushed_error_const_t' types for different
  types of values and functions for getting them.

* Store pointer to the found Dern value in the '...or_unpushed_error_t'
  and '...or_unpushed_error_const_t' structures. This pointer was added
  because it was used when implementing 'nuklear-slider-int'
  (and because it can be used in other places also, when there is
  a need to modify a Dern argument value from the C code).
M dev/include/octaspire/dern/octaspire_dern_config.h => dev/include/octaspire/dern/octaspire_dern_config.h +1 -1
@@ 18,7 18,7 @@ #define OCTASPIRE_DERN_CONFIG_H
  
  #define OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "0"
- #define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "468"
+ #define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "469"
  #define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "0"
  
  #define OCTASPIRE_DERN_CONFIG_VERSION_STR "Octaspire Dern version " \

M dev/include/octaspire/dern/octaspire_dern_value.h => dev/include/octaspire/dern/octaspire_dern_value.h +55 -4
@@ 606,33 606,70 @@ typedef struct octaspire_dern_c_data_or_unpushed_error_t
  {
      void                   * cData;
+     octaspire_dern_value_t * value;
      octaspire_dern_value_t * unpushedError;
  }
  octaspire_dern_c_data_or_unpushed_error_t;
  
+ typedef struct octaspire_dern_c_data_or_unpushed_error_const_t
+ {
+     void                   const * cData;
+     octaspire_dern_value_t const * value;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_c_data_or_unpushed_error_const_t;
+ 
  typedef struct octaspire_dern_number_or_unpushed_error_t
  {
      float                    number;
+     octaspire_dern_value_t * value;
      octaspire_dern_value_t * unpushedError;
  }
  octaspire_dern_number_or_unpushed_error_t;
  
+ typedef struct octaspire_dern_number_or_unpushed_error_const_t
+ {
+     float                          number;
+     octaspire_dern_value_t const * value;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_number_or_unpushed_error_const_t;
+ 
  typedef struct octaspire_dern_text_or_unpushed_error_t
  {
      octaspire_string_t     const * text;
+     octaspire_dern_value_t       * value;
      octaspire_dern_value_t       * unpushedError;
  }
  octaspire_dern_text_or_unpushed_error_t;
  
+ typedef struct octaspire_dern_text_or_unpushed_error_const_t
+ {
+     octaspire_string_t     const * text;
+     octaspire_dern_value_t const * value;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_text_or_unpushed_error_const_t;
+ 
  typedef struct octaspire_dern_one_of_texts_or_unpushed_error_t
  {
      octaspire_string_t     const * text;
+     octaspire_dern_value_t       * value;
      int                            index;
      octaspire_dern_value_t       * unpushedError;
  }
  octaspire_dern_one_of_texts_or_unpushed_error_t;
  
- octaspire_dern_c_data_or_unpushed_error_t
+ typedef struct octaspire_dern_one_of_texts_or_unpushed_error_const_t
+ {
+     octaspire_string_t     const * text;
+     octaspire_dern_value_t const * value;
+     int                            index;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_one_of_texts_or_unpushed_error_const_t;
+ 
+ octaspire_dern_c_data_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 640,19 677,33 @@ char const * const cDataName,
      char const * const pluginName);
  
- octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_c_data_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName,
+     char const * const cDataName,
+     char const * const pluginName);
+ 
+ octaspire_dern_number_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,
      char const * const dernFuncName);
  
- octaspire_dern_text_or_unpushed_error_t
+ octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName);
+ 
+ octaspire_dern_text_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,
      char const * const dernFuncName);
  
- octaspire_dern_one_of_texts_or_unpushed_error_t
+ octaspire_dern_one_of_texts_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_one_of_texts_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,

M dev/src/octaspire_dern_value.c => dev/src/octaspire_dern_value.c +59 -10
@@ 3388,7 3388,7 @@ possiblyNegativeIndex);
  }
  
- octaspire_dern_c_data_or_unpushed_error_t
+ octaspire_dern_c_data_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 3403,7 3403,7 @@ octaspire_helpers_verify_not_null(vm);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_c_data_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_c_data_or_unpushed_error_const_t result = {0, 0, 0};
  
      octaspire_dern_value_t const * const arg =
          octaspire_dern_value_as_vector_get_element_at_const(self, possiblyNegativeIndex);


@@ 3453,11 3453,37 @@ return result;
      }
  
+     result.value = arg;
      result.cData = octaspire_dern_c_data_get_payload(cData);
      return result;
  }
  
- octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_c_data_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName,
+     char const * const cDataName,
+     char const * const pluginName)
+ {
+ 
+     octaspire_dern_c_data_or_unpushed_error_t result = {0, 0, 0};
+     octaspire_dern_c_data_or_unpushed_error_const_t const constResult =
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+             self,
+             possiblyNegativeIndex,
+             dernFuncName,
+             cDataName,
+             pluginName);
+ 
+     result.cData         = (void                   *)constResult.cData;
+     result.value         = (octaspire_dern_value_t *)constResult.value;
+     result.unpushedError =                           constResult.unpushedError;
+ 
+     return result;
+ }
+ 
+ octaspire_dern_number_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 3470,7 3496,7 @@ octaspire_helpers_verify_not_null(vm);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_number_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_number_or_unpushed_error_const_t result = {0, 0, 0};
  
      octaspire_dern_value_t const * const arg =
          octaspire_dern_value_as_vector_get_element_at_const(self, possiblyNegativeIndex);


@@ 3493,11 3519,32 @@ return result;
      }
  
+     result.value  = arg;
      result.number = octaspire_dern_value_as_number_get_value(arg);
      return result;
  }
  
- octaspire_dern_text_or_unpushed_error_t
+ octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName)
+ {
+     octaspire_dern_number_or_unpushed_error_t result = {0, 0, 0};
+     octaspire_dern_number_or_unpushed_error_const_t const constResult =
+         octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
+             self,
+             possiblyNegativeIndex,
+             dernFuncName);
+ 
+     result.number        =                           constResult.number;
+     result.value         = (octaspire_dern_value_t *)constResult.value;
+     result.unpushedError =                           constResult.unpushedError;
+ 
+     return result;
+ }
+ 
+ octaspire_dern_text_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 3510,7 3557,7 @@ octaspire_helpers_verify_not_null(vm);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_text_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_text_or_unpushed_error_const_t result = {0, 0, 0};
  
      octaspire_dern_value_t const * const arg =
          octaspire_dern_value_as_vector_get_element_at_const(self, possiblyNegativeIndex);


@@ 3533,21 3580,22 @@ return result;
      }
  
+     result.value = arg;
      result.text = octaspire_dern_value_as_text_get_string(arg);
      return result;
  }
  
- octaspire_dern_one_of_texts_or_unpushed_error_t
+ octaspire_dern_one_of_texts_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_one_of_texts_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,
      char const * const dernFuncName,
      char const * const alternatives[])
  {
-     octaspire_dern_one_of_texts_or_unpushed_error_t result =
-         {.text=0, .index=-1, .unpushedError=0};
+     octaspire_dern_one_of_texts_or_unpushed_error_const_t result =
+         {.text=0, .value=0, .index=-1, .unpushedError=0};
  
-     octaspire_dern_text_or_unpushed_error_t textOrError =
+     octaspire_dern_text_or_unpushed_error_const_t textOrError =
          octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
              self,
              possiblyNegativeIndex,


@@ 3601,6 3649,7 @@ octaspire_string_release(errorMessage);
      errorMessage = 0;
  
+     result.value = textOrError.value;
      result.text  = textOrError.text;
      result.index = index;
      return result;

M release/examples/dern-nuklear-example.dern => release/examples/dern-nuklear-example.dern +5 -2
@@ 33,7 33,8 @@ (define dern-nuklear-example-target-FPS            as {D+100} [target FPS])
  (define dern-nuklear-example-target-frame-duration as (/ {D+1.0} dern-nuklear-example-target-FPS) [time for a frame to last])
  
- (define dern-nuklear-example-checkbox-active       as false [is checkbox active or not])
+ (define dern-nuklear-example-checkbox-active       as false  [is checkbox active or not])
+ (define dern-nuklear-example-slider-int-value      as {D+15} [current value of the integer slider])
  
  (define dern-nuklear-example-render as (fn ()
    (if (nuklear-begin dern-nuklear-example-nuklear-ctx [] {D+10} {D+10} {D+780} {D+580})


@@ 45,7 46,9 @@ (nuklear-layout-row-static dern-nuklear-example-nuklear-ctx {D+90} {D+150} {D+1})
        (if (nuklear-button-label dern-nuklear-example-nuklear-ctx [Quit Button]) (= dern-nuklear-example-running false))
        (nuklear-layout-row-static dern-nuklear-example-nuklear-ctx {D+90} {D+150} {D+1})
-       (if (nuklear-checkbox-label dern-nuklear-example-nuklear-ctx [Checkbox] dern-nuklear-example-checkbox-active) (println [Toggled to {}] dern-nuklear-example-checkbox-active))))
+       (if (nuklear-checkbox-label dern-nuklear-example-nuklear-ctx [Checkbox] dern-nuklear-example-checkbox-active) (println [Toggled to {}] dern-nuklear-example-checkbox-active))
+       (nuklear-layout-row-static dern-nuklear-example-nuklear-ctx {D+90} {D+150} {D+1})
+       (if (nuklear-slider-int dern-nuklear-example-nuklear-ctx {D+10} dern-nuklear-example-slider-int-value {D+20} {D+1}) (println [int to {}] dern-nuklear-example-slider-int-value))))
    (nuklear-end dern-nuklear-example-nuklear-ctx)
    (nuklear-sdl-render)
    (sdl2-GL-SwapWindow dern-nuklear-example-window))

M release/octaspire-dern-amalgamated.c => release/octaspire-dern-amalgamated.c +115 -15
@@ 26223,7 26223,7 @@ #define OCTASPIRE_DERN_CONFIG_H
  
  #define OCTASPIRE_DERN_CONFIG_VERSION_MAJOR "0"
- #define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "468"
+ #define OCTASPIRE_DERN_CONFIG_VERSION_MINOR "469"
  #define OCTASPIRE_DERN_CONFIG_VERSION_PATCH "0"
  
  #define OCTASPIRE_DERN_CONFIG_VERSION_STR "Octaspire Dern version " \


@@ 27192,33 27192,70 @@ typedef struct octaspire_dern_c_data_or_unpushed_error_t
  {
      void                   * cData;
+     octaspire_dern_value_t * value;
      octaspire_dern_value_t * unpushedError;
  }
  octaspire_dern_c_data_or_unpushed_error_t;
  
+ typedef struct octaspire_dern_c_data_or_unpushed_error_const_t
+ {
+     void                   const * cData;
+     octaspire_dern_value_t const * value;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_c_data_or_unpushed_error_const_t;
+ 
  typedef struct octaspire_dern_number_or_unpushed_error_t
  {
      float                    number;
+     octaspire_dern_value_t * value;
      octaspire_dern_value_t * unpushedError;
  }
  octaspire_dern_number_or_unpushed_error_t;
  
+ typedef struct octaspire_dern_number_or_unpushed_error_const_t
+ {
+     float                          number;
+     octaspire_dern_value_t const * value;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_number_or_unpushed_error_const_t;
+ 
  typedef struct octaspire_dern_text_or_unpushed_error_t
  {
      octaspire_string_t     const * text;
+     octaspire_dern_value_t       * value;
      octaspire_dern_value_t       * unpushedError;
  }
  octaspire_dern_text_or_unpushed_error_t;
  
+ typedef struct octaspire_dern_text_or_unpushed_error_const_t
+ {
+     octaspire_string_t     const * text;
+     octaspire_dern_value_t const * value;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_text_or_unpushed_error_const_t;
+ 
  typedef struct octaspire_dern_one_of_texts_or_unpushed_error_t
  {
      octaspire_string_t     const * text;
+     octaspire_dern_value_t       * value;
      int                            index;
      octaspire_dern_value_t       * unpushedError;
  }
  octaspire_dern_one_of_texts_or_unpushed_error_t;
  
- octaspire_dern_c_data_or_unpushed_error_t
+ typedef struct octaspire_dern_one_of_texts_or_unpushed_error_const_t
+ {
+     octaspire_string_t     const * text;
+     octaspire_dern_value_t const * value;
+     int                            index;
+     octaspire_dern_value_t       * unpushedError;
+ }
+ octaspire_dern_one_of_texts_or_unpushed_error_const_t;
+ 
+ octaspire_dern_c_data_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 27226,19 27263,33 @@ char const * const cDataName,
      char const * const pluginName);
  
- octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_c_data_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName,
+     char const * const cDataName,
+     char const * const pluginName);
+ 
+ octaspire_dern_number_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,
      char const * const dernFuncName);
  
- octaspire_dern_text_or_unpushed_error_t
+ octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName);
+ 
+ octaspire_dern_text_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,
      char const * const dernFuncName);
  
- octaspire_dern_one_of_texts_or_unpushed_error_t
+ octaspire_dern_one_of_texts_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_one_of_texts_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 47938,7 47989,7 @@ possiblyNegativeIndex);
  }
  
- octaspire_dern_c_data_or_unpushed_error_t
+ octaspire_dern_c_data_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 47953,7 48004,7 @@ octaspire_helpers_verify_not_null(vm);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_c_data_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_c_data_or_unpushed_error_const_t result = {0, 0, 0};
  
      octaspire_dern_value_t const * const arg =
          octaspire_dern_value_as_vector_get_element_at_const(self, possiblyNegativeIndex);


@@ 48003,11 48054,37 @@ return result;
      }
  
+     result.value = arg;
      result.cData = octaspire_dern_c_data_get_payload(cData);
      return result;
  }
  
- octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_c_data_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName,
+     char const * const cDataName,
+     char const * const pluginName)
+ {
+ 
+     octaspire_dern_c_data_or_unpushed_error_t result = {0, 0, 0};
+     octaspire_dern_c_data_or_unpushed_error_const_t const constResult =
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+             self,
+             possiblyNegativeIndex,
+             dernFuncName,
+             cDataName,
+             pluginName);
+ 
+     result.cData         = (void                   *)constResult.cData;
+     result.value         = (octaspire_dern_value_t *)constResult.value;
+     result.unpushedError =                           constResult.unpushedError;
+ 
+     return result;
+ }
+ 
+ octaspire_dern_number_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 48020,7 48097,7 @@ octaspire_helpers_verify_not_null(vm);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_number_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_number_or_unpushed_error_const_t result = {0, 0, 0};
  
      octaspire_dern_value_t const * const arg =
          octaspire_dern_value_as_vector_get_element_at_const(self, possiblyNegativeIndex);


@@ 48043,11 48120,32 @@ return result;
      }
  
+     result.value  = arg;
      result.number = octaspire_dern_value_as_number_get_value(arg);
      return result;
  }
  
- octaspire_dern_text_or_unpushed_error_t
+ octaspire_dern_number_or_unpushed_error_t
+ octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error(
+     octaspire_dern_value_t * const self,
+     ptrdiff_t const possiblyNegativeIndex,
+     char const * const dernFuncName)
+ {
+     octaspire_dern_number_or_unpushed_error_t result = {0, 0, 0};
+     octaspire_dern_number_or_unpushed_error_const_t const constResult =
+         octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
+             self,
+             possiblyNegativeIndex,
+             dernFuncName);
+ 
+     result.number        =                           constResult.number;
+     result.value         = (octaspire_dern_value_t *)constResult.value;
+     result.unpushedError =                           constResult.unpushedError;
+ 
+     return result;
+ }
+ 
+ octaspire_dern_text_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,


@@ 48060,7 48158,7 @@ octaspire_helpers_verify_not_null(vm);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_text_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_text_or_unpushed_error_const_t result = {0, 0, 0};
  
      octaspire_dern_value_t const * const arg =
          octaspire_dern_value_as_vector_get_element_at_const(self, possiblyNegativeIndex);


@@ 48083,21 48181,22 @@ return result;
      }
  
+     result.value = arg;
      result.text = octaspire_dern_value_as_text_get_string(arg);
      return result;
  }
  
- octaspire_dern_one_of_texts_or_unpushed_error_t
+ octaspire_dern_one_of_texts_or_unpushed_error_const_t
  octaspire_dern_value_as_vector_get_element_at_as_one_of_texts_or_unpushed_error_const(
      octaspire_dern_value_t const * const self,
      ptrdiff_t const possiblyNegativeIndex,
      char const * const dernFuncName,
      char const * const alternatives[])
  {
-     octaspire_dern_one_of_texts_or_unpushed_error_t result =
-         {.text=0, .index=-1, .unpushedError=0};
+     octaspire_dern_one_of_texts_or_unpushed_error_const_t result =
+         {.text=0, .value=0, .index=-1, .unpushedError=0};
  
-     octaspire_dern_text_or_unpushed_error_t textOrError =
+     octaspire_dern_text_or_unpushed_error_const_t textOrError =
          octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
              self,
              possiblyNegativeIndex,


@@ 48151,6 48250,7 @@ octaspire_string_release(errorMessage);
      errorMessage = 0;
  
+     result.value = textOrError.value;
      result.text  = textOrError.text;
      result.index = index;
      return result;

M release/plugins/dern_chipmunk.c => release/plugins/dern_chipmunk.c +82 -82
@@ 133,7 133,7 @@ octaspire_helpers_verify_not_null(sourceVector);
  
      size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
-     octaspire_dern_c_data_or_unpushed_error_t result = {0, 0};
+     octaspire_dern_c_data_or_unpushed_error_t result = {0, 0, 0};
  
      cpVect *vect = octaspire_allocator_malloc(
          octaspire_dern_vm_get_allocator(vm),


@@ 440,7 440,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 480,7 480,7 @@ // cpVect
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              2,
              dernFuncName,


@@ 555,7 555,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 574,7 574,7 @@       // width
  
-     octaspire_dern_number_or_unpushed_error_t numberOrError =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrError =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              1,


@@ 683,7 683,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 703,7 703,7 @@ // cpVect for a
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              1,
              dernFuncName,


@@ 728,7 728,7 @@ // cpVect for b
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              2,
              dernFuncName,


@@ 750,7 750,7 @@       // Radius
  
-     octaspire_dern_number_or_unpushed_error_t numberOrError =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrError =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              3,


@@ 822,7 822,7 @@ // cpShape
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 841,7 841,7 @@       // Friction
  
-     octaspire_dern_number_or_unpushed_error_t numberOrError =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrError =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              1,


@@ 900,7 900,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 919,7 919,7 @@       // cpVect
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorVect =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 927,16 927,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorVect.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorVect.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * const context =
-         cDataOrError.cData;
+         cDataOrErrorVect.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 980,7 980,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1035,7 1035,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1102,7 1102,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1170,7 1170,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1239,7 1239,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1318,7 1318,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1337,7 1337,7 @@       // cpVect
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorVect =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 1345,16 1345,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorVect.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorVect.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * const context =
-         cDataOrError.cData;
+         cDataOrErrorVect.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1400,7 1400,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1476,7 1476,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1495,7 1495,7 @@       // cpVect
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorVect =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 1503,16 1503,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorVect.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorVect.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * const context =
-         cDataOrError.cData;
+         cDataOrErrorVect.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1555,7 1555,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1607,7 1607,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1675,7 1675,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1694,7 1694,7 @@       // cpVect for the impulse
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorVect =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 1702,16 1702,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorVect.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorVect.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * context =
-         cDataOrError.cData;
+         cDataOrErrorVect.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1719,7 1719,7 @@       // cpVect for the point
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorPoint =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              2,


@@ 1727,15 1727,15 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorPoint.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorPoint.unpushedError;
      }
  
-     context = cDataOrError.cData;
+     context = cDataOrErrorPoint.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1779,7 1779,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1798,7 1798,7 @@       // cpVect for the impulse
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorImpulse =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 1806,16 1806,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorImpulse.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorImpulse.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * context =
-         cDataOrError.cData;
+         cDataOrErrorImpulse.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1823,7 1823,7 @@       // cpVect for the point
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorPoint =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              2,


@@ 1831,15 1831,15 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorPoint.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorPoint.unpushedError;
      }
  
-     context = cDataOrError.cData;
+     context = cDataOrErrorPoint.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1883,7 1883,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1902,7 1902,7 @@       // cpVect for the force
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorForce =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 1910,16 1910,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorForce.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorForce.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * context =
-         cDataOrError.cData;
+         cDataOrErrorForce.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1927,7 1927,7 @@       // cpVect for the point
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorPoint =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              2,


@@ 1935,15 1935,15 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorPoint.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorPoint.unpushedError;
      }
  
-     context = cDataOrError.cData;
+     context = cDataOrErrorPoint.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 1987,7 1987,7 @@ // cpBody
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2006,7 2006,7 @@       // cpVect for the force
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorForce =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 2014,16 2014,16 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorForce.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorForce.unpushedError;
      }
  
      dern_chipmunk_allocation_context_t const * context =
-         cDataOrError.cData;
+         cDataOrErrorForce.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 2031,7 2031,7 @@       // cpVect for the point
  
-     cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorPoint =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              2,


@@ 2039,15 2039,15 @@ cpVectName,
              DERN_CHIPMUNK_PLUGIN_NAME);
  
-     if (cDataOrError.unpushedError)
+     if (cDataOrErrorPoint.unpushedError)
      {
          octaspire_helpers_verify_true(
              stackLength == octaspire_dern_vm_get_stack_length(vm));
  
-         return cDataOrError.unpushedError;
+         return cDataOrErrorPoint.unpushedError;
      }
  
-     context = cDataOrError.cData;
+     context = cDataOrErrorPoint.cData;
  
      octaspire_helpers_verify_not_null(context);
  


@@ 2090,7 2090,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2162,7 2162,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2182,7 2182,7 @@ // cpBody
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              1,
              dernFuncName,


@@ 2235,7 2235,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2255,7 2255,7 @@ // cpShape
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              1,
              dernFuncName,


@@ 2492,7 2492,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2669,7 2669,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2689,7 2689,7 @@ // cpBody
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              1,
              dernFuncName,


@@ 2745,7 2745,7 @@ // cpSpace
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 2765,7 2765,7 @@ // cpBody
  
      cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              1,
              dernFuncName,


@@ 2905,7 2905,7 @@       // cpVect
  
-     octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrError =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              0,


@@ 2963,7 2963,7 @@       // cpVect
  
-     octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrError =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              0,

M release/plugins/dern_nuklear.c => release/plugins/dern_nuklear.c +200 -26
@@ 72,7 72,7 @@ // SDL2 window
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 146,7 146,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 190,7 190,7 @@       for (size_t i = 0; i < numNumbers; ++i)
      {
-         octaspire_dern_number_or_unpushed_error_t const numberOrError =
+         octaspire_dern_number_or_unpushed_error_const_t const numberOrError =
              octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
                  arguments,
                  i + 2,


@@ 211,7 211,7 @@       for (size_t i = numExpectedArgs; i < numArgs; ++i)
      {
-         octaspire_dern_text_or_unpushed_error_t const textOrError =
+         octaspire_dern_text_or_unpushed_error_const_t const textOrError =
              octaspire_dern_value_as_vector_get_element_at_as_text_or_unpushed_error_const(
                  arguments,
                  i,


@@ 304,7 304,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 430,7 430,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 511,7 511,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 584,6 584,144 @@ return octaspire_dern_vm_create_new_value_boolean(vm, result);
  }
  
+ octaspire_dern_value_t *dern_nuklear_slider_int(
+     octaspire_dern_vm_t * const vm,
+     octaspire_dern_value_t * const arguments,
+     octaspire_dern_value_t * const environment)
+ {
+     OCTASPIRE_HELPERS_UNUSED_PARAMETER(environment);
+ 
+     size_t const stackLength = octaspire_dern_vm_get_stack_length(vm);
+     char   const * const dernFuncName    = "nuklear-slider-int";
+     char   const * const ctxName         = "ctx";
+     size_t const         numExpectedArgs = 5;
+ 
+     size_t const numArgs =
+         octaspire_dern_value_as_vector_get_length(arguments);
+ 
+     if (numArgs != numExpectedArgs)
+     {
+         octaspire_helpers_verify_true(
+             stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+         return octaspire_dern_vm_create_new_value_error_format(
+             vm,
+             "Builtin '%s' expects %zu arguments. "
+             "%zu arguments were given.",
+             dernFuncName,
+             numExpectedArgs,
+             numArgs);
+     }
+ 
+     // ctx
+ 
+     octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
+             arguments,
+             0,
+             dernFuncName,
+             ctxName,
+             DERN_NUKLEAR_PLUGIN_NAME);
+ 
+     if (cDataOrError.unpushedError)
+     {
+         octaspire_helpers_verify_true(
+             stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+         return cDataOrError.unpushedError;
+     }
+ 
+     struct nk_context * const ctx = cDataOrError.cData;
+ 
+     octaspire_helpers_verify_not_null(ctx);
+ 
+     // min
+ 
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorMin =
+         octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
+             arguments,
+             1,
+             dernFuncName);
+ 
+     if (numberOrErrorMin.unpushedError)
+     {
+         octaspire_helpers_verify_true(
+             stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+         return numberOrErrorMin.unpushedError;
+     }
+ 
+     int const minVal = numberOrErrorMin.number;
+ 
+     // value
+ 
+     octaspire_dern_number_or_unpushed_error_t numberOrErrorValue =
+         octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error(
+             arguments,
+             2,
+             dernFuncName);
+ 
+     if (numberOrErrorValue.unpushedError)
+     {
+         octaspire_helpers_verify_true(
+             stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+         return numberOrErrorValue.unpushedError;
+     }
+ 
+     int  valueVal = numberOrErrorValue.number;
+ 
+     // max
+ 
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorMax =
+         octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
+             arguments,
+             3,
+             dernFuncName);
+ 
+     if (numberOrErrorMax.unpushedError)
+     {
+         octaspire_helpers_verify_true(
+             stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+         return numberOrErrorMax.unpushedError;
+     }
+ 
+     int const maxVal = numberOrErrorMax.number;
+ 
+     // step
+ 
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorStep =
+         octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
+             arguments,
+             4,
+             dernFuncName);
+ 
+     if (numberOrErrorStep.unpushedError)
+     {
+         octaspire_helpers_verify_true(
+             stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+         return numberOrErrorStep.unpushedError;
+     }
+ 
+     int const stepVal = numberOrErrorStep.number;
+ 
+     // Show the widget.
+ 
+     bool const result =
+         nk_slider_int(ctx, minVal, &valueVal, maxVal, stepVal);
+ 
+     octaspire_dern_value_as_number_set_value(
+         numberOrErrorValue.value,
+         (double)valueVal);
+ 
+     octaspire_helpers_verify_true(
+         stackLength == octaspire_dern_vm_get_stack_length(vm));
+ 
+     return octaspire_dern_vm_create_new_value_boolean(vm, result);
+ }
+ 
  octaspire_dern_value_t *dern_nuklear_progress(
      octaspire_dern_vm_t * const vm,
      octaspire_dern_value_t * const arguments,


@@ 616,7 754,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 737,7 875,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrErrorCtx =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 759,7 897,7 @@       // row-height
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorRowHeight =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorRowHeight =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              1,


@@ 777,7 915,7 @@       // num-columns
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorNumColumns =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorNumColumns =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              1,


@@ 833,7 971,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrErrorCtx =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 855,7 993,7 @@       // height
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorHeight =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorHeight =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              1,


@@ 873,7 1011,7 @@       // item-width
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorItemWidth =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorItemWidth =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              1,


@@ 891,7 1029,7 @@       // columns
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorColumns =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorColumns =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              2,


@@ 947,7 1085,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrErrorCtx =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 975,7 1113,7 @@ 0
      };
  
-     octaspire_dern_one_of_texts_or_unpushed_error_t textOrError =
+     octaspire_dern_one_of_texts_or_unpushed_error_const_t textOrError =
          octaspire_dern_value_as_vector_get_element_at_as_one_of_texts_or_unpushed_error_const(
              arguments,
              1,


@@ 998,7 1136,7 @@       // height
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorHeight =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorHeight =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              2,


@@ 1016,7 1154,7 @@       // columns
  
-     octaspire_dern_number_or_unpushed_error_t numberOrErrorColumns =
+     octaspire_dern_number_or_unpushed_error_const_t numberOrErrorColumns =
          octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
              arguments,
              3,


@@ 1056,7 1194,7 @@       for (size_t i = 4; (i < numArgs) && (numRatiosAdded < (size_t)columns); ++i)
      {
-         octaspire_dern_number_or_unpushed_error_t numberOrErrorRatio =
+         octaspire_dern_number_or_unpushed_error_const_t numberOrErrorRatio =
              octaspire_dern_value_as_vector_get_element_at_as_number_or_unpushed_error_const(
                  arguments,
                  i,


@@ 1138,7 1276,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1197,7 1335,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1258,7 1396,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrErrorCtx =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1279,7 1417,7 @@       // SDL2 event
  
-     octaspire_dern_c_data_or_unpushed_error_t cDataOrErrorEvent =
+     octaspire_dern_c_data_or_unpushed_error_const_t cDataOrErrorEvent =
          octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
              arguments,
              1,


@@ 1296,7 1434,8 @@ }
  
      // TODO actually sdl2_allocation_context_t
-     dern_nuklear_allocation_context_t * context = cDataOrErrorEvent.cData;
+     dern_nuklear_allocation_context_t const * const context =
+         cDataOrErrorEvent.cData;
  
      SDL_Event * const event = context->payload;
  


@@ 1340,7 1479,7 @@ // ctx
  
      octaspire_dern_c_data_or_unpushed_error_t cDataOrError =
-         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error_const(
+         octaspire_dern_value_as_vector_get_element_at_as_c_data_or_unpushed_error(
              arguments,
              0,
              dernFuncName,


@@ 1584,6 1723,41 @@       if (!octaspire_dern_vm_create_and_register_new_builtin(
              vm,
+             "nuklear-slider-int",
+             dern_nuklear_slider_int,
+             5,
+             "NAME\n"
+             "\tnuklear-slider-int\n"
+             "\n"
+             "SYNOPSIS\n"
+             "\t(require 'dern_nuklear)\n"
+             "\n"
+             "\t(nuklear-slider-int ctx min val max step) -> true/false or error\n"
+             "\n"
+             "DESCRIPTION\n"
+             "\tDisplay an integer slider.\n"
+             "\n"
+             "ARGUMENTS\n"
+             "\tctx           nuklear context.\n"
+             "\tmin           smallest possible value.\n"
+             "\tval           selected value.\n"
+             "\tmax           largest possible value.\n"
+             "\tstep          amount of change per step.\n"
+             "\n"
+             "RETURN VALUE\n"
+             "\ttrue if slider value was changed, false otherwise "
+             "\t(or error if something went wrong).\n"
+             "\n"
+             "SEE ALSO\n"
+             "\tnuklear-begin\n",
+             false,
+             targetEnv))
+     {
+         return false;
+     }
+ 
+     if (!octaspire_dern_vm_create_and_register_new_builtin(
+             vm,
              "nuklear-progress",
              dern_nuklear_progress,
              4,