opsbrazerzkidai.blogg.se

Purebasic library subsystem
Purebasic library subsystem











Purebasic library subsystem code#

Procedure.C_UINT AppCallback(*pns.SciterCallbackNotification, *callbackParam)ĭebug "Callback happened with code " + *pns\code If Not SciterDataReadyAsync(*sciterHandle,, *buffer, bytes, *asyncFile\requestId)ĭebug "Failed asynchronously loading resource " + *asyncFile\uri Protected bytes = FileReadAllToBuffer(*asyncFile\path, bytes <= 0ĭebug "Error reading file " + *asyncFile\path Procedure AsyncLoader(*asyncFile.AsyncFile) Procedure.i FileReadAllToBuffer(path.s, *buffer.Integer)įile = ReadFile(#PB_Any, path, #PB_File_SharedRead) SciterValueStringDataSet(*retval, str, #Null)ĭefine "app", End expose HelloWorld() to JavaScript SciterValueStringData(*value, = PeekS(*buffer, len) Protected *value.SciterValue, *buffer, len.C_UINT, str.s Procedure InvokeHelloWorld(*tag, argc.C_UINT, *argv, *retval.SciterValue) Gtk_container_add_(*windowHandle, *widgetHandle)ĭefine *nsView = SciterCreateNSView(#Null)ĬompilerError "TODO attach to *windowHandle" Gtk_container_remove_(*windowHandle, *childHandle) GtkWindow already has a GtkBox attached, remove it ProcedureReturn = #PB_Window_SizeGadget |ĭefine window = OpenWindow(#PB_Any, 40, 40, 530, 580, "Sciter", #WINDOW_FLAGS)ĬompilerIf #PB_Compiler_OS = #PB_OS_Linuxĭefine *widgetHandle = SciterCreateWidget(#Null)ĭefine *childHandle = gtk_bin_get_child_(*windowHandle) Result = SciterProcND(hwnd, msg, wParam, lParam, handled

purebasic library subsystem

Procedure WindowCallback(hwnd, msg, wParam, lParam)

purebasic library subsystem

SciterSetupDebugOutput(#Null, #Null, #PB_Compiler_OS = #PB_OS_Windows Procedure DebugOutPut(*param, subsystem.C_UINT, severity.C_UINT, *text, text_length.C_UINT) Output any messages from sciter to Debug SciterSetOption(#Null, #SCITER_SET_DEBUG_MODE, #True) Attach to inspector, only works on Windows at the moment CompilerIf #PB_Compiler_OS = #PB_OS_WindowsĬompilerElseIf #PB_Compiler_OS = #PB_OS_LinuxĬompilerElseIf #PB_Compiler_OS = #PB_OS_MacOSĭebug "Failed loading Sciter dynamic library"











Purebasic library subsystem