forked from enlightenment/efl
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:
parent
f7608b1e90
commit
7404904a43
|
@ -37,9 +37,6 @@ DEFINE_OLEGUID(IID_IUnknown, 0x00000000L, 0, 0);
|
||||||
|
|
||||||
#define IDI_ICON 101
|
#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;
|
static int _ecore_win32_init_count = 0;
|
||||||
|
|
||||||
LRESULT CALLBACK
|
LRESULT CALLBACK
|
||||||
|
@ -199,31 +196,17 @@ _ecore_win32_window_procedure(HWND window,
|
||||||
/* Window notifications */
|
/* Window notifications */
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
{
|
{
|
||||||
efl_AddClipboardFormatListener acfl;
|
|
||||||
|
|
||||||
INF("create window message");
|
INF("create window message");
|
||||||
|
if (!AddClipboardFormatListener(window))
|
||||||
acfl = (efl_AddClipboardFormatListener)GetProcAddress(GetModuleHandle("user32.dll"),
|
INF("can not create clipboard format listener; no clipboard notification will be sent");
|
||||||
"AddClipboardFormatListener");
|
|
||||||
if (acfl)
|
|
||||||
{
|
|
||||||
if (!acfl(window))
|
|
||||||
INF("can not create clipboard format listener; no clipboard notification will be sent");
|
|
||||||
}
|
|
||||||
_ecore_win32_event_handle_create_notify(data);
|
_ecore_win32_event_handle_create_notify(data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
{
|
{
|
||||||
efl_RemoveClipboardFormatListener rcfl;
|
|
||||||
|
|
||||||
INF("destroy window message");
|
INF("destroy window message");
|
||||||
_ecore_win32_event_handle_destroy_notify(data);
|
_ecore_win32_event_handle_destroy_notify(data);
|
||||||
|
RemoveClipboardFormatListener(window);
|
||||||
rcfl = (efl_RemoveClipboardFormatListener)GetProcAddress(GetModuleHandle("user32.dll"),
|
|
||||||
"RemoveClipboardFormatListener");
|
|
||||||
if (rcfl)
|
|
||||||
rcfl(window);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case WM_SHOWWINDOW:
|
case WM_SHOWWINDOW:
|
||||||
|
|
Loading…
Reference in New Issue