[SDL] Any news about...?

Bob Pendleton bob at pendleton.com
Mon Sep 12 12:07:09 PDT 2005


On Mon, 2005-09-12 at 12:18 -0500, Bob Pendleton wrote:
> On Sat, 2005-09-10 at 21:11 -0700, Sam Lantinga wrote:
> > > -First one, what about the integration of glSDL on SDL? When we can download 
> > > SDL with glSDL included?
> > 
> > SDL 1.3
> > 
> > > -Second one, what about SDL 1.3? where I can download some white papers, 
> > > docs, source code or anything related to it?
> > 
> > SDL 1.3 is mostly in experimental phase with support for new things like glSDL,
> > audio input, etc.
> > 
> > > -Last one, what about SDL 2.0? a long time ago... I haven't listened 
> > > anything about it...
> > 
> > *grin*  Been busy with a job and a baby, but Bob Pendleton has put some
> > effort into working on the multiple-window concept, which was the core
> > feature for SDL 2.0.  I'm not sure what the status is at this point.
> 
> I'm not working on it right now. I started back on it in the summer and
> then decided to wait until 1.2.9 stabilized. On X I have support for
> multiple windows, each can have its own OpenGL context. I do not yet
> have support for subwindows. There are some assumptions built in to my
> current version that need to be changed. The feed back I got in August
> lets me back off of those assumptions. 
> 
> There are major changes in the set up code to get away from some of the
> most FAQ on the list. For example, SetVideoMode is now implemented in
> terms of other APIs. It will continue to work as it currently does. But,
> it is hoped that people will switch to using a create window API that
> will fail if you ask for a video mode not supported in hardware.

oops... Forgot to mention that all the event structures (that need them)
now have a window ID member so you can tell which window experienced the
event. That changes means that a version of SDL with these extensions
*can not* be binary compatible with older versions of SDL. Which tends
to force the changes to be made in SDL 2.0.

		Bob Pendleton

P.S.

I would love to be able to check my changes into cvs. 

> 
> Here is my latest API document:
> 
> SDL Multiple Window API
> Data Type
> struct SDL_PrivateWindow;
> typedef struct SDL_PrivateWindow *SDL_Window;
> 
> 
> SDL_Window SDL_OpenWindow(int width, int height, int bitsperpixel,
> Uint32 flags)
> 
> Create a new top level window. The flags may be any flags that are legal
> for a call to SDL_SetVideoMode() and are subject to the same
> restrictions. Unlike SDL_SetVideoMode() this function fails if the
> requested window is not supported by the hardware. The available video
> modes for a new window may be restricted by the video mode set for the
> first window. Returns NULL on failure. If a hardware or software surface
> is requested it must be retrieved by a call to SDL_GetWindowSurface(). 
> 
> 
> SDL_Surface *SDL_GetWindowSurface()
> 
> Get the video surface for the current hardware or software window. 
> 
> 
> SDL_Window SDL_OpenChildWindow(SDL_Window parent, int x, int y, int
> width, int height)
> 
> Create a child window of an existing window. The x and y location is
> relative to the upper left hand corner of the parent window. The child
> window will have the same depth and other properties as the parent
> window.
> 
> 
> void *SDL_GetWindowData(SDL_Window w)
> void *SDL_SetWindowData(SDL_Window w, void *data)
> 
> Store and retrieve the data stored with a window. This allows the
> programmer to associate data with a window.
> 
> 
> SDL_Window SDL_GetParentWindow(SDL_Window child)
> 
> Returns the window ID of the parent window. If the window is a top level
> window then it returns NULL;
> 
> 
> SDL_Window SDL_GetFirstChildWindow(SDL_Window parent, Uint32 *index)
> SDL_Window SDL_GetNextChildWindow(SDL_Window parent, Uint32 *index)
> 
> This functions are used to access the children of a specific window.
> They return the window ID of each child window. The order in which the
> are returned is not necessarily the order in which the were created and
> can change. Deleting or creating windows betweens calls to these
> functions can change the order and cause some children to be skipped.
> Both functions return NULL if all children have been examined. The index
> parameter contains state information used by these functions and allows
> them to be used in recursive functions that traverse a complete window
> tree. Under no circumstances should the index value be relied upon to
> have a specific value and it should never be changed by the programmer.
> 
> If NULL is passed as the parent parameter then these functions access
> the top level windows, i.e. the windows which have no parent.
> 
> Example:
> 
> SDL_Window w = NULL;
> Uint32 index;
> 
> for ( w = SDL_GetFirstChildWindow(parent, &index); 
>       w != NULL;
>       w = SDL_GetNextChildWindow(parent, &index) ) {
>    /* do something with w */
> }
> 
> void SDL_CloseWindow(SDL_Window w)
> 
> Removes a window from the screen and deletes everything associated with
> the window. Works on top level windows and on child windows. All but one
> top level window may be freed using this functions. Closing the last top
> level window is the same as calling SDL_VideoQuit();
> 
> 
> int SDL_SelectWindow(SDL_Window w)
> 
> Many SDL functions, especially the SDL_WM functions, SDL_Flip(),
> SDL_GL_SwapBuffers(), and all OpenGLfunctions, work only on the video
> window returned by SDL_SetVideoMode(). To avoid the need to create
> dozens of new functions SDL_SelectWindow() is used to select the current
> default window.
> 
> 
> int SDL_WM_RaiseWindow()
> 
> If possible, raise the window so that it is above all other windows. 
> 
> 
> int SDL_WM_LowerWindow()
> 
> If possible, lower the window so that it is lower all other windows. 
> 
> 
> int SDL_WM_HideWindow()
> int SDL_WM_ShowWindow()
> 
> These two functions are used to hide or display a window. This
> capability is particularly important for subwindows that are used for
> menus and pop ups. They make the current window disappear or appear on
> the screen. When a window is shown an expose event will be generated for
> that window. You may not hide the main window. The main window may be
> iconified but not hidden.
> 
> 
> int SDL_WM_DeiconifyWindow()
> Restore a window that has been iconified.
> 
> 
> int SDL_WM_MoveWindow(int x, int y)
> 
> Move the window to a new position. If it is a sub window the location is
> relative to the upper left hand corner of the parent window. If it is a
> top level window then it is moved relative to the upper left hand corner
> of the screen. This function may have no effect on top level windows
> because the window manager may override the request.
> 
> 
> int SDL_WM_ResizeWindow(int width, int height);
> 
> Change the windows size without changing anything else about the window.
> After calling this function the new video surface must be retrieved with
> a call to SDL_GetWindowSurface().
> 
> 
> 
> 
> 
> > 
> > 	-Sam Lantinga, Software Engineer, Blizzard Entertainment
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at libsdl.org
> > http://www.libsdl.org/mailman/listinfo/sdl
> > 
-- 
+--------------------------------------+
+ Bob Pendleton: writer and programmer +
+ email: Bob at Pendleton.com             +
+ web: www.GameProgrammer.com          +
+ www.Wise2Food.com                    +
+ nutrient info on 7,000+ common foods +
+--------------------------------------+





More information about the SDL mailing list