I wrote a little “hello sdl” program in Brackets. It shows how to use the SDL module. It just opens a small window with a button gadget in it.
If you click on “OK” it will close the window and exit.

hello SDL

The full program with comments is here: (lib/sdl-hello.l1com)

// sdl-hello.l1com
//
// SDL simple window/button demo
//
#include <intr-func.l1h>
(main func)
    (set int64 1 zero 0)
    (set int64 1 one 1)
    (set int64 1 sdl_mod 0)
    (set int64 1 string_mod 1)

    // SDL screen
    (set int64 1 width 300)
    (set int64 1 height 200)
    (set int64 1 width_b 299)
    (set int64 1 height_b 199)
    (set int64 1 bit 32)

    // background color
    (set byte 1 back_r 143)
    (set byte 1 back_g 147)
    (set byte 1 back_b 151)
    (set byte 1 alpha 255)
    // black color
    (set byte 1 black 0)

    // hello text
    (set int64 1 hello_x 94)
    (set int64 1 hello_y 60)
    (set string s hellostr "Hello world!")

    // number of gadgets
    (set int64 1 gadgets 1)

    // ok gadget
    (set int64 1 ok_gadget 0)
    (set string s ok_gadgetstr "   OK   ")
    (set int64 1 ok_gadget_x 94)
    (set int64 1 ok_gadget_y 120)
    (set int64 1 ok_gadget_status 1)

    // font
    (set string s fontnamestr "fonts/free/FreeMono.ttf")
    (set int64 1 fontsize 16)

    // gadget event
    (set int64 1 gadget_sel 0)
    (set string 256 gadget_retstr "")
    (set int64 1 ret 0)
    (set int64 1 value)
    (set int64 1 f 0)

    (set string s sdl_init_errorstr "error: can't open window!")

    // open screen
    (sdl_mod width height bit zero :sdl_open_screen !)
    (ret stpop)
    (((ret zero !=) f =) f if)
        (sdl_init_errorstr :print_s !)
        (:print_n !)
        (one :exit !)
    (endif)

    // init string module
    (string_mod :string_init !)

    // load font
    (fontnamestr fontsize :sdl_font_ttf !)

    // set number of gadgets in window
    (gadgets :init_gui !)

    // set background color
    (zero zero width_b height_b back_r back_g back_b alpha :sdl_rectangle_fill !)

    // set ok gadget button
    (ok_gadget ok_gadget_x ok_gadget_y ok_gadgetstr ok_gadget_status :set_gadget_button !)

    // set hello world text
    (hello_x hello_y black black black hellostr :sdl_text_ttf !)

    // event loop
    (:loop)
    (:sdl_update !)
    (gadget_retstr :gadget_event !)
    (ret stpopi)
    (value stpopi)
    (gadget_sel stpopi)
    print_i (gadget_sel)
    (((gadget_sel zero ==) f =) f if)
        (:sdl_quit !)
        (string_mod :free_mod !)
        (sdl_mod :free_mod !)
        (zero :exit !)
    (endif)
    (:loop jmp)
(funcend)

#include <sdl-lib.l1h>
#include <string.l1h>

To set the text and the button gadget only one line is needed. After all the variables are defined.
Have fun!