Xfce Forum

Sub domains

You are not logged in.

#1 2023-10-08 19:03:30

Registered: 2021-06-29
Posts: 12

Mousepad Code Documentation

I know it's not *really* meant to be used for this, but I use Mousepad as my main text editor for editing code, my notes (markdown) and basically everything else. Given I use it quite a lot, there are some things I would like the change about it (such as adding basic autocomplete, more advanced keyboard shortcuts or a sidebar with a list of open files). I don't want to spend ages bugging the devs to all all this, as they say on the GitLab that it's not meant to be a development editor. I figure it's open source, I can just modify my own version.
I have programmed in C with GTK before, and have a basic understanding of how it works, my only issue is Mousepad has a lot of code, and it's really hard to understand what each part does in "the big picture" when just looking at the files. Is there any code documentation anywhere, or just an outline of how the program works?
I know Mousepad does have some plugins (at the moment just the GSpell one and a keyboard shortcut editor). Are there any guides to making a Mousepad plugin?


#2 2023-10-08 19:39:40

Registered: 2020-12-31
Posts: 232

Re: Mousepad Code Documentation

No, there is no documentation of the code other than that contained in the source files. The file names generally indicate quite explicitly what they correspond to in the interface, then you have to dig into the code to familiarize yourself with it, of course.

For plugins, there's a skeleton plugin to serve as a starting point, and plugins already written can be used as examples (the test plugin is separate and can be left aside).

Note that you'll need all the Mousepad code to build your plugin, as the headers are not installed. We've never gone so far as to actually expose an API for writing plugins, choosing which headers should be installed and documenting this properly.


Board footer

Powered by FluxBB