Skip to content

fix(libinput): include types.h - #6969

Closed
liamHowatt wants to merge 1 commit into
lvgl:masterfrom
liamHowatt:fix/libinput-types-h
Closed

liamHowatt wants to merge 1 commit into
lvgl:masterfrom
liamHowatt:fix/libinput-types-h

Conversation

@liamHowatt

Copy link
Copy Markdown
Contributor

Fixes #6869 (comment)

Include lv_types.h

Notes

@kissa96 kissa96 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mverch67

mverch67 commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

It still doesn't seem to work:

In file included from .pio/libdeps/native-tft-debug/lvgl/src/lvgl_private.h:48,
                 from lib/device-ui/source/TFTView_320x240.cpp:16:
.pio/libdeps/native-tft-debug/lvgl/src/drivers/libinput/lv_libinput_private.h:45:25: error: field ‘points’ has incomplete type ‘lv_libinput_event_t [32]’
   45 |     lv_libinput_event_t points[LV_LIBINPUT_MAX_EVENTS]; /* Event buffer */
      |                         ^~~~~~
In file included from .pio/libdeps/native-tft-debug/lvgl/src/lv_init.h:17,
                 from .pio/libdeps/native-tft-debug/lvgl/lvgl.h:21,
                 from lib/device-ui/include/MeshtasticView.h:6,
                 from lib/device-ui/include/TFTView_320x240.h:3,
                 from lib/device-ui/source/TFTView_320x240.cpp:3:
.pio/libdeps/native-tft-debug/lvgl/src/misc/lv_types.h:294:16: note: forward declaration of ‘lv_libinput_event_t’ {aka ‘struct lv_libinput_event_t’}
  294 | typedef struct lv_libinput_event_t lv_libinput_event_t;
      |                ^~~~~~~~~~~~~~~~~~~
.pio/libdeps/native-tft-debug/lvgl/src/drivers/libinput/lv_libinput_private.h:46:25: error: field ‘slots’ has incomplete type ‘lv_libinput_event_t [2]’
   46 |     lv_libinput_event_t slots[2]; /* Realtime state of up to 2 fingers to handle multitouch */
      |                         ^~~~~
.pio/libdeps/native-tft-debug/lvgl/src/misc/lv_types.h:294:16: note: forward declaration of ‘lv_libinput_event_t’ {aka ‘struct lv_libinput_event_t’}
  294 | typedef struct lv_libinput_event_t lv_libinput_event_t;
      |                ^~~~~~~~~~~~~~~~~~~
.pio/libdeps/native-tft-debug/lvgl/src/drivers/libinput/lv_libinput_private.h:54:25: error: field ‘last_event’ has incomplete type ‘lv_libinput_event_t’
   54 |     lv_libinput_event_t last_event; /* Report when no new events
      |                         ^~~~~~~~~~
.pio/libdeps/native-tft-debug/lvgl/src/misc/lv_types.h:294:16: note: forward declaration of ‘lv_libinput_event_t’ {aka ‘struct lv_libinput_event_t’}
  294 | typedef struct lv_libinput_event_t lv_libinput_event_t;
      |                ^~~~~~~~~~~~~~~~~~~
.pio/libdeps/native-tft-debug/lvgl/src/drivers/libinput/lv_libinput_private.h:65:14: error: field ‘xkb’ has incomplete type ‘lv_xkb_t’
   65 |     lv_xkb_t xkb;
      |              ^~~
.pio/libdeps/native-tft-debug/lvgl/src/misc/lv_types.h:292:16: note: forward declaration of ‘lv_xkb_t’ {aka ‘struct lv_xkb_t’}
  292 | typedef struct lv_xkb_t lv_xkb_t;
      |                ^~~~~~~~

@mverch67

mverch67 commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

Ok, actually I just copied these changes of this PR into my code (based on branch 9.2.0 + PR6869). Maybe I should checkout master... let me do this ...

@mverch67

mverch67 commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

OK, it compiles when using master, also without the changes above. I assume the below forward declarations in lv_types.h were still missing in version 9.2.0 that I tested before. Now all is good! Thanks!

typedef struct lv_xkb_t lv_xkb_t;
typedef struct lv_libinput_event_t lv_libinput_event_t;
typedef struct lv_libinput_t lv_libinput_t;

@liamHowatt
liamHowatt marked this pull request as ready for review October 2, 2024 15:57
@liamHowatt

Copy link
Copy Markdown
Contributor Author

Now all is good!

Glad to hear!

I think this should be added anyways.

@kisvegabor

Copy link
Copy Markdown
Member

As it's reported to be working, I close this issue.

@kisvegabor kisvegabor closed this Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants