Rockbox Development > Starting Development and Compiling
Plugin_API
(1/1)
FirleFanz:
I have made a new folder myhelloworld in Pluginsfolder and inserted the helloworld sample, makefile and sourches. The plugin so works fine, where to find a plugin_api documentation?
my try is to write someting, but so nothing to see on the LCD
--- Code: ---char button[5]="Hello";
rb->lcd_puts(30,30,button);
--- End code ---
How to measure the textlength from "Hello"?
cool_walking_:
Not sure, but button should be 6 chars long in order to fit the terminating null character.
Also, I think you're supposed to alter the SUBDIRS file (not SOURCES) if your plugin has it's own directory.
EDIT: Evidently you need to alter both SUBDIRS and SOURCES.
EDIT: Hmm.. seems only rockboy does that.
EDIT: Aha:
--- Quote from: http://www.rockbox.org/twiki/bin/view/Main/HowtoWritePlugins ---Also, lcd_putsxy() is the only string-drawing GUI function where "x" and "y" are in pixel units. All of the others which take "x" and "y" arguments, like lcd_puts, lcd_puts_style, lcd_puts_scroll, etc., either use or try to approximate character-cell behavior. That is, the "x" parameter is the column, and the "y" parameter is the line.
--- End quote ---
nls:
The source code is the only real documentation there is... plugin.h contains prototypes for every function exported through the api, they are implemented in various places in the source tree.
If you want to have your plugin in a subdir you need to add that dir to SUBDIRS and create a Makefile inside that dir.
FirleFanz:
what are the differences between puts und putsxy
putsxy - works fine
puts - nothing happend
Edit for solution
puts needs a row Parameter
puts(collumn,row,String)
putsxy(x,y,String)
Navigation
[0] Message Index
Go to full version