##############################################################################
##############################################################################
# Global section
#
# This section includes configuration items that have a global reach.
# They are not tied to a particular display, window class, or input
# device. It is not necessary for the sections to be in a particular order.
#
# begin globals
#  id = [0..99]
#    Specifies the id of the composition manager. This id is appended to the
#    device name that will be created. For example, if id is set to 0, the
#    composition manager will handle requests sent to /dev/winmgr:0.
#    It is recommended that you keep this directive out and use the default
#    id. This default id will ensure that EGL connections established with
#    EGL_DEFAULT_DEVICE_ID don't return with an error. The value for id must
#    be a numer between 0 and 99.
#
#  queue-incr-size = [size]
#    Indicates by how much event queues should be grown when an event needs
#    to be enqueued and the queue is full. The value must be positive and
#    non-zero.
#
#  queue-start-size = [size]
#    Sets the size of event queues when they are created. If queue-start-size
#    is set to 20, a queue with 20 events will be allocated for each new
#    connection that gets established.
#
#  window-incr-size = [size]
#    This is the amount by which the window pool is grown when it becomes full.
#
#  select-up-alpha-test = [on|off]
#
#  input = [all|<attach_string>|none]
#  <attach_string> = <devi_input_device> *
#  <devi_input_device> = [touch<index>|mouse<index>|keyboard<index>|control<index>]
#  <index> = [0..15]
#
#  autofocus = [on|off]
#    Sets the focus policy when windows are created or destroy. When autofocus
#    is on, focus is assigned to newly created windows when they are on top.
#    Focus will also be assigned to the window above any window that gets
#    destroyed while it has input focus. The focus goes to the window below
#    top-most windows that get destroyed while they have input focus. Turning
#    autofocus off removes these rules and requires a click or refocus from
#    the window manager. The default value is on.
#
#  pointer-qsize = [auto|1..]
#    Sets the size of queues allocated to hold pointer events. Depending on
#    system load and performance, pointer events may start queueing up in the
#    input driver. When this is the case, it is important to rapidly empty
#    events from this queue to minimise the latency between events, and cursor
#    updates, and the actual pointer movements. The value of this property
#    determines the maximum number of events that can be read at once. The
#    value of auto indicates that the composition manager is to grow the
#    queue as events start queueing up. The default value is 1.
#
# end globals

begin globals
 input = all
 pointer-qsize = auto
end globals

##############################################################################
##############################################################################
# Display sections
#
# There must be one display section for every display that should be handled
# by the composition manager. A display entry in this configuration file will
# usually correspond to an actual physical display. When multiple displays are
# present on a system, the OpenWF display directives must be used to allow the
# composition manager to target each display. Otherwise, a single EGL display
# can be used.
#
# begin display
#  id = [int]
#    Specifies the id of this display instance. This id corresponds to the
#    KD_QNX_WINDOWPROPERTY_DISPLAY window attribute that must be used to
#    make a window appear on a specific display. For example, if id is set
#    to 10, a window would have to call kdSetWindowPropertyiv with pname set
#    to KD_QNX_WINDOWPROPERTY_DISPLAY and param pointing to a value of 10
#    in order to put that window on this display. By default, windows will
#    be placed on the first display entry in this configuration file, not
#    on display id 0. The default id is an auto incremented integer that
#    starts with 0.
#
#  cursor = [sw-square|sw-arrow|hw-arrow|off]
#    This directive indicates the shape of the cursor, if present. If cursor
#    is set to sw-square or hw-square, a small square is drawn at the
#    coordinates of the relative pointer device. The composition manager
#    will use a hardware cursor if the value is set to hw-arrow. The default
#    value is off.
#
#  egl-display = [EGLNativeDisplayID|default]
#    Indicates which EGL display the composition manager should be connecting
#    to. The default value is default, which corresponds to
#    EGL_DEFAULT_DISPLAY.
#
#  wfd-device = [WFDDeviceId|default]
#    The wfd-device entry associates a display section to a physical display.
#    The sysres utility can be used to generate a list of WFD devices, ports
#    and pipelines available on a system. It is not necessary to provide a
#    wfd-device unless the composition manager must handle multiple displays.
#
#  wfd-port = [WFDPortId|default]
#    This directive indicates which display port should be used to drive the
#    physical display. The sysres utility can be used to generate a list of
#    WFD devices, ports, and pipelines available on a system. The default
#    value corresponds to the first port id returned by WFD.
#
#  wfd-mode = [width] x [height] @ [refresh]
#    Use this directive to change the display mode. This directive is only
#    necessary if the display mode when starting the composition manager is
#    not set yet. The width and height arguments indicate the display
#    resolution. The refresh argument is the update rate in frames per second.
#    The default value is the current display mode. Note that a specific
#    display controller may not support all combinations of resolutions and
#    refresh rates.
#
#  begin plane
#    A display must have at least one plane section. A plane represents a
#    composition stage.
#
#    egl-config = [EGLConfig|auto]
#      When the egl-config directive is present, the composition manager
#      creates a target surface where composition results can be saved. This
#      allows several windows to share the same plane. The value of egl-config
#      specifies which pixel format is used to create the target buffer.
#      The egl-config argument must refer to an EGL configuration that
#      supports native rendering, i.e. EGL_NATIVE_RENDERABLE is EGL_TRUE.
#      The sysres utility can be used to generate a list of EGL configuration
#      ids that can be used.
#
#    wfd-pipeline = [WFDPipelineID|default]
#      This directive associates a plane to a WFD pipeline, or layer. Planes
#      can be associated to WFD pipelines whether they have target buffers or
#      not (see egl-config directive). A wfd-pipeline with no egl-config will
#      be able to support one window. When multiple windows are created on
#      such planes, only the top-most window is visible. Conversely, planes
#      with target buffers that are associated to WFD pipelines can support
#      any number of windows simultaneously. The sysres utility can be used
#      to generate a list of WFD devices, ports, and pipelines available on a
#      particular system.
#
#    source-alpha = [on|off]
#      When turned on, the values from alpha channels are used to blend the
#      contents of a window with other windows or with the background beneath
#      it. Blending can still be performed even if this option is not enabled
#      when a target buffer is available (see egl-config). The option is
#      ignored if the WFD pipeline does not support source alpha blending.
#      The source-alpha and source-chroma options should not both be turned on.
#      The options is also ignored if the plane was tied to a valid WFD
#      pipeline id.

#    source-chroma = [on|off]
#      When turned on, colors that correspond to the background color will be
#      interpreted as transparent. The option is ignored if the hardware does
#      not support source color transparency. The source-chroma and
#      source-alpha options should not both be turned on. The options is also
#      ignored if the plane was tied to a valid WFD pipeline id.
#
#    background = rrggbb
#      Specifies the background color for a plane. This color will fill regions
#      not occupied by windows of the lower plane. The default background color
#      is black, or 000000. Note that certain optimizations are available only
#      if the background color is black. Planes with no target buffers cannot
#      have a background color. On planes where source color transparency is
#      enabled (see source-chroma), the background color directive specifies
#      the source color that will be interpreted as transparent.
#  end plane
#
# end display

begin display
 begin plane
  egl-config = auto
 end plane
end display

##############################################################################
##############################################################################
# Window class sections
#
# Classes can be used by system integrators to set default values for window
# properties that can be configured differently from system to system. This
# works as long as the application itself sets the class property or a
# delegate does it instead. Each begin and end class directive defines a
# new class. Note that all fields are optional. Only the fields specified in
# the class description will actually be copied into their corresponding
# window property.
#
# begin class
#  name = [string]
#    Indicates the name of the class. No two classes can share the same name,
#    as this is how windows will identify them. This string affects the
#    KD_QNX_WINDOWPROPERTY_CLASS window property if a window wishes to inherit
#    the values stored in this class.
#
#  caption = [string]
#    Caption string for any window deriving from this class. This property is
#    not used by the composition manager to provide a title bar. It
#    affects the KD_WINDOWPROPERTY_CAPTION window property.
#
#  delegate = [true|false]
#    Default value of the delegate flag for windows inheriting from this
#    class. This affects the KD_WINDOWPROPERTY_DELEGATE window property, when
#    it is set with kdSetWindowPropertybv and read with kdGetWindowPropertybv.
#
#  visible = [true|false]
#    Default value of the visible flag for windows inheriting from this class.
#    This affects the KD_WINDOWPROPERTY_VISIBILITY window property.
#
#  source-alpha = [true|false]
#    Default value of the source alpha flag for windows inheriting from this
#    class. This affects the KD_QNX_WINDOWPROPERTY_SOURCE_ALPHA window
#    property.
#
#  pointer-focus = [true|false]
#    Specicies that pointer focus will be assigned to any window inheriting from
#    this class. This affects the KD_QNX_WINDOWPROPERTY_POINTER_FOCUS window 
#    property.
#
#    NOTE: When pointer focus is assigned to a window, general focus cannot be
#          re-assign via mouse click.
#
#  focus = [true|false]
#    Specifies that general focus will be assigned to any window inheriting from
#    this class. This affects the KD_QNX_WINDOWPROPERTY_FOCUS window property.
#
#  surface-size = [width] x [height]
#    Speficies a default buffer size for windows deriving from this class.
#    This affects the KD_QNX_WINDOWPROPERTY_SURFACE_SIZE window property.
#
#  source-position = [x], [y]
#    Specifies a default source position for windows deriving from this class.
#    This affects the KD_QNX_WINDOWPROPERTY_SOURCE_POSITION window property.
#
#  source-size = [width] x [height]
#    Specifies a default source size for windows deriving from this class.
#    This affects the KD_QNX_WINDOWPROPERTY_SOURCE_SIZE window property.
#
#  window-position = [x], [y]
#    Specifies a default position for windows deriving from this class. This
#    affects the KD_QNX_WINDOWPROPERTY_POSITION window property.
#
#  window-size = [width] x [height]
#    Specifies a default size for windows deriving from this class. This
#    affects the KD_WINDOWPROPERTY_SIZE window property.
#
#  alpha = [0..255]
#    Global transparency value for windows deriving from this class. This
#    affects the KD_QNX_WINDOWPROPERTY_ALPHA window property.
#
#  interval = [0..255]
#    Default swap interval for windows inheriting from this class. This
#    field does not correspond to an OpenKODE window property. The swap
#    interval is otherwise set by calling eglSwapInterval.
#
#  egl-config = [EGLConfig]
#    Specifies the default pixel format that should be used by windows
#    deriving from this class. This field does not correspond to an OpenKODE
#    window property. It replaces the config argument provided to the
#    kdCreateWindow function. Utilities like egl-configs or io-winmgr's
#    sysres command can be used to generate a list of EGL configurations
#    available on a given system. The EGL config id is the value that should
#    be used to set this attribute.
#
# end class

