Docs

Html versions of the new docs are at http://sdldoc.sourceforge.net. Please
report errors and gibberish to me at akawaka at csn.ul.ie. Do NOT post to the
list about this. Any errors that are reported on the list will be
pointedly ignored.

Martin–
Bother! said Pooh, as Mulder and Scully rushed in, guns drawn.

There is a consistent error in the SDL2 event docs: it regularly
says a field is int, when the header file says Sint32.–
john skaller
@john_skaller
http://felix-lang.org

The wiki in libsdl.org is community driven, so it is quite possible you can find outdated information there

Even so, int and Sint32 don’t have much of a difference :slight_smile:

?
?Sent from Mailbox for iPhone

Well yeah, on practically all platforms SDL supports right now, int
and SInt32 are exactly the same (also int32_t), to the point that most
likely it will compile even if you do something that requires an exact
type match. The wiki should be updated to match the actual code
though.

Please feel free to correct it!
Just send me your desired wiki username and password and I’ll hook you up
with wiki access.

Cheers!On Tue, Jun 11, 2013 at 6:34 AM, john skaller <skaller at users.sourceforge.net wrote:

There is a consistent error in the SDL2 event docs: it regularly
says a field is int, when the header file says Sint32.


john skaller
skaller at users.sourceforge.net
http://felix-lang.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Please feel free to correct it!

I’m curious because it looks generated rather than hand written,
judging by the header file.On 12/06/2013, at 1:39 AM, Sam Lantinga wrote:


john skaller
@john_skaller
http://felix-lang.org

[This is a long post of little interest to C devs]On 12/06/2013, at 12:04 AM, Sik the hedgehog wrote:

Well yeah, on practically all platforms SDL supports right now, int
and SInt32 are exactly the same (also int32_t), to the point that most
likely it will compile even if you do something that requires an exact
type match. The wiki should be updated to match the actual code
though.

It matters creating bindings. Even in C++.

I would vote to get rid of Sint32 and just bite the bullet
and mandate sint32_t. But then I’m not stuck with a
broken C compiler. Some people (including potential
clients of my system) may be.


john skaller
@john_skaller
http://felix-lang.org

You mean int32_t, not sint32_t, I presume?

ABI-wise it shouldn’t be an issue since the types would be exactly the
same at machine language, but given several functions return the SDL
types, I expect several programs using them at the source level to
host those return values (for the sake of consistency). Personally I
wouldn’t be affected (I just use the stdint types), but I can see how
it can be an issue, even if it would be mostly a massive search and
replace. Maybe there could be a macro or header file for this.

The other issue is Visual Studio 2008 (Microsoft added stdint.h in
2010). Not sure if SDL still has to support that version. Of course we
could just tell programmers to just get a stdint.h from elsewhere
(which may be a good idea outside SDL anyway), or even bundle one if
needed.

Do iOS or Android lack stdint.h? Doubt so, but it’d be nice to make sure.

2013/6/11, john skaller :> [This is a long post of little interest to C devs]

On 12/06/2013, at 12:04 AM, Sik the hedgehog wrote:

Well yeah, on practically all platforms SDL supports right now, int
and SInt32 are exactly the same (also int32_t), to the point that most
likely it will compile even if you do something that requires an exact
type match. The wiki should be updated to match the actual code
though.

It matters creating bindings. Even in C++.

I would vote to get rid of Sint32 and just bite the bullet
and mandate sint32_t. But then I’m not stuck with a
broken C compiler. Some people (including potential
clients of my system) may be.


john skaller
skaller at users.sourceforge.net
http://felix-lang.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No, it’s hand-written.On Tue, Jun 11, 2013 at 2:10 PM, john skaller <skaller at users.sourceforge.net wrote:

On 12/06/2013, at 1:39 AM, Sam Lantinga wrote:

Please feel free to correct it!

I’m curious because it looks generated rather than hand written,
judging by the header file.


john skaller
skaller at users.sourceforge.net
http://felix-lang.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  • Android seems to have had stdint.h since the NDK 1.6 r1 (i.e.
    probably since the beginning).
  • iOS has had stdint.h since, apparently, the 3.0 SDK. I can confirm
    that it is contained in the iOS 5.0 SDK.

Cheers,
~~ OndraOn Wed, Jun 12, 2013 at 5:19 AM, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

Do iOS or Android lack stdint.h? Doubt so, but it’d be nice to make sure.

[This should go on the documentation list but I’m not a member yet,
perhaps someone can cross post for me?]On 12/06/2013, at 1:25 PM, Sam Lantinga wrote:

No, it’s hand-written.
On Tue, Jun 11, 2013 at 2:10 PM, john skaller <@john_skaller> wrote:

I’m curious because it looks generated rather than hand written,
judging by the header file.

I’ve been comparing my tarball headers (mainly SDL_event.h) with the
Wiki docs and the Wiki is WAY out!

For example it seems these are documented:

// Tablet or multiple mice input 
SDL_INPUTMOTION,
SDL_INPUTBUTTONDOWN,
SDL_INPUTBUTTONUP,
SDL_INPUTWHEEL,
SDL_PROXIMITYIN,
SDL_PROXIMITYOUT,

but don’t exist. And these exist but aren’t documented:

/* Game controller events */
SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */
SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed */
SDL_CONTROLLERBUTTONUP,            /**< Game controller button released */
SDL_CONTROLLERDEVICEADDED,         /**< A new Game controller has been inserted into the system */
SDL_CONTROLLERDEVICEREMOVED,       /**< An opened Game controller has been removed */
SDL_CONTROLLERDEVICEREMAPPED,      /**< The controller mapping was updated */

It looks like the source code is Doxygen commented.

IMHO a Wiki is a good way to add notes, examples, etc to official docs,
but it’s a horrible way to provide core documentation. There’s more work
keeping it right than developing the source code :slight_smile:

Of course the “right” way is to write the specs and make the code
implement them …

[Actually there is technology that does all this stuff properly,
namely literate programming. But it isn’t popular, perhaps because
it doesn’t play well with existing IDE’s]


john skaller
@john_skaller
http://felix-lang.org

Yup, please feel free to update the documentation!

We actually use doxygen to generate documentation from the SDL headers, but
we don’t have any way of importing that into the moinmoin wiki, and felt it
was extremely valuable to be able to have notes right there with the
official documentation.

The only problem is, as you mentioned, keeping it up to date.On Wed, Jun 12, 2013 at 5:42 PM, john skaller <skaller at users.sourceforge.net wrote:

[This should go on the documentation list but I’m not a member yet,
perhaps someone can cross post for me?]

On 12/06/2013, at 1:25 PM, Sam Lantinga wrote:

No, it’s hand-written.
On Tue, Jun 11, 2013 at 2:10 PM, john skaller < skaller at users.sourceforge.net> wrote:

I’m curious because it looks generated rather than hand written,
judging by the header file.

I’ve been comparing my tarball headers (mainly SDL_event.h) with the
Wiki docs and the Wiki is WAY out!

For example it seems these are documented:

// Tablet or multiple mice input
SDL_INPUTMOTION,
SDL_INPUTBUTTONDOWN,
SDL_INPUTBUTTONUP,
SDL_INPUTWHEEL,
SDL_PROXIMITYIN,
SDL_PROXIMITYOUT,

but don’t exist. And these exist but aren’t documented:

/* Game controller events */
SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */
SDL_CONTROLLERBUTTONDOWN,          /**< Game controller button pressed

*/
SDL_CONTROLLERBUTTONUP, /< Game controller button
released */
SDL_CONTROLLERDEVICEADDED, /
< A new Game controller has been
inserted into the system */
SDL_CONTROLLERDEVICEREMOVED, /< An opened Game controller has
been removed */
SDL_CONTROLLERDEVICEREMAPPED, /
< The controller mapping was
updated */

It looks like the source code is Doxygen commented.

IMHO a Wiki is a good way to add notes, examples, etc to official docs,
but it’s a horrible way to provide core documentation. There’s more work
keeping it right than developing the source code :slight_smile:

Of course the “right” way is to write the specs and make the code
implement them …

[Actually there is technology that does all this stuff properly,
namely literate programming. But it isn’t popular, perhaps because
it doesn’t play well with existing IDE’s]


john skaller
skaller at users.sourceforge.net
http://felix-lang.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org