Skip to content

Commit 52cd3b6

Browse files
committed
- add stubs for mobile apis
1 parent 0490d84 commit 52cd3b6

3 files changed

Lines changed: 240 additions & 0 deletions

File tree

core/pen/source/linux/os.cpp

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,4 +637,84 @@ namespace pen
637637
{
638638
return pen_user_info;
639639
}
640+
641+
Str os_get_cache_data_directory()
642+
{
643+
return "";
644+
}
645+
646+
bool os_delete_directory(const Str& filename)
647+
{
648+
return false;
649+
}
650+
651+
void os_enable_background_audio(bool enabled)
652+
{
653+
}
654+
655+
void os_haptic_selection_feedback()
656+
{
657+
}
658+
659+
void os_show_on_screen_keyboard(bool show)
660+
{
661+
}
662+
663+
bool os_set_keychain_item(const Str& identifier, const Str& key, const Str& value)
664+
{
665+
return false;
666+
}
667+
668+
Str os_get_keychain_item(const Str& identifier, const Str& key)
669+
{
670+
return "";
671+
}
672+
673+
bool os_is_backgrounded()
674+
{
675+
return false;
676+
}
677+
678+
void os_register_background_callback(void (*callback)(bool))
679+
{
680+
}
681+
682+
bool os_require_audio_reinit(bool reset)
683+
{
684+
return false;
685+
}
686+
687+
Str os_get_clipboard_string()
688+
{
689+
return "";
690+
}
691+
692+
void os_clear_clipboard_string()
693+
{
694+
}
695+
696+
void os_enable_paste_popup(bool enable)
697+
{
698+
}
699+
700+
bool os_tapped()
701+
{
702+
return false;
703+
}
704+
705+
void music_enable_remote_control(const music_player_remote& fns)
706+
{
707+
}
708+
709+
void music_set_now_playing(const Str& artist, const Str& album, const Str& track)
710+
{
711+
}
712+
713+
void music_set_now_playing_artwork(void* data, u32 w, u32 h, u32 bpp, u32 row_pitch)
714+
{
715+
}
716+
717+
void music_set_now_playing_time_info(u32 position_ms, u32 duration_ms)
718+
{
719+
}
640720
} // namespace pen

core/pen/source/osx/os.mm

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,86 @@ f32 os_get_status_bar_portrait_height()
858858
{
859859
return 0.0f;
860860
}
861+
862+
Str os_get_cache_data_directory()
863+
{
864+
return "";
865+
}
866+
867+
bool os_delete_directory(const Str& filename)
868+
{
869+
return false;
870+
}
871+
872+
void os_enable_background_audio(bool enabled)
873+
{
874+
}
875+
876+
void os_haptic_selection_feedback()
877+
{
878+
}
879+
880+
void os_show_on_screen_keyboard(bool show)
881+
{
882+
}
883+
884+
bool os_set_keychain_item(const Str& identifier, const Str& key, const Str& value)
885+
{
886+
return false;
887+
}
888+
889+
Str os_get_keychain_item(const Str& identifier, const Str& key)
890+
{
891+
return "";
892+
}
893+
894+
bool os_is_backgrounded()
895+
{
896+
return false;
897+
}
898+
899+
void os_register_background_callback(void (*callback)(bool))
900+
{
901+
}
902+
903+
bool os_require_audio_reinit(bool reset)
904+
{
905+
return false;
906+
}
907+
908+
Str os_get_clipboard_string()
909+
{
910+
return "";
911+
}
912+
913+
void os_clear_clipboard_string()
914+
{
915+
}
916+
917+
void os_enable_paste_popup(bool enable)
918+
{
919+
}
920+
921+
bool os_tapped()
922+
{
923+
return false;
924+
}
925+
926+
void music_enable_remote_control(const music_player_remote& fns)
927+
{
928+
}
929+
930+
void music_set_now_playing(const Str& artist, const Str& album, const Str& track)
931+
{
932+
}
933+
934+
void music_set_now_playing_artwork(void* data, u32 w, u32 h, u32 bpp, u32 row_pitch)
935+
{
936+
}
937+
938+
void music_set_now_playing_time_info(u32 position_ms, u32 duration_ms)
939+
{
940+
}
861941
}
862942

863943
//

core/pen/source/win32/os.cpp

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,86 @@ namespace pen
489489
static hash_id window_id = PEN_HASH(pen_window.window_title);
490490
return window_id;
491491
}
492+
493+
Str os_get_cache_data_directory()
494+
{
495+
return "";
496+
}
497+
498+
bool os_delete_directory(const Str& filename)
499+
{
500+
return false;
501+
}
502+
503+
void os_enable_background_audio(bool enabled)
504+
{
505+
}
506+
507+
void os_haptic_selection_feedback()
508+
{
509+
}
510+
511+
void os_show_on_screen_keyboard(bool show)
512+
{
513+
}
514+
515+
bool os_set_keychain_item(const Str& identifier, const Str& key, const Str& value)
516+
{
517+
return false;
518+
}
519+
520+
Str os_get_keychain_item(const Str& identifier, const Str& key)
521+
{
522+
return "";
523+
}
524+
525+
bool os_is_backgrounded()
526+
{
527+
return false;
528+
}
529+
530+
void os_register_background_callback(void (*callback)(bool))
531+
{
532+
}
533+
534+
bool os_require_audio_reinit(bool reset)
535+
{
536+
return false;
537+
}
538+
539+
Str os_get_clipboard_string()
540+
{
541+
return "";
542+
}
543+
544+
void os_clear_clipboard_string()
545+
{
546+
}
547+
548+
void os_enable_paste_popup(bool enable)
549+
{
550+
}
551+
552+
bool os_tapped()
553+
{
554+
return false;
555+
}
556+
557+
void music_enable_remote_control(const music_player_remote& fns)
558+
{
559+
}
560+
561+
void music_set_now_playing(const Str& artist, const Str& album, const Str& track)
562+
{
563+
}
564+
565+
void music_set_now_playing_artwork(void* data, u32 w, u32 h, u32 bpp, u32 row_pitch)
566+
{
567+
}
568+
569+
void music_set_now_playing_time_info(u32 position_ms, u32 duration_ms)
570+
{
571+
}
492572
} // namespace pen
493573

494574
INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow)

0 commit comments

Comments
 (0)