Lines Matching +full:- +full:- +full:include

9 #include "lv_glfw_window_private.h"
11 #include <stdlib.h>
12 #include "../../core/lv_refr.h"
13 #include "../../stdlib/lv_string.h"
14 #include "../../core/lv_global.h"
15 #include "../../display/lv_display_private.h"
16 #include "../../indev/lv_indev.h"
17 #include "../../lv_init.h"
18 #include "../../misc/lv_area_private.h"
20 #include <GL/glew.h>
21 #include <GLFW/glfw3.h>
23 #include "lv_opengles_driver.h"
24 #include "lv_opengles_texture.h"
83 window->window = glfwCreateWindow(hor_res, ver_res, "LVGL Simulator", NULL, in lv_glfw_window_create()
84 existing_window ? existing_window->window : NULL); in lv_glfw_window_create()
85 if(window->window == NULL) { in lv_glfw_window_create()
92 window->hor_res = hor_res; in lv_glfw_window_create()
93 window->ver_res = ver_res; in lv_glfw_window_create()
94 lv_ll_init(&window->textures, sizeof(lv_glfw_texture_t)); in lv_glfw_window_create()
95 window->use_indev = use_mouse_indev; in lv_glfw_window_create()
97 glfwSetWindowUserPointer(window->window, window); in lv_glfw_window_create()
99 lv_glfw_window_config(window->window, use_mouse_indev); in lv_glfw_window_create()
101 glfwMakeContextCurrent(window->window); in lv_glfw_window_create()
109 glfwDestroyWindow(window->window); in lv_glfw_window_delete()
110 if(window->use_indev) { in lv_glfw_window_delete()
112 LV_LL_READ(&window->textures, texture) { in lv_glfw_window_delete()
113 if(texture->indev != NULL) lv_indev_delete(texture->indev); in lv_glfw_window_delete()
116 lv_ll_clear(&window->textures); in lv_glfw_window_delete()
127 lv_glfw_texture_t * texture = lv_ll_ins_tail(&window->textures); in lv_glfw_window_add_texture()
131 texture->window = window; in lv_glfw_window_add_texture()
132 texture->texture_id = texture_id; in lv_glfw_window_add_texture()
133 lv_area_set(&texture->area, 0, 0, w - 1, h - 1); in lv_glfw_window_add_texture()
134 texture->opa = LV_OPA_COVER; in lv_glfw_window_add_texture()
136 if(window->use_indev) { in lv_glfw_window_add_texture()
141 lv_ll_remove(&window->textures, texture); in lv_glfw_window_add_texture()
145 texture->indev = indev; in lv_glfw_window_add_texture()
159 if(texture->indev != NULL) { in lv_glfw_texture_remove()
160 lv_indev_delete(texture->indev); in lv_glfw_texture_remove()
162 lv_ll_remove(&texture->window->textures, texture); in lv_glfw_texture_remove()
168 lv_area_set_pos(&texture->area, x, texture->area.y1); in lv_glfw_texture_set_x()
173 lv_area_set_pos(&texture->area, texture->area.x1, y); in lv_glfw_texture_set_y()
178 texture->opa = opa; in lv_glfw_texture_set_opa()
183 return texture->indev; in lv_glfw_texture_get_mouse_indev()
280 lv_glfw_window_t * window_to_delete = window->closing ? window : NULL; in window_update_handler()
283 glfwSetWindowShouldClose(window_to_delete->window, GLFW_TRUE); in window_update_handler()
290 glfwMakeContextCurrent(window->window); in window_update_handler()
291 lv_opengles_viewport(0, 0, window->hor_res, window->ver_res); in window_update_handler()
296 LV_LL_READ(&window->textures, texture) { in window_update_handler()
298 … lv_display_t * texture_disp = lv_opengles_texture_get_from_texture_id(texture->texture_id); in window_update_handler()
303 lv_area_t clip_area = texture->area; in window_update_handler()
305 …lv_opengles_render_texture(texture->texture_id, &texture->area, texture->opa, window->hor_res, win… in window_update_handler()
308 …lv_opengles_render_texture(texture->texture_id, &texture->area, texture->opa, window->hor_res, win… in window_update_handler()
314 glfwSwapBuffers(window->window); in window_update_handler()
331 lv_window->closing = 1; in window_close_callback()
340 lv_window->closing = 1; in key_callback()
349 …lv_window->mouse_last_state = action == GLFW_PRESS ? LV_INDEV_STATE_PRESSED : LV_INDEV_STATE_RELEA… in mouse_button_callback()
357 lv_window->mouse_last_point.x = (int32_t)xpos; in mouse_move_callback()
358 lv_window->mouse_last_point.y = (int32_t)ypos; in mouse_move_callback()
366 LV_LL_READ_BACK(&window->textures, texture) { in proc_mouse()
367 if(lv_area_is_point_on(&texture->area, &window->mouse_last_point, 0)) { in proc_mouse()
369 texture->indev_last_point.x = window->mouse_last_point.x - texture->area.x1; in proc_mouse()
370 texture->indev_last_point.y = window->mouse_last_point.y - texture->area.y1; in proc_mouse()
371 texture->indev_last_state = window->mouse_last_state; in proc_mouse()
372 lv_indev_read(texture->indev); in proc_mouse()
381 data->point = texture->indev_last_point; in indev_read_cb()
382 data->state = texture->indev_last_state; in indev_read_cb()
388 lv_window->hor_res = width; in framebuffer_size_callback()
389 lv_window->ver_res = height; in framebuffer_size_callback()