Configuration parameters for class

The following are valid parameters that can be configured under the class section; all parameters are valid for both framebuffers and application windows.

Parameter Description Type Possible Value(s)
alpha-mode Indication of method of alpha blending to use for alpha compositing string
non-pre-multiplied (default)
Uses straight RGBA pixel value. For example, (0, 1, 0, 0.5) is green with 50% opacity
pre-multiplied
Uses pre-multiplied RGBA pixel value. For example, a non-pre-multiplied value of (0, 1, 0, 0.5) can be intepreted as (0, 1, 0) * 0.5, giving a pre-multiplied value of (0, 0.5, 0, 0.5), which 0.5 is 100% green intensity but with 50% opacity
brightness The brightness of a window. This configuration depends on the hardware; it can be configured, but may or may not take effect as determined by your hardware. integer -255..255
cbabc Content-based automatic brightness control; specifies the content type of a window. This configuration depends on the hardware; it can be configured, but may or may not take effect as determined by your hardware. string
  • none
  • video
  • ui
  • photo
clip-position The x- and y- position of a clipped rectangular viewport within the window buffers. This configuration must be in the form of: x-position,y-position. For example, clip-position = 100,100. integer x-position, y-position
clip-size The width and height (in pixels) of a clipped rectangular viewport within the window buffers. This configuration must be in the form of: widthxheight For example, clip-size = 100x100. integer widthxheight
color The background color of a window. Use RGB color code (HEX value) to identify the color. (e.g., blue = 0xff). unsigned long integer (hex)
  • 0x00 (default: black)
contrast The contrast adjustment of a window. This configuration depends on the hardware; it can be configured, but may or may not take effect as determined by your hardware. integer -128..127
display The connection type to the display or the display on which the window will be shown. If the configuration is an integer, screen will interpret the integer as the indication of the display on which the window will be shown. Otherwise, if the configuration is a string that matches one of the valid display connection types, then Screen will interpret the string as the configuration of the display connection type. string or integer
  • internal
  • composite
  • svideo
  • YPbPr
  • rgb
  • rgbhv
  • dvi
  • hdmi
  • 1..2
format The pixel format used by a window. Only one format is expected; this format must be supported by the display. string
  • byte(default)
  • rgba4444
  • rgbx4444
  • rgba5551
  • rgbx5111
  • rgb565
  • rgb888
  • rgba8888
  • rgbx8888
  • yvu9
  • yuv420
  • nv12
  • yv12
  • uyvy
  • yuy2
  • v422
  • ayuv
global-alpha The global alpha mode to apply to a window. integer 0..225
hue The hue adjustment of a window. integer -128..127
id_string A string to identify the contents of a window. string  
order The distance from the bottom that is used when ordering window groups among each other. long integer  
pipeline The pipeline identifier. This must refer to a pipeline defined in the wfd device section of the configuration file. unsigned long integer 1..3
rotation The clockwise rotation of a window. Window rotation is absolute. long integer
  • 0
  • 90
  • 180
  • 270
saturation The saturation adjustment of a window. long integer -128..127
source-position The x and y coordinates of the top-left corner of a rectangular region within the window buffer representing the source viewport of a window. This is the portion of the window buffer that is to be displayed. This configuration must be in the format of: x-position,y-position. For example, source-position = 100,100. integer x-position, y-position
source-size The width and height (in pixels) of a region within the window buffer representing the source viewport of the window. This is the portion of the window buffer that is to be displayed. This configuration must be in the form of: widthxheight. For example, source-size = 100x100. integer  
static Indicates whether or not the contents of a window are expected to change unsigned long integer
0
Window content isn't static
1
Window content is static
surface-size The width and height of the window buffer. This configuration must be in the form of: widthxheight For example, surface-size = 100x100. integer  
interval The minimum number of vsync periods between posts. unsigned long integer  
usage
The intended usage for the window buffers; the resulting usage applied to the window buffers is the bitwise OR of all the valid entries configured with this parameter. You can configure this parameter using any of the following:
  • one or more valid usage flags (for a complete listing of valid usage flags, refer to Screen usage flag types)
  • the blitter to use for composition onto a framebuffer (the default is sw if no blitter is specified)
  • one or more integers representing a valid usage bit
If this configuration consists of a string that is not mapped to one of the valid usage flags, then Screen will interpret the string as the blitter to use for composition onto a framebuffer.
Note:

Note that all framebuffers share the same blitter; therefore if you configure multiple class sections and define the usage with a blitter in each, then the blitter named in the usage of the last class section in your configuration file will be used.

This parameter differs from the blitter specified in the blit-config parameter under your globals section in graphics.conf. The blitter specified in the blit-config parameter is the blitter that Screen uses when your application explicitly calls the native blit API functions (screen_blit() and screen_fill()).

When multiple usage flags are configured, each flag in the configuration must be separated by a comma or space. You can combine the blitter name with the usage flags in the same configuration line as long as it is separated by a comma or a space.

For example, the following are examples of valid entries for configuring usage:
  • usage = pvr2d
  • usage = sw native
  • usage = 2 4 8
string
gles1
Used to indicate that OpenGL ES 1.X is used for rendering the buffer(s) associated with the window
gles2
Used to indicate that OpenGL ES 2.X is used for rendering the buffer(s) associated with the window
native
Used to indicate that buffer(s) associated with the window can be used for native API operations. For example, if your application explicitly calls (screen_blit() and/or screen_fill()), then this flag must be set.
rotation
Used to indicate that the buffer(s) associated with the window can be re-configured from landscape to portrait orientation without having the need for reallocation.
sw
Used to indicate that the buffer(s) associated with the window can be read from and written to.
vg
Used to indicate that OpenVG is used for rendering the buffer(s) associated with the window
visible Indicates whether or not a window is visible. string
  • true
  • false
window-position The x and y positions of the window screen coordinates. Remember that the position of child and embedded windows are relative to the parent window. For example, if the position of the application window is (10, 10) and the position of the child window is (10, 10), then the position of the child window on the screen is actually (20, 20). This configuration must be in the form of: x-position,y-position. For example, window-position = 10,10. integer x-position,y-position
window-size The width and height (in pixels) of a window. This configuration must be in the form of: widthxheight. For example, window-size = 100x100. integer widthxheight
buffer-count The number of buffers that are to be created or attached to a window. Beyond configuration, the buffer count can't be set; it can only be queried by the application. There is no explicit limit for this number. integer 3 (default)