Pointer input sessions are created with the type SCREEN_EVENT_POINTER and are typically used to control the shape and position of the cursor.
The SCREEN_PROPERTY_MODE property for pointer sessions is not used. However, the following session properties are applicable to pointer sessions:
Other session properties applicable to pointer sessions are SCREEN_PROPERTY_BRUSH_CLIP_POSITION and SCREEN_PROPERTY_BRUSH_CLIP_SIZE, but it's not usually necessary to use these properties because when you use sessions, you can define the size and position via the session's input region. They are made available more so for windows.
You can change your cursor shape for a window, or even a specific area within a window by using a pointer input session. If you're managing cursor shapes, you'll need to have specified the image associated with the shapes you want to use through the Screen configuration file, graphics.conf.
Valid shapes for your cursor are defined by the type Screen cursor shapes.
Refer to the cursor-type parameter of Configure display subsection for more details.
Once you've configured the cursor shapes, your application can specify a cursor shape for a window:
... screen_session_t session; int cursor_shape = SCREEN_CURSOR_SHAPE_ARROW; screen_create_session_type(&session, context SCREEN_EVENT_POINTER); screen_set_session_property_pv(session, SCREEN_PROPERTY_WINDOW, (void**) &window); screen_set_session_property_iv(session, SCREEN_PROPERTY_CURSOR, cursor_shape); ...
or for a specific area:
... screen_session_t session; int cursor_shape = SCREEN_CURSOR_SHAPE_HAND; screen_create_session_type(&session, context, SCREEN_EVENT_POINTER); screen_set_session_property_pv(session, SCREEN_PROPERTY_WINDOW, (void**) &window); screen_set_session_property_iv(session, SCREEN_PROPERTY_POSITION, pos); screen_set_session_property_iv(session, SCREEN_PROPERTY_SIZE, size); screen_set_session_property_iv(session, SCREEN_PROPERTY_CURSOR, cursor_shape); ...
In gaming mode, you might want to hide the cursor. In this case, you can set the cursor shape to SCREEN_CURSOR_SHAPE_NONE:
... screen_session_t session; int cursor_shape = SCREEN_CURSOR_SHAPE_NONE; screen_create_session_type(&session, context, SCREEN_EVENT_POINTER); screen_set_session_property_pv(session, SCREEN_PROPERTY_WINDOW, (void**) &window); screen_set_session_property_iv(session, SCREEN_PROPERTY_CURSOR, cursor_shape); ...In the case of gaming, you might find it more useful to use displacement instead of the position of the cursor.