public
Description: A SSB OSX application, which at some point will be able to create a new application which wraps a specific web application, (Think Campfire, Twitter etc) and allows the user to use Ruby to create event handlers to be able support things like Growl or whatever you would like.
Clone URL: git://github.com/alloy/webapp-app.git
Search Repo:
webapp-app / objc / CTGradient.h
100644 73 lines (54 sloc) 1.918 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// CTGradient.h
//
// Created by Chad Weider on 2/14/07.
// Copyright (c) 2007 Chad Weider.
// Some rights reserved: <http://creativecommons.org/licenses/by/2.5/>
//
// Version: 1.6
 
#import <Cocoa/Cocoa.h>
 
typedef struct _CTGradientElement
  {
  float red, green, blue, alpha;
  float position;
  
  struct _CTGradientElement *nextElement;
  } CTGradientElement;
 
typedef enum _CTBlendingMode
  {
  CTLinearBlendingMode,
  CTChromaticBlendingMode,
  CTInverseChromaticBlendingMode
  } CTGradientBlendingMode;
 
 
@interface CTGradient : NSObject <NSCopying, NSCoding>
  {
  CTGradientElement* elementList;
  CTGradientBlendingMode blendingMode;
  
  CGFunctionRef gradientFunction;
  }
 
+ (id)gradientWithBeginningColor:(NSColor *)begin endingColor:(NSColor *)end;
 
+ (id)aquaSelectedGradient;
+ (id)aquaNormalGradient;
+ (id)aquaPressedGradient;
 
+ (id)unifiedSelectedGradient;
+ (id)unifiedNormalGradient;
+ (id)unifiedPressedGradient;
+ (id)unifiedDarkGradient;
 
+ (id)sourceListSelectedGradient;
+ (id)sourceListUnselectedGradient;
 
+ (id)rainbowGradient;
+ (id)hydrogenSpectrumGradient;
 
- (CTGradient *)gradientWithAlphaComponent:(float)alpha;
 
- (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position;  //positions given relative to [0,1]
- (CTGradient *)removeColorStopAtIndex:(unsigned)index;
- (CTGradient *)removeColorStopAtPosition:(float)position;
 
- (CTGradientBlendingMode)blendingMode;
- (NSColor *)colorStopAtIndex:(unsigned)index;
- (NSColor *)colorAtPosition:(float)position;
 
 
- (void)drawSwatchInRect:(NSRect)rect;
- (void)fillRect:(NSRect)rect angle:(float)angle;          //fills rect with axial gradient
                                  //  angle in degrees
- (void)radialFillRect:(NSRect)rect;                //fills rect with radial gradient
                                  // gradient from center outwards
- (void)fillBezierPath:(NSBezierPath *)path angle:(float)angle;
- (void)radialFillBezierPath:(NSBezierPath *)path;
 
@end