Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.video

Class EM_CURSOR


Direct ancestors

EM_SHARED_ERROR_HANDLER, DISPOSABLE, SDL_MOUSE_FUNCTIONS_EXTERNAL

Creation

Features

Invariants

indexing

description

A screen cursor

date

$Date$

revision

$Revision$

class

EM_CURSOR

create

make_from_surface (a_surface: EM_SURFACE; an_x, a_y: INTEGER)

-- Initialise cursor with data of a_surface and hot spot an_x a_y.
-- Only black white color is allowed. Other color is transparent.
-- The hot spot defines the pixel which is exactly on the mouse position.

require
a_surface_not_void: a_surface /= Void
a_surface_width_multiple_of_8: a_surface.width \\ 8 = 0
a_surface_height_multiple_of_8: a_surface.height \\ 8 = 0
an_x_in_range: 0 <= an_x and an_x <= a_surface.width
a_y_in_range: 0 <= a_y and a_y <= a_surface.height

create {EM_VIDEO_SUBSYSTEM}

make_from_pointer (a_pointer: POINTER; free_on_dispose: BOOLEAN)

-- Initialise cursor from a_pointer.

require
a_pointer_not_null: a_pointer /= Default_pointer

feature -- Status setting

show

-- Show cursor.

invariant

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end