PageRenderTime 20ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/src/wrappers/gdk/library/gdk_point.e

http://github.com/tybor/Liberty
Specman e | 57 lines | 43 code | 12 blank | 2 comment | 2 complexity | 067fad5a844fe5df7ca0a0a314c83f9b MD5 | raw file
 1indexing
 2	description: "GdkPoint is a simple structure containing an x and y coordinate of a point.."
 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				]"
21class GDK_POINT
22
23inherit G_STRUCT
24
25creation from_external_pointer
26
27feature -- size
28	struct_size: INTEGER is
29		external "C inline use <gtk/gtk.h>"
30		alias "sizeof(GdkPoint)"
31		end
32
33feature -- Getters
34	x: INTEGER is
35			-- x coordinate of the point
36		do
37			Result := get_x (handle)
38		end
39
40	y: INTEGER is
41			-- y coordinate of the point.
42		do
43			Result := get_y (handle)
44		end
45
46feature -- TODO: Setters (if needed)
47	
48feature {} -- Struct accesing
49
50	get_x (span: POINTER): INTEGER is
51		external "C struct GdkPoint get x use <gdk/gdk.h>"
52		end
53
54	get_y (span: POINTER): INTEGER is
55		external "C struct GdkPoint get y use <gdk/gdk.h>"
56		end
57end