mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-29 17:28:42 +00:00
OpenHarmony: file selection
This commit is contained in:
parent
a48cde983f
commit
9f5452fe86
4 changed files with 79 additions and 12 deletions
|
|
@ -11,6 +11,8 @@
|
|||
#include "napi/native_api.h"
|
||||
#include "SDL3/SDL_log.h"
|
||||
#include "SDL3/SDL_hints.h"
|
||||
#include "SDL3/SDL_power.h"
|
||||
#include "SDL3/SDL_dialog.h"
|
||||
#include <GLES2/gl2.h>
|
||||
#include <stdlib.h>
|
||||
#include <thread>
|
||||
|
|
@ -18,6 +20,7 @@
|
|||
#include <vulkan/vulkan_core.h>
|
||||
#include <ohaudio/native_audiorenderer.h>
|
||||
#include <ohaudio/native_audiostreambuilder.h>
|
||||
#include <fstream>
|
||||
|
||||
static napi_value Add(napi_env env, napi_callback_info info)
|
||||
{
|
||||
|
|
@ -119,8 +122,6 @@ int main()
|
|||
SDL_Log("sdl error: %s", SDL_GetError());
|
||||
SDL_Window* win = SDL_CreateWindow("test", 1024, 1024, SDL_WINDOW_OPENGL);
|
||||
|
||||
SDL_OpenURL("https://bilibili.com");
|
||||
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "SDL Application", "test!", win);
|
||||
SDL_StartTextInput(win);
|
||||
// SDL_StopTextInput();
|
||||
|
|
|
|||
|
|
@ -2,4 +2,7 @@ export const sdlCallbackInit: (d) => void;
|
|||
export const sdlLaunchMain: (lib: string, func: string) => number;
|
||||
export const sdlKeyEvent: (scancode: number, type: number) => number;
|
||||
export const sdlTextAppend: (str: string) => number;
|
||||
export const sdlTextEditing: (str: string, loc: number, length: number) => number;
|
||||
export const sdlTextEditing: (str: string, loc: number, length: number) => number;
|
||||
export const sdlDialogExecCallback: () => void;
|
||||
export const sdlDialogClearSelection: () => void;
|
||||
export const sdlDialogFileSelected: (path: string) => void;
|
||||
Loading…
Add table
Add a link
Reference in a new issue