Răsfoiți Sursa

UPD: Synchronize SDK with github

Alexander Koblov 8 ani în urmă
părinte
comite
f8528e0814
3 a modificat fișierele cu 46 adăugiri și 4 ștergeri
  1. 17 2
      sdk/common.h
  2. 14 1
      sdk/wdxplugin.h
  3. 15 1
      sdk/wlxplugin.h

+ 17 - 2
sdk/common.h

@@ -1,3 +1,6 @@
+#ifndef _COMMON_H
+#define _COMMON_H
+
 #ifdef __GNUC__
 
 #include <stdint.h>
@@ -5,11 +8,12 @@
 #if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
   #define DCPCALL __attribute__((stdcall))
 #else
-  #define DCPCALL __attribute__((cdecl))
+  #define DCPCALL
 #endif
 
 #define MAX_PATH 260
 
+typedef int32_t LONG;
 typedef uint32_t DWORD;
 typedef uint16_t WORD;
 typedef void *HANDLE;
@@ -19,9 +23,18 @@ typedef HANDLE HWND;
 typedef int BOOL;
 typedef char CHAR;
 typedef uint16_t WCHAR;
+typedef intptr_t LPARAM;
+typedef uintptr_t WPARAM;
 
 #pragma pack(push, 1)
 
+typedef struct _RECT {
+  LONG left;
+  LONG top;
+  LONG right;
+  LONG bottom;
+} RECT, *PRECT;
+
 typedef struct _FILETIME {
 	DWORD dwLowDateTime;
 	DWORD dwHighDateTime;
@@ -63,4 +76,6 @@ typedef struct _WIN32_FIND_DATAW {
   #define DCPCALL __cdecl
 #endif
 
-#endif
+#endif
+
+#endif // _COMMON_H

+ 14 - 1
sdk/wdxplugin.h

@@ -1,3 +1,6 @@
+#ifndef _WDX_H
+#define _WDX_H
+
 #include "common.h"
 
 // Contents of file contplug.h version 2.0
@@ -80,6 +83,10 @@ typedef struct {
 	WORD wSecond;
 } ttimeformat,*ptimeformat;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int DCPCALL ContentGetDetectString(char* DetectString,int maxlen);
 int DCPCALL ContentGetSupportedField(int FieldIndex,char* FieldName,char* Units,int maxlen);
 int DCPCALL ContentGetValue(char* FileName,int FieldIndex,int UnitIndex,void* FieldValue,int maxlen,int flags);
@@ -97,4 +104,10 @@ int DCPCALL ContentSetValueW(WCHAR* FileName,int FieldIndex,int UnitIndex,int Fi
 int DCPCALL ContentEditValue(HWND ParentWin,int FieldIndex,int UnitIndex,int FieldType,
                 void* FieldValue,int maxlen,int flags,char* langidentifier);
 void DCPCALL ContentSendStateInformation(int state,char* path);
-void DCPCALL ContentSendStateInformationW(int state,WCHAR* path);
+void DCPCALL ContentSendStateInformationW(int state,WCHAR* path);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _WDX_H

+ 15 - 1
sdk/wlxplugin.h

@@ -1,3 +1,6 @@
+#ifndef _WLX_H
+#define _WLX_H
+
 #include "common.h"
 
 /* Contents of file listplug.h */
@@ -39,6 +42,10 @@ typedef struct {
 	char DefaultIniName[MAX_PATH];
 } ListDefaultParamStruct;
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 HWND DCPCALL ListLoad(HWND ParentWin,char* FileToLoad,int ShowFlags);
 HWND DCPCALL ListLoadW(HWND ParentWin,WCHAR* FileToLoad,int ShowFlags);
 int DCPCALL ListLoadNext(HWND ParentWin,HWND PluginWin,char* FileToLoad,int ShowFlags);
@@ -60,4 +67,11 @@ HBITMAP DCPCALL ListGetPreviewBitmap(char* FileToLoad,int width,int height,
 
     char* contentbuf,int contentbuflen);
 HBITMAP DCPCALL ListGetPreviewBitmapW(WCHAR* FileToLoad,int width,int height,
-    char* contentbuf,int contentbuflen);
+    char* contentbuf,int contentbuflen);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _WLX_H
+