![]() ![]() Here is a description of arguments that many of your plugin's functions will need to accept. This includes private functions (ones not used by Tux Paint directly), unless you declare those as ' static'. Note: To avoid 'namespace' collisions, each function's name must start with the shared object's filename (e.g., "blur.so" or "blur.dll" would have functions whose names begin with " blur_"). 'Magic' tool plugins must contain the functions listed below. The C header file and command-line tool mentioned above are included with Tux Paint - or in some cases, as part of a "Tux Paint 'Magic' Tool Plugin Development package". Also, when you run the C compiler to build a plugin, you should use the command-line tool " tp-magic-config" to get the appropriate compiler flags (such as where the compiler can find the Tux Paint plugin header file, as well as SDL's header files) for building a plugin. Plugins should #include the C header file " tp_magic_api.h", which exposes the 'Magic' tool plugin API. A pointer to this structure gets passed along to the plugin's functions as an argument when Tux Paint invokes them. This is exposed as a C structure (or " struct") which contains pointers to functions and other data inside Tux Paint. In turn, Tux Paint provides a number of helper functions that the plugin may (or sometimes is required to) use. ![]() dll" files on Windows) and find the functions within. Tux Paint utilizes SDL's "SDL_LoadObject()" and "SDL_LoadFunction()" routines to load plugins (shared objects files e.g., ". Those who create 'Magic' tool plugins for Tux Paint must provide some interfaces (C functions) that Tux Paint may invoke. Familiarity with the SDL API is highly recommended, but some basic SDL concepts will be covered in this document. Therefore, for the moment at least, one must understand the C language and how to compile C-based programs. Tux Paint is written in the C programming language, and uses the Simple DirectMedia Layer library ('libSDL', or simply 'SDL' available from ). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |