Commit Graph

83 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 95c2248065 ecore_drm: Rename EAPI macro to ECORE_DRM_API in Ecore DRM library
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

EAPI was designed to be able to pass
```__attribute__ ((visibility ("default")))``` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
```__atttribute__((visibility("default")))```.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
EAPI is the only solution that worked for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
2020-10-15 15:48:08 -03:00
Elyes HAOUAS 1fd0435f21 Get rid of trailing whitespaces (4 / 14)
Remove trailing whitespaces
Differential Revision: https://phab.enlightenment.org/D12002
2020-06-23 10:29:14 +02:00
Xavi Artigas 203c3963ef doxygen docs: Fix missing links in Ecore_Drm
Ecore_Drm_Input had SOME docs, so a group for them is created.
Ecore_Drm_Sprite had NO DOCS at all, so the link is just removed.
This is a deprecated library anyway.
2020-04-29 17:33:39 +02:00
Xavi Artigas e7f4bc4c2a doxygen docs: Fix all invalid @param names
There were quite a few of these...
2020-04-20 12:24:41 +02:00
Vincent Torri 4ae6eeb2cf efl: remove _MSC_VER (Visual Studio macro) usage in source code 2018-01-04 12:59:47 -08:00
Myoungwoon Roy, Kim 8c19d9251d docs: Fix typos and some wrong expressions
Covers: Ecore_Drm, Ecore_Evas, Ecore_File, Ecore_IMF, and
Ecore_IMF_Evas API reference doxygen.

Summary: I had fixed some typos and wrong expressions, such
as capital letters, singular Etc. in Ecore_Drm, Ecore_Evas,
Ecore_File, Ecore_IMF, and Ecore_IMF_Evas API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: stefan, cedric, raster, jpeg, Jaehyun_Cho

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4680
2017-02-27 19:37:43 +09:00
Chris Michael af22796356 ecore-drm: Deprecate Ecore_Drm library
Small patch to deprecate Ecore_Drm. This patch also adds a configure
option to enable ecore_drm for older code. This option is disabled by
default, so must be explicitly specified during build.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-31 10:05:28 -04:00
Chris Michael 4e64fb046e ecore-drm: Fix typo in doxygen
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-21 08:55:01 -04:00
Derek Foreman ddc6962d77 ecore_drm: Add pointer warping API
Adds a new API: ecore_drm_device_pointer_warp() which warps the pointer
to the specified location.  All libinput seats with pointers are warped.
2016-02-18 15:50:16 -05:00
Derek Foreman 5d7271683b ecore_drm: Change page flipping logic so we can't tear
Summary:
Previously if we ever tried to queue up two page flips in less than a
retrace interval (which can easily happen since the evas clock isn't
based on vblank) we'd give up on ever using page flips again, and tear
on every screen update.

This fixes that by using a vblank callback for custom ticks and using
page flips whenever possible.

If a page flip fails it means a page flip raced with the vblank ticker,
so we need to queue up that frame when the current page flip completes.
This ensures that while we might drop interim frames, we will never
lose the most recent.

Now it should only be possible to tear if two ticks fire during the
wait for a page flip to complete.  This would result in rendering
taking place in the front buffer.  I don't think this can happen,
but an error is logged if it does.

Reviewers: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3594
2016-02-18 15:50:15 -05:00
Chris Michael 1486c7053a This should not have been pushed. Unsure what happened here, but
revert this

Revert "ecore-drm: Add opaque type for Plane support"

This reverts commit 94082f54e8.
2016-02-04 09:44:17 -05:00
Chris Michael 94082f54e8 ecore-drm: Add opaque type for Plane support
This adds an opaque structure to represent a hardware plane for use in
rotation, setting cursor/overlay/primary plane content, etc

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>

ecore-drm: Add API functions for rotation support

This adds 2 new API functions for getting supported rotations from an
output, and for setting rotation on an output.

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:35:51 -05:00
Chris Michael 26eefa970f ecore-drm: Add API function to set rotation on an output
This patch adds an API function to allow the Screen Setup dialog in
Enlightenment to support setting rotations on an output when running
under drm

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:27:40 -05:00
Chris Michael bb774a538e ecore-drm: Add API function to get supported rotations from an output
This patch adds an API function so that we can get the supported
rotations from an output. This is needed so that the Screen Setup
dialog in Enlightenment can list the rotations supported for the user
to choose from while running using drm

@feature

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 09:27:38 -05:00
Chris Michael babd202d05 ecore-drm: Add opaque structure for Ecore_Drm_Plane
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-04 08:53:16 -05:00
JengHyun Kang b3dc27345a ecore-drm: Add a new API for keymap cache
Summary:
Originally, each keyboard devices could have their own keymap.
The one keyboard's keymap could different with others.
But for this, Ecore_Drm compile a new keymap when a keyboard is connected.
But this is a burden for some people who doesn't manage keymap for each keyboard.
They want to maintain only one keymap for system.
So, I added cached context/keymap and just ref/unref for each keyboard device.
People who want to different keymap for each keyboard just do not set cached
context/keymap. Then Ecore_Drm maintain keymaps about each keyboard devices.

Test Plan:
Connect a keyboard device and watch flow of ioctl.
Originally Ecore_Drm opened xkb data and compile keymap,
but after patch, that ioctl is disppeared.

@feature

Reviewers: raster, devilhorns, ManMower

Reviewed By: devilhorns, ManMower

Subscribers: cedric, input.hacker, ohduna, jpeg

Differential Revision: https://phab.enlightenment.org/D3503
2016-01-04 08:47:58 -05:00
JengHyun Kang eb9b894167 Add a new Ecore_Drm API for setting left-handed mouse
Summary:
Add a new Ecore_Drm API named ecore_drm_device_left_handed_set().
Libinput support various input options. Left handed mode is one of options.
Right-handed people and left-handed people use a mouse
using different button mapping.
So if a left handed option is enabled, libinput change right mouse button and
left mouse button.
So support this option, I added this api using libinput's left handed option.

@feature

Test Plan:
After set left handed mode, left mouse button generate button numbered 3,
and right mouse button generate button numbered 1.

Reviewers: raster, ManMower, devilhorns

Subscribers: ohduna, cedric, jpeg, input.hacker

Differential Revision: https://phab.enlightenment.org/D3431
2015-12-29 09:04:16 -05:00
Sung-Jin Park 936350d37f ecore-drm: Add APIs to support key remap functionality
Summary:
This adds two new APIs to enable/set key remap functionality and
a number of keys to be remapped to the other keys. As of now there is no
api to do this therefore we need to remap using linux utility such as
'setkeycodes'. By adding/calling these apis, each Ecore_Drm_Evdev device
will have its specific key remap hash and we can apply each remapping keys
for each key/keyboard device.

Test Plan:
(1) Enable key remap and set remapping of a key on a specific keyboard device
(2) Plug in the keyboard device and check the key is being remapped or not
(3) Check the other keys are coming normally
(4) Check the the remapping key on a specific keyboard doesn't affect to any other devices

Signed-off-by: Sung-Jin Park <input.hacker@gmail.com>

Reviewers: raster, zmike, gwanglim, ManMower, devilhorns

Subscribers: JHyun, ohduna, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3463
2015-12-28 09:24:58 -05:00
Chris Michael bcf3b442dd ecore-drm: Add API function to set a new mode on an output
Summary: This adds a new API function (ecore_drm_output_mode_set) that
we can use from within RandR code to set the resolution of an output
(or disable an output if NULL is passed in).

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:15 -04:00
Chris Michael 3aaa9f2f9f ecore-drm: Fix purpose of ecore_drm_output_enable/disable functions
Summary: These API functions should be used for enable/disable of a
given output. They were previously being misused to stop/start
rendering on an output when we VT switch away so now we add an
internal function we can call to disable/enable rendering.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:03 -04:00
Chris Michael e577a108cf ecore-drm: Add a 'name' field to Ecore_Drm_Event_Output
Summary: This adds a new 'name' field to the Ecore_Drm_Event_Output
structure so that when we catch drm output events in E, we can compare
this name to find an e_randr screen and update compositor's outputs.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 12:07:31 -04:00
Chris Michael 8a3441dfe9 ecore-drm: Add API function to test if an output can go on a given crtc
Summary: This adds a new API function to test if a given
Ecore_Drm_Output can be used on a given crtc. This is needed for DRM
RandR support

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 08:57:47 -04:00
Chris Michael 958b15c207 ecore-drm: Add new API function to mark an output as primary
Summary: This adds a new API function which we can use to mark a given
Ecore_Drm_Output as being the primary output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 2145cb18c2 ecore-drm: Add API function to find an output given a name
Summary: This adds a new API function to find an Ecore_Drm_Output
which matches a given name.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 03a242f263 ecore-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 49de7d0ee8 ecore-drm: Add API function to get an output's crtc size
Summary: This adds a new API function to return an output's crtc size.
This is mainly used for drm RandR config in E

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 8120cdcc13 ecore-drm: Add API function to return primary output
Summary: This adds a new API function to return the output which is
marked as the primary output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 1ab4975491 ecore-drm: Add API function to return output modes
Summary: This adds a new API function to return a list of modes
supported on a given output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 34664306a9 ecore-drm: Add API function to return the edid of a given output
Summary: This adds a new API function to return the EDID string of a
given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 130ad6d60f ecore-drm: Add API function to return if a given output has a backlight
Summary: This adds a new API function to call so we can check if a
given Ecore_Drm_Output has a backlight

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 4d2290847f ecore-drm: Add API function to return the connector type of a given output
Summary: This adds a new API function to return the connector type of
an Ecore_Drm_Output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael c4461ac5d8 ecore-drm: Add API function to return output connected state
Summary: This adds a new API function to check if a given output is connected or not.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Chris Michael 2606735b39 ecore-drm: Add API function to return the name of an output
Summary: This adds a new API function to turn the name of a given Ecore_Drm_Output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Chris Michael 29362040b2 ecore-drm: Add API function to return screen size range
Summary: This adds new API function to return the min & max width &
height of valid screen range for an Ecore_Drm_Device

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Chris Michael 26ebd007af ecore-drm: Add missing doxy for ecore_drm_output_enable
Summary: This adds missing doxygen for function ecore_drm_output_enable

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-05 13:51:00 -04:00
Mike Blumenkrantz 4e7549683b ecore-drm: fix ecore_drm_devices_get() to return a const value
this is the internal device list, we're pretty hosed if someone decides
to free it because there's no const
2015-04-22 19:34:59 -04:00
Chris Michael 50c47e36eb ecore-drm: Add pending_flip field to Ecore_Drm_Fb
Summary: This adds a pending_flip field to Ecore_Drm_Fb structure so
that when we schedule a pageflip event we can wait until the flip is
complete before trying to reuse the buffer again.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16 10:25:46 -04:00
Chris Michael 3cb5c2bf0b ecore-drm: Change @since 1.15 to @since 1.14 for newly added APIs
Summary: As requested by stefan, change newly added APIs to be @since
1.15

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 10985880c2 ecore-drm: Add 2 new API functions for setting and sending framebuffers
Summary: This adds 2 new API functions we can use from within the evas
drm engine to set framebuffers as current, and to call a pageflip on
given buffers.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael a5d180b282 ecore-drm: Add an API function to return the connector id of an output
Summary: This adds an API function to return the connector id of a
given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 4a1cbeb258 ecore-drm: Whitespace removal
Summary: No functional changes, just removing whitespace

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e18f82632d ecore-drm: Add API function to return an output's crtc id
Summary: This adds an API function to return the crtc id of an output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 63ff8eaf3d ecore-drm: Add API function to return an output crtc buffer id
Summary: This adds an API function to return an output's crtc buffer id

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e11be98ed0 ecore-drm: Add API function to find an output at given coordinates
Summary: This commit adds an API function that can be used to find an
output given an x/y coordinate pair.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 70e8a00271 ecore-drm: Move doxygen documentation to main Ecore_Drm header
Summary: This moves all doxygen to the main Ecore_Drm header to match
rest of efl.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael db87e02ac6 ecore-drm: Remove unused API function that should not have been committed
Summary: This API was added in the header while testing a theory, and
should not have been committed.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 8f661eb5d1 ecore-drm: Move drm headers to Ecore_Drm
Summary: Since we only create one drm context in the drm_device
structure now, we need the drm headers to be included in Ecore_Drm.h

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 3832cd59b8 ecore-drm: Create drmEventContext Once during device open
Summary: This changes allows us to reuse the same drmEventContext once
so that when we get drm events, we are not constantly recreating the
drmEventContext.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e1dfa64159 ecore-drm: Add API function to disable an output
Summary: This adds a new API function we can call to disable an Ecore_Drm_Output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00