summaryrefslogtreecommitdiff
path: root/src/lib/ecore_win32
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-04-17 17:31:21 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-04-17 17:31:21 -0400
commit7404904a43992e008ef8f186216a9aba8006404c (patch)
treee3ced80db11ad9595a953b3e9d5cdc89be090aa8 /src/lib/ecore_win32
parentf7608b1e90bb28fb384dd6ba50546fad09e866a2 (diff)
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
Diffstat (limited to 'src/lib/ecore_win32')
-rw-r--r--src/lib/ecore_win32/ecore_win32.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/lib/ecore_win32/ecore_win32.c b/src/lib/ecore_win32/ecore_win32.c
index 58c9449027..1ee8b2fbdf 100644
--- a/src/lib/ecore_win32/ecore_win32.c
+++ b/src/lib/ecore_win32/ecore_win32.c
@@ -37,9 +37,6 @@ DEFINE_OLEGUID(IID_IUnknown, 0x00000000L, 0, 0);
37 37
38#define IDI_ICON 101 38#define IDI_ICON 101
39 39
40typedef BOOL WINAPI (*efl_AddClipboardFormatListener)(_In_ HWND hwnd);
41typedef BOOL WINAPI (*efl_RemoveClipboardFormatListener)(_In_ HWND hwnd);
42
43static int _ecore_win32_init_count = 0; 40static int _ecore_win32_init_count = 0;
44 41
45LRESULT CALLBACK 42LRESULT CALLBACK
@@ -199,31 +196,17 @@ _ecore_win32_window_procedure(HWND window,
199 /* Window notifications */ 196 /* Window notifications */
200 case WM_CREATE: 197 case WM_CREATE:
201 { 198 {
202 efl_AddClipboardFormatListener acfl;
203
204 INF("create window message"); 199 INF("create window message");
205 200 if (!AddClipboardFormatListener(window))
206 acfl = (efl_AddClipboardFormatListener)GetProcAddress(GetModuleHandle("user32.dll"), 201 INF("can not create clipboard format listener; no clipboard notification will be sent");
207 "AddClipboardFormatListener");
208 if (acfl)
209 {
210 if (!acfl(window))
211 INF("can not create clipboard format listener; no clipboard notification will be sent");
212 }
213 _ecore_win32_event_handle_create_notify(data); 202 _ecore_win32_event_handle_create_notify(data);
214 return 0; 203 return 0;
215 } 204 }
216 case WM_DESTROY: 205 case WM_DESTROY:
217 { 206 {
218 efl_RemoveClipboardFormatListener rcfl;
219
220 INF("destroy window message"); 207 INF("destroy window message");
221 _ecore_win32_event_handle_destroy_notify(data); 208 _ecore_win32_event_handle_destroy_notify(data);
222 209 RemoveClipboardFormatListener(window);
223 rcfl = (efl_RemoveClipboardFormatListener)GetProcAddress(GetModuleHandle("user32.dll"),
224 "RemoveClipboardFormatListener");
225 if (rcfl)
226 rcfl(window);
227 return 0; 210 return 0;
228 } 211 }
229 case WM_SHOWWINDOW: 212 case WM_SHOWWINDOW: