On Thu, 26 Jan 2017 13:16:57 +0900 cnook <[email protected]> said:

> Dear All, Hello.
> 
> 
> 
> I got following snippet to get device name from fd.
> 
> 
> 
> +char name[128];
> +if (ioctl(fd, JSIOCGNAME(sizeof(name)), name) < 0)
> +       strncpy(name, "Unknown", sizeof(name));
> +printf("Name: %s\n", name);
> 
> 
> 
> I would like to add an API to get device name using this snippet.
> 
> But it seems that there is our own way to get device name.
> 
> I have looked into efl_input_device_name_get, and tried to check
> ecore_evas_cursor_example.c.
> 
> But it gives following compile error message:
> 
> 
> 
> ecore_evas_cursor_example.c:81:1: error: unknown type name ‘Efl_Event’
> ecore_evas_cursor_example.c:83:37: error: request for member ‘info’ in
> something not a structure or union
> 
> ecore_evas_cursor_example.c:151:30: error: ‘EFL_CANVAS_EVENT_DEVICE_ADDED’
> undeclared (first use in this function)

well you are trying to use efl "eo beta api" without enabling the
headers - there is a special #define to enable this (as the api is
currently unstable and changing). thats your compile problem here.

> So... what is the EFL standard & best way to get the device name.
> 
> You do not want to add ecore_input_joystick_device_name_get, or add a
> variable to keep device name.

the efl_* api is an eo/efl interfaces api. that is "new and unstable" -
changing. it's being worked on. you would need/want a "legacy api"
wrapper to not go through this new api and expose it without relying on
eo/efl interfaces infra and objects. Eo *dev in the joystick event is
an object that you would need to access using eo/efl interfaces UNLESS
you provide a "legacy api" wrapper that calls the eo/interfaces
function internally.

 
> 
> 
> Sincerely,
> 
> Shinwoo Kim.
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to