1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00

Added documentation for the ctr.hid, ctr.ptm, ctr.news and ctr.gfx.texture

This commit is contained in:
Firew0lf 2015-09-13 14:39:12 +02:00
parent ab06123f7a
commit 070a0d698e
4 changed files with 263 additions and 3 deletions

View file

@ -1,3 +1,8 @@
/***
The `news` module.
@module ctr.news
@usage local news = require("ctr.news")
*/
#include <3ds/types.h>
#include <3ds/util/utf.h>
#include <3ds/services/news.h>
@ -5,12 +10,24 @@
#include <lua.h>
#include <lauxlib.h>
/***
Initialize the news module.
@function init
*/
static int news_init(lua_State *L) {
newsInit();
return 0;
}
/***
Send a notification to the user. WIP, do not use !!!
@function notification
@tparam string title title of the notification
@tparam string message message of the notification
@tparam string imageData data from a JPEG image (content of a file) or raw data
@tparam[OPT=false] boolean jpeg set to `true` if the data is from a JPEG file
*/
static int news_notification(lua_State *L) {
const char *title = luaL_checkstring(L, 1);
const char *message = luaL_checkstring(L, 2);
@ -33,6 +50,10 @@ static int news_notification(lua_State *L) {
return 0;
}
/***
Disable the news module.
@function shutdown
*/
static int news_shutdown(lua_State *L) {
newsExit();