PageRenderTime 19ms CodeModel.GetById 12ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/src/wrappers/gdk/library/gdk_span.e

http://github.com/tybor/Liberty
Specman e | 68 lines | 50 code | 15 blank | 3 comment | 2 complexity | c1c76a281079c6e630628a6971128bc7 MD5 | raw file
 1indexing
 2	description: "A GdkSpan represents a horizontal line of pixels starting at the pixel with coordinates x, y and ending before x + width, y."
 3	copyright: "[
 4					Copyright (C) 2006 eiffel-libraries team, GTK+ team
 5					
 6					This library is free software; you can redistribute it and/or
 7					modify it under the terms of the GNU Lesser General Public License
 8					as published by the Free Software Foundation; either version 2.1 of
 9					the License, or (at your option) any later version.
10					
11					This library is distributed in the hope that it will be useful, but
12					WITHOUT ANY WARRANTY; without even the implied warranty of
13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14					Lesser General Public License for more details.
15
16					You should have received a copy of the GNU Lesser General Public
17					License along with this library; if not, write to the Free Software
18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19					02110-1301 USA
20				]"
21
22class GDK_SPAN
23
24inherit G_STRUCT
25
26creation from_external_pointer
27
28feature -- Getters
29	x: INTEGER is
30			-- x coordinate of the first pixel.
31		do
32			Result := get_x (handle)
33		end
34
35	y: INTEGER is
36			-- y coordinate of the first pixel.
37		do
38			Result := get_y (handle)
39		end
40
41	width: INTEGER is
42			-- number of pixels in the span.
43		do
44			Result := get_width (handle)
45		end
46
47feature -- TODO: Setters (if needed)
48	
49feature -- size
50	struct_size: INTEGER is
51		external "C inline use <gtk/gtk.h>"
52		alias "sizeof(GdkSpan)"
53		end
54
55feature {} -- Struct accesing
56
57	get_x (span: POINTER): INTEGER is
58		external "C struct GdkSpan get x use <gdk/gdk.h>"
59		end
60
61	get_y (span: POINTER): INTEGER is
62		external "C struct GdkSpan get y use <gdk/gdk.h>"
63		end
64	
65	get_width (span: POINTER): INTEGER is
66		external "C struct GdkSpan get width use <gdk/gdk.h>"
67		end
68end