[AD] x11 resizing

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I know this was previously rejected because it is 4.3 material, but
anyway, here's a quick and dirty hack to make Allegro 4.2 windows
resizable under X11, as I need this myself, and using 4.3 currently
seemed to be more work.

It adds a function "set_resize_callback" to the API. Once you call it,
the current window is changed to be resizable. Whenever it is resized,
the given callback is called by Allegro. Inside the callback, you are
supposed to set a flag to true. Then in the main thread at a location
where you are prepared for it, call another function "resize_screen",
which will replace the screen bitmap with a version as big as the
current window.

I modified ex12bit to be resizable, it shows how to use it.

If there's interest of applying it to SVN, would need to:
- Clean up the patch.
- Implement Windows and OSX versions.
- Figure out backwards compatibility (could a 4.2.2 contain a changed
system driver vtable? Maybe if new members are somehow moved to the end
of the struct?)

-- 
Elias Pschernig

Attachment: xresize.diff.gz
Description: GNU Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/