File: gdk_color.e

package info (click to toggle)
egtk 0.3.5.cvs20020302-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,900 kB
  • ctags: 5,118
  • sloc: ansic: 2,212; makefile: 247; sh: 113
file content (89 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (3)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
-- Copyright (C) 1999 Richie Bielak and others
-- Licensed under Eiffel Forum Freeware License, version 1;
-- (see forum.txt)
--
indexing

	cvs: "$Id: gdk_color.e,v 1.5 2000/02/28 03:32:14 richieb Exp $"

class GDK_COLOR

inherit
	
	C_STRUCT
		rename
			handle as color
		end

	GDK_COLOR_EXTERNALS
		undefine
			copy
		end

creation

	make,
	make_rgb,
	make_from_pointer

feature

	make_rgb (red_val, green_val, blue_val: INTEGER) is 
		do
			make
			set_red (red_val)
			set_green (green_val)
			set_blue (blue_val)
		end

feature 

	struct_size: INTEGER is
		do
			Result := c_gdk_color_size 
		end

feature  -- colors

	red: INTEGER is
		do
			Result := c_gdk_color_red (color)
		end

	set_red (val: INTEGER) is
		do
			c_gdk_color_set_red (color, val)
		end

	green: INTEGER is
		do
			Result := c_gdk_color_green (color)
		end

	set_green (val: INTEGER) is
		do
			c_gdk_color_set_green (color, val)
		end

	blue: INTEGER is
		do
			Result := c_gdk_color_blue (color)
		end

	set_blue (val: INTEGER) is
		do
			c_gdk_color_set_blue (color, val)
		end

	pixel: INTEGER is
		do
			Result := c_gdk_color_pixel (color)
		end

	set_pixel (val: INTEGER) is
		do
			c_gdk_color_set_pixel (color, val)
		end


end -- GDK_COLOR