Sciter technology survey

Ramon, author of Omni/OmniCode from MI Software, is making a survey about how people are using Sciter technology.

In return he is promising to provide licenses of his products to those who participated in survey.

Survey: goo.gl/forms/BKGHVjTGBTEIVMl02

More info is on misoftware.rs site.

Hope you can participate and help him to get that information.

Better use of style @set’s

In next version (4.0.0.2 and above) I am changing the way of how @set’s are applied in user’s style sheet.

Style sets will be applied before any other rules in the same style sheet.

So if you have

@set MySet {
  :root { color:red; width:*; }
}

myelement { style-set: MySet; }

And later define

myelement#test {
  color:blue;
}

then <myelement id=test>...</myelement> element will have blue color.

So you can think of style sets as definition of default styles. Ordinary CSS rules are applied on top of them allowing to style concrete elements.

Starting Sciter v.4.*.*.* series

Major changes:

SDK will include versions of Sciter with Skia graphics backend.

On Windows sciter is compiled as different DLLs having the same name sciter.dll locating in following folders:

  • bin/32/sciter.dll \
  • bin/64/sciter.dll – Direct2D and GDI+ backends as before
  • bin/skia32/sciter.dll \
  • bin/skia64/sciter.dll – Direct2D and Skia/OpenGL backends.

On MacOS sciter will include as CoreGraphics as Skia/OpenGL backends switchable by SciterSetOption() function.

On Linux I will have separate sciter.so that will not use GTK at all . Instead it will expose SciterProcX function similar to SciterProcND. Basic purpose: to use Sciter with SDL, GLFW and the like environments.

Sublime 3, Sciter syntaxes

Sciter HTML/CSS/script in Sublime3

Steps to add Sciter support to Sublime3

  1. In Sublime: menu Preferences » Browse Packages. It will open /Packages folder.
  2. Create folder named Sciter right in that folder.
  3. Download all *.tmLanguage files from github.com/svitalij/sciter.tm.syntax
  4. Copy those *.tmLanguage files into that folder.

Done. Now if you will open .tis files in Sublime3 you will see syntax highlighting.

To edit HTML and CSS files with Sciter specific extensions select

View » Syntax » Sciter » Sciter HTML

Gratitude to Vitalij Shitts the Great

Sciter assistant for Visual Studio Code

Early BETA of Sciter Assistant for Microsoft Visual Code by ConrLab.

MS-visual-code-sciter

Microsoft Visual Code, Sciter assistant in actions 

Supports syntax and editing of Sciter HTML and CSS flavours and TIScript.

Code completion in CSS including @mixin/@const constructs and script for this and variables starting from el....

If to update user settings (File->Preferences->User Settings) like this:
code-preferences

then by using Ctrl-K, Ctrl-S sequence you can run it in sciter.exe.

scapp.exe – standalone Sciter executable.

Adding scapp.exe to the SDK.

The ScApp is an executable that contains Sciter engine linked statically – has no external dependencies.

scapp.exe can be started without parameters or with a file name that has either .htm, .tis or .scapp extension:

> scapp.exe

or

> scapp.exe tetris.scapp

If it starts without parameters then it will try to look for either main.htm, main.tis or main.scapp in current folder.

If .htm[l] file is given Sciter window will be created and the document will be loaded to it.

The .scapp file is a zip file containing /main.tis at root. The main.tis is expected to contain code creating windows and calling Sciter.run(); – GUI message pump loop:

  // create first window, it may call Sciter.requestQuit(0) to exit from the loop below
  var window = View.window { ... };
  // run message pump loop of the application
  return Sciter.run(); 

Essentially it will just execute the script in the same way as tiscript.exe does.

CSS variables support

I am adding support of CSS variables. In Sciter this is pretty much about the same feature set as defined in CSS Variables Working Draft but with slightly different syntax:

Declaration of the variable:

body {
   var(foo): #f00;       /* declaring variable with name "foo" 
                            having color value */
   color: var(foo,#000); /* using the variable */
}

Variables are inheritable so everything inside <body> can use that variable:

div {
   background-color: var(foo,#00f);
   size:200dip;
}

Note that variable usage contains two pieces: name of the variable and default value that will be used when variable is not defined.

DOM API in script will also get methods to get/set variables in runtime:

$(body).style.variables { 
    foo: color(0,255,0) 
}

After that all elements that use the variable in their styles will get new color.

Sciter with Skia backend, v. 3.4.2.13

Sciter with Skia backend, closer to the final. The feature set matches official Sciter version 3.3.2.13.

This build fixes issues with layered (transparent) windows.

sciter.com/sdk/sciter-sdk-3-skia.zip

Update: Skia backend is a part of main SDK distribution since v.4.0.0.0.

The version is 100% API compatible with previous builds – drop-in replacement.

Folders:

  • /bin/ – Windows binaries, Direct2D and GDI+ backends.
  • /bin.skia/ – Windows binaries, Direct2D and Skia backends.
  • /bin.osx/ – OSX binaries, CoreGraphics and Skia backends.

All Windows samples and Sciter itself are compiled with MSVC 2015.

Note that on Windows Sciter includes as Direct2D as Skia backends. There are four backend modes (configured by SciterSetOption(NULL,SCITER_SET_GFX_LAYER, mode); ):

  1. GFX_LAYER_WARP – Direct2D WARP mode, CPU rasterization;
  2. GFX_LAYER_D2D – Direct2D H/W mode, GPU rasterization;
  3. GFX_LAYER_SKIA – Skia CPU rasterization mode;
  4. GFX_LAYER_SKIA_OPENGL – Skia OpenGL rendering backend, default for now.

Sciter with Skia backend, beta

Here is experimental build of Sciter with Skia backend.

sciter.com/sdk/sciter-sdk-3-skia.zip

The version is 100% API compatible with previous builds – drop-in replacement.

Folders:

  • /bin/ – Windows binaries, Direct2D and GDI+ backends.
  • /bin.skia/ – Windows binaries, Direct2D and Skia backends.
  • /bin.osx/ – OSX binaries, CoreGraphics and Skia backends.

All Windows samples and Sciter itself are compiled with MSVC 2015