CPP   50

color.h

Guest on 20th May 2022 01:44:48 AM

  1. #ifndef SASS_TYPES_COLOR_H
  2. #define SASS_TYPES_COLOR_H
  3.  
  4. #include <nan.h>
  5. #include "sass_value_wrapper.h"
  6.  
  7. #if defined(__GNUC__) && __GNUC__ >= 7
  8. #define NODE_SASS_FALLTHROUGH __attribute__ ((fallthrough))
  9. #else
  10. #define NODE_SASS_FALLTHROUGH
  11. #endif
  12.  
  13. namespace SassTypes
  14. {
  15.   class Color : public SassValueWrapper<Color> {
  16.     public:
  17.       Color(Sass_Value*);
  18.       static char const* get_constructor_name() { return "SassColor"; }
  19.       static Sass_Value* construct(const std::vector<v8::Local<v8::Value>>, Sass_Value **);
  20.  
  21.       static void initPrototype(v8::Local<v8::FunctionTemplate>);
  22.  
  23.       static NAN_METHOD(GetR);
  24.       static NAN_METHOD(GetG);
  25.       static NAN_METHOD(GetB);
  26.       static NAN_METHOD(GetA);
  27.       static NAN_METHOD(SetR);
  28.       static NAN_METHOD(SetG);
  29.       static NAN_METHOD(SetB);
  30.       static NAN_METHOD(SetA);
  31.   };
  32. }
  33.  
  34. #endif

Raw Paste


Login or Register to edit or fork this paste. It's free.