Recently I needed to generate some simple procedural textures for a game I'm working on - after a quick search I found that the top result was licensed under the GPL which is no good to me. After a while I did find an MIT licensed one, but as all these code snippets are just C++ ports of Ken Perlin's improved noise function written in Java, I figured I might as well write my own from scratch and license it under the public domain. So, here it is, in all its glory:
Monday 26 May 2014
Tuesday 20 May 2014
Writing a C++ Completion Provider for GtkSourceView
Over the last few weeks I've been implementing Python code completion in my homebrew text editor. After a lot of work I have most of the backend code worked out, the file parsing and indexing generally works.
The next step was to create a CompletionProvider to tell the Gtk+ text view about any suggestions that my code completion engine had. In my mind, I just had to do the following:
The next step was to create a CompletionProvider to tell the Gtk+ text view about any suggestions that my code completion engine had. In my mind, I just had to do the following:
- Subclass CompletionProvider, implement the populate() function
- Call view().get_completion()->add_provider(my_provider);
- Wallow in the joy of having working code completion
Subscribe to:
Posts (Atom)