ecore_win32: use AddClipboardFormatListener and RemoveClipboardFormatListener explicitely

instead of loading them from user32.dll

Summary: current mingw-w64 declare these functions

Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8644
This commit is contained in:
Vincent Torri 2019-04-17 17:31:21 -04:00 committed by Mike Blumenkrantz
parent f7608b1e90
commit 7404904a43
1 changed files with 3 additions and 20 deletions

View File

@ -37,9 +37,6 @@ DEFINE_OLEGUID(IID_IUnknown, 0x00000000L, 0, 0);
#define IDI_ICON 101
typedef BOOL WINAPI (*efl_AddClipboardFormatListener)(_In_ HWND hwnd);
typedef BOOL WINAPI (*efl_RemoveClipboardFormatListener)(_In_ HWND hwnd);
static int _ecore_win32_init_count = 0;
LRESULT CALLBACK
@ -199,31 +196,17 @@ _ecore_win32_window_procedure(HWND window,
/* Window notifications */
case WM_CREATE:
{
efl_AddClipboardFormatListener acfl;
INF("create window message");
acfl = (efl_AddClipboardFormatListener)GetProcAddress(GetModuleHandle("user32.dll"),
"AddClipboardFormatListener");
if (acfl)
{
if (!acfl(window))
INF("can not create clipboard format listener; no clipboard notification will be sent");
}
if (!AddClipboardFormatListener(window))
INF("can not create clipboard format listener; no clipboard notification will be sent");
_ecore_win32_event_handle_create_notify(data);
return 0;
}
case WM_DESTROY:
{
efl_RemoveClipboardFormatListener rcfl;
INF("destroy window message");
_ecore_win32_event_handle_destroy_notify(data);
rcfl = (efl_RemoveClipboardFormatListener)GetProcAddress(GetModuleHandle("user32.dll"),
"RemoveClipboardFormatListener");
if (rcfl)
rcfl(window);
RemoveClipboardFormatListener(window);
return 0;
}
case WM_SHOWWINDOW: