On Fri, 4 Dec 2020 00:37:16 -0500 Christopher Michael <devilho...@comcast.net>
said:

> Thank you !
> 
> Use the API that is there ...

it was pointless as e already needed latest efl - in fact needs git master efl
now, so no point doing this below.

> dh
> 
> 
> On 12/4/20 12:25 AM, Christopher Michael wrote:
> > +1
> >
> >
> > dh
> >
> >
> > On 12/1/20 9:29 PM, Carsten Haitzler wrote:
> >> raster pushed a commit to branch master.
> >>
> >> http://git.enlightenment.org/core/enlightenment.git/commit/?id=6d2c0d04e97f5afd47aed2aacf062b3c83e27db5
> >>  
> >>
> >>
> >> commit 6d2c0d04e97f5afd47aed2aacf062b3c83e27db5
> >> Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> >> Date:   Tue Dec 1 21:21:17 2020 +0000
> >>
> >>      wl - remove some old versioning stuff that is not relevant anymore
> >>           we need latest efl anyway so... no point having this fluff
> >> ---
> >>   src/bin/e_alert_main.c          |   2 -
> >>   src/bin/e_drm2.x                | 145 
> >> ----------------------------------------
> >>   src/modules/wl_drm/e_mod_main.c |  33 +++------
> >>   3 files changed, 8 insertions(+), 172 deletions(-)
> >>
> >> diff --git a/src/bin/e_alert_main.c b/src/bin/e_alert_main.c
> >> index e7f2cf21e..10db0a482 100644
> >> --- a/src/bin/e_alert_main.c
> >> +++ b/src/bin/e_alert_main.c
> >> @@ -1,7 +1,5 @@
> >>   #include "config.h"
> >>   -//# include "e_drm2.x"
> >> -
> >>   #include <Elementary.h>
> >>   #ifndef HAVE_WAYLAND_ONLY
> >>   # include <Ecore_X.h>
> >> diff --git a/src/bin/e_drm2.x b/src/bin/e_drm2.x
> >> deleted file mode 100644
> >> index 097211d3e..000000000
> >> --- a/src/bin/e_drm2.x
> >> +++ /dev/null
> >> @@ -1,145 +0,0 @@
> >> -# include <dlfcn.h>
> >> -
> >> -static int crude_hack_fd;
> >> -static void *e_drm2_lib;
> >> -
> >> -void (*sym_ecore_drm2_output_crtc_size_get_120)(Ecore_Drm2_Output 
> >> *output, int *w, int *h);
> >> -void (*sym_ecore_drm2_output_geometry_get_120)(Ecore_Drm2_Output 
> >> *output, int *x, int *y, int *w, int *h);
> >> -void (*sym_ecore_drm2_output_resolution_get_120)(Ecore_Drm2_Output 
> >> *output, int *w, int *h, unsigned int *refresh);
> >> -Ecore_Drm2_Device *(*sym_ecore_drm2_device_find_120)(const char 
> >> *seat, unsigned int tty);
> >> -int (*sym_ecore_drm2_device_open_120)(Ecore_Drm2_Device *device);
> >> -Ecore_Drm2_Device *(*sym_ecore_drm2_device_open_121)(const char 
> >> *seat, unsigned int tty);
> >> -void (*sym_ecore_drm2_device_free_120)(Ecore_Drm2_Device *device);
> >> -void (*sym_ecore_drm2_output_info_get_121)(Ecore_Drm2_Output 
> >> *output, int *x, int *y, int *w, int *h, unsigned int *refresh);
> >> -Ecore_Drm2_Fb *(*sym_ecore_drm2_fb_create_120)(int fd, int width, 
> >> int height, int depth, int bpp, unsigned int format);
> >> -Ecore_Drm2_Fb *(*sym_ecore_drm2_fb_create_121)(Ecore_Drm2_Device 
> >> *dev, int width, int height, int depth, int bpp, unsigned int format);
> >> -int (*sym_ecore_drm2_output_rotation_get_122)(Ecore_Drm2_Output 
> >> *output);
> >> -Eina_Bool 
> >> (*sym_ecore_drm2_output_rotation_set_122)(Ecore_Drm2_Output *output, 
> >> int rotation);
> >> -
> >> -#define E_DRM2_EFL_VERSION_MINIMUM(MAJ, MIN, MIC) \
> >> -  ((eina_version->major > MAJ) || (eina_version->minor > MIN) ||\
> >> -   ((eina_version->minor == MIN) && (eina_version->micro >= MIC)))
> >> -
> >> -static Eina_Bool
> >> -e_drm2_compat_init(void)
> >> -{
> >> -#define EDRM2SYM(sym, ver) \
> >> -   sym_##sym##_##ver = dlsym(e_drm2_lib, #sym); \
> >> -   if (!sym_##sym##_##ver) \
> >> -     { \
> >> -        dlclose(e_drm2_lib); \
> >> -        e_drm2_lib = NULL; \
> >> -        return EINA_FALSE; \
> >> -     }
> >> -
> >> -   e_drm2_lib = dlopen("libecore_drm2.so.1", RTLD_NOW | RTLD_LOCAL);
> >> -
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 21, 99))
> >> -     {
> >> -        EDRM2SYM(ecore_drm2_output_rotation_get, 122);
> >> -        EDRM2SYM(ecore_drm2_output_rotation_set, 122);
> >> -     }
> >> -
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 20, 99))
> >> -     {
> >> -        EDRM2SYM(ecore_drm2_device_open, 121);
> >> -        EDRM2SYM(ecore_drm2_output_info_get, 121);
> >> -        EDRM2SYM(ecore_drm2_fb_create, 121);
> >> -        return EINA_TRUE;
> >> -     }
> >> -
> >> -   EDRM2SYM(ecore_drm2_output_crtc_size_get, 120);
> >> -   EDRM2SYM(ecore_drm2_output_geometry_get, 120);
> >> -   EDRM2SYM(ecore_drm2_output_resolution_get, 120);
> >> -   EDRM2SYM(ecore_drm2_device_find, 120);
> >> -   EDRM2SYM(ecore_drm2_device_open, 120);
> >> -   EDRM2SYM(ecore_drm2_device_free, 120);
> >> -   EDRM2SYM(ecore_drm2_fb_create, 120);
> >> -   return EINA_TRUE;
> >> -
> >> -#undef EDRM2SYM
> >> -}
> >> -
> >> -static void
> >> -e_drm2_compat_shutdown(void)
> >> -{
> >> -   if (e_drm2_lib) dlclose(e_drm2_lib);
> >> -}
> >> -
> >> -static inline Ecore_Drm2_Device *
> >> -e_drm2_device_open(const char *seat, int vt)
> >> -{
> >> -   Ecore_Drm2_Device *out;
> >> -
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 20, 99))
> >> -     {
> >> -        return sym_ecore_drm2_device_open_121(seat, vt);
> >> -     }
> >> -
> >> -   out = sym_ecore_drm2_device_find_120(seat, vt);
> >> -   if (!out) return NULL;
> >> -
> >> -   crude_hack_fd = sym_ecore_drm2_device_open_120(out);
> >> -   if (crude_hack_fd < 0)
> >> -     {
> >> -        ecore_drm2_device_close(out);
> >> -        return NULL;
> >> -     }
> >> -   return out;
> >> -}
> >> -
> >> -static inline void
> >> -e_drm2_device_close(Ecore_Drm2_Device *device)
> >> -{
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 20, 99))
> >> -     {
> >> -        ecore_drm2_device_close(device);
> >> -        return;
> >> -     }
> >> -   ecore_drm2_device_close(device);
> >> -   sym_ecore_drm2_device_free_120(device);
> >> -}
> >> -
> >> -static inline void
> >> -e_drm2_output_info_get(Ecore_Drm2_Output *op, int *x, int *y, int 
> >> *w, int *h, unsigned int *refresh)
> >> -{
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 20, 99))
> >> -     {
> >> -        sym_ecore_drm2_output_info_get_121(op, x, y, w, h, refresh);
> >> -        return;
> >> -     }
> >> -   sym_ecore_drm2_output_geometry_get_120(op, x, y, w, h);
> >> -   sym_ecore_drm2_output_resolution_get_120(op, NULL, NULL, refresh);
> >> -}
> >> -
> >> -static inline Ecore_Drm2_Fb *
> >> -e_drm2_fb_create(Ecore_Drm2_Device *device, int width, int height, 
> >> int depth, int bpp, unsigned int format)
> >> -{
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 20, 99))
> >> -     {
> >> -        return sym_ecore_drm2_fb_create_121(device, width, height, 
> >> depth, bpp, format);
> >> -     }
> >> -   return sym_ecore_drm2_fb_create_120(crude_hack_fd, width, height, 
> >> depth, bpp, format);
> >> -}
> >> -
> >> -static int
> >> -e_drm2_output_rotation_get(Ecore_Drm2_Output *output)
> >> -{
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 21, 99))
> >> -     {
> >> -        return sym_ecore_drm2_output_rotation_get_122(output);
> >> -     }
> >> -   return 0;
> >> -}
> >> -
> >> -static Eina_Bool
> >> -e_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation)
> >> -{
> >> -   if (E_DRM2_EFL_VERSION_MINIMUM(1, 21, 99))
> >> -     {
> >> -        return sym_ecore_drm2_output_rotation_set_122(output, 
> >> rotation);
> >> -     }
> >> -   return EINA_FALSE;
> >> -}
> >> -
> >> -#undef E_DRM2_EFL_VERSION_MINIMUM
> >> diff --git a/src/modules/wl_drm/e_mod_main.c 
> >> b/src/modules/wl_drm/e_mod_main.c
> >> index 9a74469f4..bb8582c52 100644
> >> --- a/src/modules/wl_drm/e_mod_main.c
> >> +++ b/src/modules/wl_drm/e_mod_main.c
> >> @@ -4,7 +4,6 @@
> >>     #include <Ecore_Drm2.h>
> >>   #include <Elput.h>
> >> -#include "e_drm2.x"
> >>     static Ecore_Event_Handler *seat_handler;
> >>   @@ -402,12 +401,12 @@ _drm2_randr_create(void)
> >>                  {
> >>                     unsigned int refresh;
> >>   -                  e_drm2_output_info_get(output,
> >> - &s->config.geom.x,
> >> - &s->config.geom.y,
> >> - &s->config.geom.w,
> >> - &s->config.geom.h,
> >> -                                         &refresh);
> >> +                  ecore_drm2_output_info_get(output,
> >> + &s->config.geom.x,
> >> + &s->config.geom.y,
> >> + &s->config.geom.w,
> >> + &s->config.geom.h,
> >> +                                             &refresh);
> >>                     s->config.mode.w = s->config.geom.w;
> >>                     s->config.mode.h = s->config.geom.h;
> >>                     s->config.mode.refresh = refresh;
> >> @@ -419,7 +418,7 @@ _drm2_randr_create(void)
> >>                            s->config.geom.w, s->config.geom.h);
> >>                  }
> >>   -             outrot = e_drm2_output_rotation_get(output);
> >> +             outrot = ecore_drm2_output_rotation_get(output);
> >>                if (outrot & ECORE_DRM2_ROTATION_NORMAL)
> >>                  s->config.rotation = 0;
> >>                else if (outrot & ECORE_DRM2_ROTATION_90)
> >> @@ -714,7 +713,7 @@ _drm2_randr_apply(void)
> >> ecore_drm2_output_enabled_set(outconf[i],
> >> screenconf[i]->config.enabled);
> >>   -                       e_drm2_output_rotation_set(outconf[i], 
> >> orient);
> >> + ecore_drm2_output_rotation_set(outconf[i], orient);
> >> ecore_evas_rotation_with_resize_set(e_comp->ee,
> >> screenconf[i]->config.rotation);
> >> @@ -902,15 +901,9 @@ _drm_device_del(void *data EINA_UNUSED, const 
> >> Efl_Event *event)
> >>      seat = efl_input_device_seat_get(event->info);
> >>        if (seat != evas_default_device_get(e_comp->evas, 
> >> EVAS_DEVICE_CLASS_SEAT)) return;
> >> -#ifdef EFL_VERSION_1_23
> >>      if (!efl_input_device_is_pointer_type_get(event->info)) return;
> >>      if (efl_input_device_pointer_device_count_get(seat) == 1)
> >>        ecore_evas_cursor_device_unset(e_comp->ee, event->info);
> >> -#else
> >> -   if (!efl_input_device_has_pointer_caps(event->info)) return;
> >> -   if (efl_input_device_has_pointer_caps(seat) == 1)
> >> -     ecore_evas_cursor_device_unset(e_comp->ee, event->info);
> >> -#endif
> >>   }
> >>     E_API void *
> >> @@ -929,8 +922,6 @@ e_modapi_init(E_Module *m)
> >>      /*      return NULL; */
> >>      /*   } */
> >>   -   if (!e_drm2_compat_init()) return NULL;
> >> -
> >>      if (e_comp_config_get()->engine == E_COMP_ENGINE_GL)
> >>        {
> >>           e_comp->ee = ecore_evas_new("gl_drm", 0, 0, 1, 1, NULL);
> >> @@ -965,14 +956,7 @@ e_modapi_init(E_Module *m)
> >>      ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &w, &h);
> >>      if (!e_comp_canvas_init(w, h)) return NULL;
> >>   -#ifdef EFL_VERSION_1_21
> >>      arr[0].desc = EFL_CANVAS_SCENE_EVENT_DEVICE_REMOVED;
> >> -#else
> >> -   if (E_EFL_VERSION_MINIMUM(1, 20, 99))
> >> -     arr[0].desc = dlsym(NULL, 
> >> "_EFL_CANVAS_SCENE_EVENT_DEVICE_REMOVED");
> >> -   if (!arr[0].desc)
> >> -     arr[0].desc = dlsym(NULL, "_EFL_CANVAS_EVENT_DEVICE_REMOVED");
> >> -#endif
> >>      ecore_evas_pointer_xy_get(e_comp->ee, &e_comp_wl->ptr.x,
> >>                                &e_comp_wl->ptr.y);
> >>      evas_event_feed_mouse_in(e_comp->evas, 0, NULL);
> >> @@ -1012,6 +996,5 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
> >>      activate_handler = NULL;
> >>        E_FREE_FUNC(input_handler, ecore_event_handler_del);
> >> -   e_drm2_compat_shutdown();
> >>      return 1;
> >>   }
> >>
> 
> 
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
Carsten Haitzler - ras...@rasterman.com



_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to