One additional note. You will probably need to wrap `libgimp/gimp.h`. This is 
because when you start porting the other functions, you will start referring to 
variables, types and functions defined through that header.

For example, if you want to implement the `query` function in nim, it will be 
something like: 
    
    
    proc query() {.exportc.} =
      var args*: UncheckedArray[GimpParamDef] = [[GIMP_PDB_INT32,    
"run-mode", "Run mode"],
                                                 [GIMP_PDB_IMAGE,    "image",   
 "Input image"], [GIMP_PDB_DRAWABLE, "drawable", "Input drawable"]]
      
      gimp_install_procedure(
        "plug-in-myblur4",
        "My blur 4 (NIM)",
        "Blurs the image",
        "Mantielero",
        "Copyright David Neary",
        "2004",
        "_My blur 4 (NIM)",
        "RGB*, GRAY*",
        GIMP_PLUGIN,
        G_N_ELEMENTS (args), 0,
        args, nil)
      
      gimp_plugin_menu_register ("plug-in-myblur4",
                                 "<Image>/Filters/Blur")
    
    
    Run

but this will fail because `GimpParamDef` is undefined.

In order to wrap that header, take a look to 
[Nimterop](https://github.com/nimterop/nimterop). There is plenty of info in 
the forum regarding libraries wrapping.

Reply via email to