C# Class SciterSharp.SciterHost

显示文件 Open project: MISoftware/SciterSharp

Public Methods

Method Description
AttachEvh ( SciterEventHandler evh ) : void

Attacheds a window level event-handler: it receives every event for all elements of the page. You can only attach a single event-handler.

CallFunction ( string name ) : SciterValue
DebugInspect ( ) : void

Runs the inspector process, waits 1 second, and calls view.connectToInspector() to inspect your page. Assumes that the 'inspector(.exe)' executable is in the same directory of OmniCode.dll assembly (so just it to its dir) (Before everything it kills any previous instance of the inspector process)

DebugInspect ( string inspector_exe_path ) : void

Runs the inspector process, waits 1 second, and calls view.connectToInspector() to inspect your page. (Before everything it kills any previous instance of the inspector process)

EvalScript ( string script ) : SciterValue
InvokePost ( System.Action what ) : void

Posts a message to the UI thread to invoke the given Action. This methods returns immediatly, does not wait for the message processing.

InvokeSend ( System.Action what, uint timeout = 3000 ) : void

Sends a message to the UI thread to invoke the given Action. This methods waits for the message processing until timeout is exceeded.

PostNotification ( IntPtr wparam, IntPtr lparam, uint timeout ) : IntPtr

Sciter cross-platform alternative for posting a message in the message queue. It will be received as a SC_POSTED_NOTIFICATION notification by this SciterHost instance. Override OnPostedNotification() to handle it.

RegisterBehaviorHandler ( string behaviorName, Type eventHandlerType ) : void
SciterHost ( SciterWindow wnd ) : System
SetupWindow ( IntPtr hwnd ) : void
SetupWindow ( SciterWindow wnd ) : void

Protected Methods

Method Description
OnAttachBehavior ( SciterElement el, string behaviorName, SciterEventHandler &elementEvh ) : bool
OnDataLoaded ( SciterXDef sdl ) : void
OnEngineDestroyed ( ) : void
OnGraphicsCriticalFailure ( IntPtr hwnd ) : void
OnLoadData ( SciterXDef sld ) : SciterXDef.LoadResult
OnPostedNotification ( IntPtr wparam, IntPtr lparam ) : IntPtr

Private Methods

Method Description
HandleNotification ( IntPtr ptrNotification, IntPtr callbackParam ) : uint
SciterHost ( ) : System

Method Details

AttachEvh() public method

Attacheds a window level event-handler: it receives every event for all elements of the page. You can only attach a single event-handler.
public AttachEvh ( SciterEventHandler evh ) : void
evh SciterEventHandler
return void

CallFunction() public method

public CallFunction ( string name ) : SciterValue
name string
return SciterValue

DebugInspect() public method

Runs the inspector process, waits 1 second, and calls view.connectToInspector() to inspect your page. Assumes that the 'inspector(.exe)' executable is in the same directory of OmniCode.dll assembly (so just it to its dir) (Before everything it kills any previous instance of the inspector process)
public DebugInspect ( ) : void
return void

DebugInspect() public method

Runs the inspector process, waits 1 second, and calls view.connectToInspector() to inspect your page. (Before everything it kills any previous instance of the inspector process)
public DebugInspect ( string inspector_exe_path ) : void
inspector_exe_path string Path to the inspector executable, can be an absolute or relative path.
return void

EvalScript() public method

public EvalScript ( string script ) : SciterValue
script string
return SciterValue

InvokePost() public method

Posts a message to the UI thread to invoke the given Action. This methods returns immediatly, does not wait for the message processing.
public InvokePost ( System.Action what ) : void
what System.Action The delegate which will be invoked
return void

InvokeSend() public method

Sends a message to the UI thread to invoke the given Action. This methods waits for the message processing until timeout is exceeded.
public InvokeSend ( System.Action what, uint timeout = 3000 ) : void
what System.Action The delegate which will be invoked
timeout uint
return void

OnAttachBehavior() protected method

protected OnAttachBehavior ( SciterElement el, string behaviorName, SciterEventHandler &elementEvh ) : bool
el SciterElement
behaviorName string
elementEvh SciterEventHandler
return bool

OnDataLoaded() protected method

protected OnDataLoaded ( SciterXDef sdl ) : void
sdl SciterSharp.Interop.SciterXDef
return void

OnEngineDestroyed() protected method

protected OnEngineDestroyed ( ) : void
return void

OnGraphicsCriticalFailure() protected method

protected OnGraphicsCriticalFailure ( IntPtr hwnd ) : void
hwnd System.IntPtr
return void

OnLoadData() protected method

protected OnLoadData ( SciterXDef sld ) : SciterXDef.LoadResult
sld SciterSharp.Interop.SciterXDef
return SciterXDef.LoadResult

OnPostedNotification() protected method

protected OnPostedNotification ( IntPtr wparam, IntPtr lparam ) : IntPtr
wparam System.IntPtr
lparam System.IntPtr
return System.IntPtr

PostNotification() public method

Sciter cross-platform alternative for posting a message in the message queue. It will be received as a SC_POSTED_NOTIFICATION notification by this SciterHost instance. Override OnPostedNotification() to handle it.
public PostNotification ( IntPtr wparam, IntPtr lparam, uint timeout ) : IntPtr
wparam System.IntPtr
lparam System.IntPtr
timeout uint /// If timeout is > 0 this methods SENDs the message instead of POSTing and this is the timeout for waiting the processing of the message. Leave it as 0 for actually POSTing the message. ///
return System.IntPtr

RegisterBehaviorHandler() public method

public RegisterBehaviorHandler ( string behaviorName, Type eventHandlerType ) : void
behaviorName string
eventHandlerType System.Type
return void

SciterHost() public method

public SciterHost ( SciterWindow wnd ) : System
wnd SciterWindow
return System

SetupWindow() public method

public SetupWindow ( IntPtr hwnd ) : void
hwnd System.IntPtr
return void

SetupWindow() public method

public SetupWindow ( SciterWindow wnd ) : void
wnd SciterWindow
return void