1 /** 2 * @file lv_qnx.h 3 * @brief LVGL driver for the QNX Screen compositing window manager 4 */ 5 6 #ifndef LV_QNX_H 7 #define LV_QNX_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "../../display/lv_display.h" 18 #include "../../indev/lv_indev.h" 19 20 #if LV_USE_QNX 21 22 #include <stdbool.h> 23 #include <screen/screen.h> 24 25 /********************* 26 * DEFINES 27 *********************/ 28 29 /********************** 30 * TYPEDEFS 31 **********************/ 32 33 /********************** 34 * GLOBAL PROTOTYPES 35 **********************/ 36 37 /** 38 * Create a window to use as a display for LVGL. 39 * @param hor_res The horizontal resolution (size) of the window 40 * @param ver_res The vertical resolution (size) of the window 41 * @return A pointer to a new display object if successful, NULL otherwise 42 */ 43 lv_display_t * lv_qnx_window_create(int32_t hor_res, int32_t ver_res); 44 45 /** 46 * Set the title of the window identified by the given display. 47 * @param disp The display object for the window 48 * @param title The new title to set 49 */ 50 void lv_qnx_window_set_title(lv_display_t * disp, const char * title); 51 52 /** 53 * Create a pointer input device for the display. 54 * Only one pointer object is currently supported. 55 * @param disp The display object associated with the device 56 * @return true if successful, false otherwise 57 */ 58 bool lv_qnx_add_pointer_device(lv_display_t * disp); 59 60 /** 61 * Create a keyboard input device for the display. 62 * Only one keyboard object is currently supported. 63 * @param disp The display object associated with the device 64 * @return true if successful, false otherwise 65 */ 66 bool lv_qnx_add_keyboard_device(lv_display_t * disp); 67 68 /** 69 * Runs the event loop for the display. 70 * The function only returns in response to a close event. 71 * @param disp The display for the event loop 72 * @return Exit code 73 */ 74 int lv_qnx_event_loop(lv_display_t * disp); 75 76 /********************** 77 * MACROS 78 **********************/ 79 80 #endif /* LV_DRV_QNX */ 81 82 #ifdef __cplusplus 83 } /* extern "C" */ 84 #endif 85 86 #endif /* LV_QNX_H */ 87