next up previous contents
Next: The Future Up: For Hackers... Previous: Extra Macros   Contents

HTML Mode

Probably the easiest part of GTKeyboard to hack on is to add HTML items. If you're interested, check out html_mode.c where you can add all of the new HTML tags that you want. You then have to edit master.h and edit the menu structure to include whatever function you put in there. If you're familiar with item factories, it's criminally simple. The same goes for shortcuts.c which I would like to see more shortcuts in. Basically when I code, I put in what I think people can use, and if anybody sends me a suggestion that gets put in to. In html_mode.c I use the function vanilla(char *input) which inserts into output_text heavily. That way, if I find I wanna redirect things later, I make some simple changes to vanilla and change where everything goes. Also I provided cursor_left_x_times(int whatever) so that you could repeat cursor_left() without having to set up for loops and extra variables. Just pass it the strlen(something) where something is usually the closing HTML tag. (html_mode.c has 1000 examples)



David Allen 2001-04-26