zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7404904a43992e008ef8f186216a9aba8006404c

commit 7404904a43992e008ef8f186216a9aba8006404c
Author: Vincent Torri <[email protected]>
Date:   Wed Apr 17 17:31:21 2019 -0400

    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
---
 src/lib/ecore_win32/ecore_win32.c | 23 +++--------------------
 1 file 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);
 
 #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:

-- 


Reply via email to