Embedding SDL within a browser, e.g. Flash

Is it possible to embedd an SDL application within say Internet Explorer,
similar to Macromedia Flash, or a Java Applet ?

-Luke

Try using the Python bindings for SDLOn Saturday 21 June 2003 4:04 pm, Luke J Crook wrote:

Is it possible to embedd an SDL application within say Internet Explorer,
similar to Macromedia Flash, or a Java Applet ?

-Luke


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety. "
–Benjamin Franklin

Thanks for the pointer.

-Luke> ----- Original Message -----

From: taxtropel_news@yahoo.com (Samuel E. Bray)
Newsgroups: gmane.comp.lib.sdl
Sent: Sunday, June 22, 2003 6:12 AM
Subject: Re: Embedding SDL within a browser, e.g. Flash

Try using the Python bindings for SDL

On Saturday 21 June 2003 4:04 pm, Luke J Crook wrote:

Is it possible to embedd an SDL application within say Internet
Explorer,
similar to Macromedia Flash, or a Java Applet ?

-Luke


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


"They that can give up essential liberty to obtain a little temporary
safety
deserve neither liberty nor safety. "
–Benjamin Franklin

Maybe an ActiveX…

Luke J Crook wrote:> Thanks for the pointer.

-Luke

----- Original Message -----
From: “Samuel” <taxtropel_news at yahoo.com>
Newsgroups: gmane.comp.lib.sdl
Sent: Sunday, June 22, 2003 6:12 AM
Subject: Re: Embedding SDL within a browser, e.g. Flash

Try using the Python bindings for SDL

On Saturday 21 June 2003 4:04 pm, Luke J Crook wrote:

Is it possible to embedd an SDL application within say Internet

Explorer,

similar to Macromedia Flash, or a Java Applet ?

-Luke


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


"They that can give up essential liberty to obtain a little temporary

safety

deserve neither liberty nor safety. "
–Benjamin Franklin


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Maybe an ActiveX…

Yes. What I was asking is, would the SDL.DLL have to be modified to be the
ActiveX component, or would the application that links to SDL be the ActiveX
component ? Since SDL has the window context, I would assume that SDL would
have to be the ActiveX component ?

-Luke

----- Original Message -----
From: nospam@pontoip.com.br (Herbert G. Fischer)
To:
Sent: Tuesday, June 24, 2003 7:28 PM
Subject: Re: [SDL] Re: Embedding SDL within a browser, e.g. Flash

That I cannot help you…

Some weeks ago I tryed to make a screensaver with SDL
and I found no way. Maybe I didn’t tryed the right way
but I think that SDL cannot be used to do this “hacks”.

-Herbert

Luke J Crook wrote:> ----- Original Message -----

From: “H. G. Fischer” <@Herbert_G_Fischer>
To:
Sent: Tuesday, June 24, 2003 7:28 PM
Subject: Re: [SDL] Re: Embedding SDL within a browser, e.g. Flash

Maybe an ActiveX…

Yes. What I was asking is, would the SDL.DLL have to be modified to be the
ActiveX component, or would the application that links to SDL be the ActiveX
component ? Since SDL has the window context, I would assume that SDL would
have to be the ActiveX component ?

-Luke


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Herbert G. Fischer wrote:

Some weeks ago I tryed to make a screensaver with SDL
and I found no way. Maybe I didn’t tryed the right way
but I think that SDL cannot be used to do this “hacks”.

Yes. What I was asking is, would the SDL.DLL have to be modified to be
the
ActiveX component, or would the application that links to SDL be the
ActiveX
component ? Since SDL has the window context, I would assume that SDL
would
have to be the ActiveX component ?

I’ve written an activex with SDL but it had so much problem that i
reverted to windib code.

The main problem is that the SDL_WINDOWID hack is applied in the
SDL_Init() function, and the fact SDL can have only a window for each
thread, the plugin worked correctly only in the first instance, just
doubling the browser window caused it to crash, also switching from a
page with the plugin to a normal page and then again to the plugin
caused problems since the HWND pointer was changed…

Anyway I don’t see problems to do a .scr win32 screensaver with SDL, I
think you can do also X screensavers with some more efforts. The problem
is when you need multiple windows in the same process.

Bye,
Gabry

The main problem I saw in use SDL to do a screensaver is
that SDL overrides main function, and a Windows screensaver
has a different entry point (at least in source code).

It does not use WinMain as start point, but another function.

s,

Herbert

Gabriele Greco wrote:> Herbert G. Fischer wrote:

Some weeks ago I tryed to make a screensaver with SDL
and I found no way. Maybe I didn’t tryed the right way
but I think that SDL cannot be used to do this “hacks”.

Yes. What I was asking is, would the SDL.DLL have to be modified to
be the
ActiveX component, or would the application that links to SDL be the
ActiveX
component ? Since SDL has the window context, I would assume that SDL
would
have to be the ActiveX component ?

I’ve written an activex with SDL but it had so much problem that i
reverted to windib code.

The main problem is that the SDL_WINDOWID hack is applied in the
SDL_Init() function, and the fact SDL can have only a window for each
thread, the plugin worked correctly only in the first instance, just
doubling the browser window caused it to crash, also switching from a
page with the plugin to a normal page and then again to the plugin
caused problems since the HWND pointer was changed…

Anyway I don’t see problems to do a .scr win32 screensaver with SDL, I
think you can do also X screensavers with some more efforts. The problem
is when you need multiple windows in the same process.

Bye,
Gabry


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

as i know a windows screensaver can also be just a renamed .exe file (entry
point is still winmain).> ----- Original Message -----

From: nospam@pontoip.com.br (Herbert G. Fischer)
To:
Sent: Thursday, June 26, 2003 3:46 PM
Subject: Re: [SDL] Re: Embedding SDL within a browser, e.g. Flash

The main problem I saw in use SDL to do a screensaver is
that SDL overrides main function, and a Windows screensaver
has a different entry point (at least in source code).

It does not use WinMain as start point, but another function.

s,

Herbert

Gabriele Greco wrote:

Herbert G. Fischer wrote:

Some weeks ago I tryed to make a screensaver with SDL
and I found no way. Maybe I didn’t tryed the right way
but I think that SDL cannot be used to do this “hacks”.

Yes. What I was asking is, would the SDL.DLL have to be modified to
be the
ActiveX component, or would the application that links to SDL be the
ActiveX
component ? Since SDL has the window context, I would assume that SDL
would
have to be the ActiveX component ?

I’ve written an activex with SDL but it had so much problem that i
reverted to windib code.

The main problem is that the SDL_WINDOWID hack is applied in the
SDL_Init() function, and the fact SDL can have only a window for each
thread, the plugin worked correctly only in the first instance, just
doubling the browser window caused it to crash, also switching from a
page with the plugin to a normal page and then again to the plugin
caused problems since the HWND pointer was changed…

Anyway I don’t see problems to do a .scr win32 screensaver with SDL, I
think you can do also X screensavers with some more efforts. The problem
is when you need multiple windows in the same process.

Bye,
Gabry


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

The right way, no… It cannot be this way.

WinMain does not treat screensaver preview…

When you did this (rename an EXE, as SCR) and
try to run, it does not work well in screensaver
config dialog.

Try this and see for yourself.

Florian Hufsky wrote:> as i know a windows screensaver can also be just a renamed .exe file (entry

point is still winmain).

----- Original Message -----
From: “Herbert G. Fischer” <@Herbert_G_Fischer>
To:
Sent: Thursday, June 26, 2003 3:46 PM
Subject: Re: [SDL] Re: Embedding SDL within a browser, e.g. Flash

The main problem I saw in use SDL to do a screensaver is
that SDL overrides main function, and a Windows screensaver
has a different entry point (at least in source code).

It does not use WinMain as start point, but another function.

s,

Herbert

Gabriele Greco wrote:

Herbert G. Fischer wrote:

Some weeks ago I tryed to make a screensaver with SDL
and I found no way. Maybe I didn’t tryed the right way
but I think that SDL cannot be used to do this “hacks”.

Yes. What I was asking is, would the SDL.DLL have to be modified to
be the
ActiveX component, or would the application that links to SDL be the
ActiveX
component ? Since SDL has the window context, I would assume that SDL
would
have to be the ActiveX component ?

I’ve written an activex with SDL but it had so much problem that i
reverted to windib code.

The main problem is that the SDL_WINDOWID hack is applied in the
SDL_Init() function, and the fact SDL can have only a window for each
thread, the plugin worked correctly only in the first instance, just
doubling the browser window caused it to crash, also switching from a
page with the plugin to a normal page and then again to the plugin
caused problems since the HWND pointer was changed…

Anyway I don’t see problems to do a .scr win32 screensaver with SDL, I
think you can do also X screensavers with some more efforts. The problem
is when you need multiple windows in the same process.

Bye,
Gabry


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

ok, didn’t know!> ----- Original Message -----

From: nospam@pontoip.com.br (Herbert G. Fischer)
To:
Sent: Thursday, June 26, 2003 5:10 PM
Subject: Re: [SDL] Re: Embedding SDL within a browser, e.g. Flash

The right way, no… It cannot be this way.

WinMain does not treat screensaver preview…

When you did this (rename an EXE, as SCR) and
try to run, it does not work well in screensaver
config dialog.

Try this and see for yourself.

Florian Hufsky wrote:

as i know a windows screensaver can also be just a renamed .exe file
(entry
point is still winmain).

----- Original Message -----
From: “Herbert G. Fischer”
To:
Sent: Thursday, June 26, 2003 3:46 PM
Subject: Re: [SDL] Re: Embedding SDL within a browser, e.g. Flash

The main problem I saw in use SDL to do a screensaver is
that SDL overrides main function, and a Windows screensaver
has a different entry point (at least in source code).

It does not use WinMain as start point, but another function.

s,

Herbert

Gabriele Greco wrote:

Herbert G. Fischer wrote:

Some weeks ago I tryed to make a screensaver with SDL
and I found no way. Maybe I didn’t tryed the right way
but I think that SDL cannot be used to do this “hacks”.

Yes. What I was asking is, would the SDL.DLL have to be modified to
be the
ActiveX component, or would the application that links to SDL be the
ActiveX
component ? Since SDL has the window context, I would assume that SDL
would
have to be the ActiveX component ?

I’ve written an activex with SDL but it had so much problem that i
reverted to windib code.

The main problem is that the SDL_WINDOWID hack is applied in the
SDL_Init() function, and the fact SDL can have only a window for each
thread, the plugin worked correctly only in the first instance, just
doubling the browser window caused it to crash, also switching from a
page with the plugin to a normal page and then again to the plugin
caused problems since the HWND pointer was changed…

Anyway I don’t see problems to do a .scr win32 screensaver with SDL, I
think you can do also X screensavers with some more efforts. The
problem
is when you need multiple windows in the same process.

Bye,
Gabry


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Herbert G. Fischer wrote:

The right way, no… It cannot be this way.

WinMain does not treat screensaver preview…

When you did this (rename an EXE, as SCR) and
try to run, it does not work well in screensaver
config dialog.

Try this and see for yourself.

you can do it this way, windows runs you screensaver with different
commandline arguments so you can handle preview etc. and a window handle
see:

but it is a question if you can use this with SDL

AFAIK, it does in a real screensaver. There are some screensaver
specific command line switches you have to support.

Can’t remember the details, but it shouldn’t be too hard to find info
on the 'net. (At least, I managed to find it somewhere when I was
playing some with Delphi and screensavers a good while ago.)

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Thursday 26 June 2003 17.10, Herbert G. Fischer wrote:

The right way, no… It cannot be this way.

WinMain does not treat screensaver preview…

I think not…

I’m telling you because I already tryed to do a OpenGL
(without SDL) screensaver, using common WinMain and it
does not work correctly, as a screensaver must work
in screensaver config dialog. Instead, I learned how
to use Windows Screen Saver API, and… voil?..

Windows manages display context for screensaver, so,
when displaying the small preview inside the virtual
monitor on the screensaver config dialog, Windows treats
context, size, etc, to be inside that “virtual” monitor.

When using WinMain, this “feature” does not work, and
when selecting a screensaver on that dialog, it runs
the screensaver as fullscreen… arghh…

It’s hard to explain… Get a OpenGL non screensaver demo,
rename to SCR, put on SystemDir and try to configure Windows
to use it…

Maybe there are some way to hack WinMain to do what Windows’s
scrnlib does, but… If Microsoft gave us an API just for
Screensavers… there is some justification.

I’ll try to mix ScrMain with main sometime and see what I
can get…

Possibly, I’ll manage to patch SDL to support ScrMain.

David Olofson wrote:> On Thursday 26 June 2003 17.10, Herbert G. Fischer wrote:

The right way, no… It cannot be this way.

WinMain does not treat screensaver preview…

AFAIK, it does in a real screensaver. There are some screensaver
specific command line switches you have to support.

Can’t remember the details, but it shouldn’t be too hard to find info
on the 'net. (At least, I managed to find it somewhere when I was
playing some with Delphi and screensavers a good while ago.)

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Herbert G. Fischer wrote:

I think not…

I’m telling you because I already tryed to do a OpenGL
(without SDL) screensaver, using common WinMain and it
does not work correctly, as a screensaver must work
in screensaver config dialog. Instead, I learned how
to use Windows Screen Saver API, and… voil?..

Windows manages display context for screensaver, so,
when displaying the small preview inside the virtual
monitor on the screensaver config dialog, Windows treats
context, size, etc, to be inside that “virtual” monitor.

When using WinMain, this “feature” does not work, and
when selecting a screensaver on that dialog, it runs
the screensaver as fullscreen… arghh…

see my previous post, windows tells you handle of the preview window so
there aren’t problems with this. i haven’t OpenGL example but you can
look at this allegro example:

which behaves absolutely correctly although it uses WinMain

Maybe there are some way to hack WinMain to do what Windows’s
scrnlib does, but… If Microsoft gave us an API just for
Screensavers…

from the url i’ve send in my previous post:
“Windows communicates with Screen Savers through command line arguments.
The ScrnSave.lib library handles this for Screen Savers that are written
to use it, but other Win32 Screen Savers marked 4.0 or higher must
handle the following command line arguments:”