Class: NSColor

Inherits:
Object show all
Defined in:
ext/accessibility/highlighter/highlighter.c,
ext/accessibility/highlighter/highlighter.c

Overview

A subset of Cocoa's NSColor class.

See Apple's Developer Reference for documentation on the methods available in this class.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.blackColorNSColor

Returns:



145
# File 'ext/accessibility/highlighter/highlighter.c', line 145

static VALUE rb_color_black(VALUE self)      { return wrap_color([NSColor blackColor]);     }

.blueColorNSColor

Returns:



149
# File 'ext/accessibility/highlighter/highlighter.c', line 149

static VALUE rb_color_blue(VALUE self)       { return wrap_color([NSColor blueColor]);      }

.brownColorNSColor

Returns:



153
# File 'ext/accessibility/highlighter/highlighter.c', line 153

static VALUE rb_color_brown(VALUE self)      { return wrap_color([NSColor brownColor]);     }

.clearColorNSColor

Returns:



157
# File 'ext/accessibility/highlighter/highlighter.c', line 157

static VALUE rb_color_clear(VALUE self)      { return wrap_color([NSColor clearColor]);     }

.cyanColorNSColor

Returns:



161
# File 'ext/accessibility/highlighter/highlighter.c', line 161

static VALUE rb_color_cyan(VALUE self)       { return wrap_color([NSColor cyanColor]);      }

.darkGrayColorNSColor

Returns:



165
# File 'ext/accessibility/highlighter/highlighter.c', line 165

static VALUE rb_color_dark_gray(VALUE self)  { return wrap_color([NSColor darkGrayColor]);  }

.grayColorNSColor

Returns:



169
# File 'ext/accessibility/highlighter/highlighter.c', line 169

static VALUE rb_color_gray(VALUE self)       { return wrap_color([NSColor grayColor]);      }

.greenColorNSColor

Returns:



173
# File 'ext/accessibility/highlighter/highlighter.c', line 173

static VALUE rb_color_green(VALUE self)      { return wrap_color([NSColor greenColor]);     }

.lightGrayColorNSColor

Returns:



177
# File 'ext/accessibility/highlighter/highlighter.c', line 177

static VALUE rb_color_light_gray(VALUE self) { return wrap_color([NSColor lightGrayColor]); }

.magentaColorNSColor

Returns:



181
# File 'ext/accessibility/highlighter/highlighter.c', line 181

static VALUE rb_color_magenta(VALUE self)    { return wrap_color([NSColor magentaColor]);   }

.orangeColorNSColor

Returns:



185
# File 'ext/accessibility/highlighter/highlighter.c', line 185

static VALUE rb_color_orange(VALUE self)     { return wrap_color([NSColor orangeColor]);    }

.purpleColorNSColor

Returns:



189
# File 'ext/accessibility/highlighter/highlighter.c', line 189

static VALUE rb_color_purple(VALUE self)     { return wrap_color([NSColor purpleColor]);    }

.redColorNSColor

Returns:



193
# File 'ext/accessibility/highlighter/highlighter.c', line 193

static VALUE rb_color_red(VALUE self)        { return wrap_color([NSColor redColor]);       }

.whiteColorNSColor

Returns:



197
# File 'ext/accessibility/highlighter/highlighter.c', line 197

static VALUE rb_color_white(VALUE self)      { return wrap_color([NSColor whiteColor]);     }

.yellowColorNSColor

Returns:



201
# File 'ext/accessibility/highlighter/highlighter.c', line 201

static VALUE rb_color_yellow(VALUE self)     { return wrap_color([NSColor yellowColor]);    }

Instance Method Details

#==(other) ⇒ Boolean

Returns:

  • (Boolean)


213
214
215
216
217
218
219
220
221
222
# File 'ext/accessibility/highlighter/highlighter.c', line 213

static
VALUE
rb_color_equality(VALUE self, VALUE other)
{
  if (CLASS_OF(other) == rb_cColor)
    if ([unwrap_color(self) isEqual:unwrap_color(other)])
      return Qtrue;

  return Qfalse;
}