Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Plugin_API
« previous next »
  • Print
Pages: [1]

Author Topic: Plugin_API  (Read 1527 times)

Offline FirleFanz

  • Member
  • *
  • Posts: 25
Plugin_API
« on: October 01, 2008, 02:21:09 PM »
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: [Select]
char button[5]="Hello";
rb->lcd_puts(30,30,button);
How to measure the textlength from "Hello"?
Logged

Offline cool_walking_

  • Rockbox Expert
  • Member
  • *
  • Posts: 695
Re: Plugin_API
« Reply #1 on: October 01, 2008, 08:59:34 PM »
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.
« Last Edit: October 02, 2008, 12:57:34 AM by cool_walking_ »
Logged

Offline nls

  • Developer
  • Member
  • *
  • Posts: 460
Re: Plugin_API
« Reply #2 on: October 02, 2008, 06:53:16 AM »
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.
Logged

Offline FirleFanz

  • Member
  • *
  • Posts: 25
Re: Plugin_API
« Reply #3 on: October 02, 2008, 10:45:46 AM »
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)
« Last Edit: October 02, 2008, 11:06:50 AM by FirleFanz »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Plugin_API
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.344 seconds with 16 queries.