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

em.video.ev_widget.interface

Class EM_EV_WIDGET


Direct ancestors

EV_PRIMITIVE, EM_APPLICATION

Creation

Features

Invariants

indexing

description

EiffelMedia widget that can be used in a vision application. There can only be one EM_WIDGET
because we need an ugly hack to draw into the widget.

date

$Date: 2005/10/24 16:34:58 $

revision

$Revision: 1.9 $

class

EM_EV_WIDGET

inherit

EV_PRIMITIVE
EM_APPLICATION

create

make

-- creation procedure

feature -- Status report

make

-- creation procedure

feature -- Commands

launch_threaded

-- Launch the application by running scene.

make_em_application

-- Redefine it and use it as it would be a standard
-- SDL application creation procedure
-- This will be called be the SDL Thread

pre_launch

-- prepare application for EiffelMedia (setup environment variables)
--
-- we need this because we can only set the environment variable if the
-- vision2 widget window is already created, otherwise this app will fail

feature {EM_EV_WIDGET_SCROLLABLE} -- helpers

initialization_procedure: PROCEDURE[ANY, TUPLE[]]

-- creation procedure used to setup SDL

set_initialization_procedure (a_proc: like initialization_procedure)

-- EM_EV_WIDGET_SCROLLABLE need this to properly set up
-- its own make_em_application.
-- Otherwise the newly created thread will work incorectly

feature -- EiffelMedia preparation and initialization

em_prepare

-- Sets the SDL_WINDOWID and if needed also SDL_VIDEODRIVER to
-- the Widget. This hack is needed, because otherwise SDL will
-- draw in the wrong client window.
-- Call this function not before the widget is extended in a container,
-- or it will open a new window

feature {EV_ANY} -- Contract support

is_in_default_state: BOOLEAN

-- Is Current in its default state.

feature {EV_ANY_I} -- Implementation

implementation: EM_EV_WIDGET_I

-- Responsible for interaction with native graphics toolkit.

invariant

end