webui/examples/C
Hassan DRAGA b0dd088d56 Examples rename (webui.js) path to (/webui.js)
* All examples should use `/webui.js` instead of `webui.js`, this is because without the slash `/` it won't work if HTML file is located in a sub-folder.
2024-06-25 13:03:44 -04:00
..
call_c_from_js Rename Example IDs - call_c_from_js 2024-06-19 08:29:48 -04:00
call_js_from_c Rename Example IDs - call_js_from_c 2024-06-19 08:22:50 -04:00
custom_web_server Rename Example IDs - custom_web_server 2024-06-18 18:55:54 -04:00
minimal Linux - C Adding -LDL lib 2024-06-05 09:09:59 -04:00
public_network_access Linux - C Adding -LDL lib 2024-06-05 09:09:59 -04:00
serve_a_folder Examples rename (webui.js) path to (/webui.js) 2024-06-25 13:03:44 -04:00
text-editor Rename Example IDs - text-editor 2024-06-18 12:28:34 -04:00
README.md C99 to C 2023-10-28 19:51:02 -04:00

WebUI C Examples

Examples of how to create a WebUI application in C.

C Examples

The only requirement to build the examples is a C compiler.

  • minimal: Creates a minimal WebUI application.
  • call_c_from_js: Calls C from JavaScript.
  • call_js_from_c: Calls JavaScript from C.
  • serve_a_folder: Use WebUI to serve a folder that contains .html, .css, .js, or .ts files.
  • custom_web_server: Use your preferred web server like NGINX/Apache... with WebUI to serve a folder.

To build an example, cd into its directory and run the make command.

  • Windows

    # GCC
    mingw32-make
    
    # MSVC
    nmake
    
  • Linux

    # GCC
    make
    
    # Clang
    make CC=clang
    
  • macOS

    make
    

Additional Examples

  • text-editor: A lightweight and portable text editor written in C using WebUI as the GUI library.