Created
August 18, 2013 06:12
-
-
Save phardy/6260160 to your computer and use it in GitHub Desktop.
Revisions
-
phardy created this gist
Aug 18, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #include "pebble_os.h" #include "pebble_app.h" #include "pebble_fonts.h" #define MY_UUID { 0x92, 0x40, 0x44, 0xC0, 0xCA, 0x8A, 0x43, 0x64, 0x9D, 0xDE, 0x11, 0x33, 0x6F, 0x04, 0xA9, 0x3F } PBL_APP_INFO(MY_UUID, "strtol test", "Your Company", 1, 0, /* App version */ DEFAULT_MENU_ICON, APP_INFO_STANDARD_APP); Window window; TextLayer textlayer; void handle_init(AppContextRef ctx) { window_init(&window, "Window Name"); window_stack_push(&window, true /* Animated */); text_layer_init(&textlayer, GRect(10, 10, 100, 100)); layer_add_child(&window.layer, &textlayer.layer); text_layer_set_text(&textlayer, "calling strtol"); char numstr[] = "37"; long mynum; mynum = strtol(numstr, NULL, 10); text_layer_set_text(&textlayer, "done"); } void pbl_main(void *params) { PebbleAppHandlers handlers = { .init_handler = &handle_init }; app_event_loop(params, &handlers); }