Updated LibreOfficeKit headers

Change-Id: I6da94250d81d1f62d8f2191660b37b960033f11c
This commit is contained in:
Andras Timar 2018-02-15 10:08:47 +01:00
parent 591a0b5fed
commit 68b17446a0
4 changed files with 19 additions and 12 deletions

View file

@ -302,6 +302,7 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::postExtTextInputEvent
void (*postExtTextInputEvent) (LibreOfficeKitDocument* pThis,
unsigned nWindowId,
int nType,
const char* pText);

View file

@ -540,12 +540,14 @@ public:
/**
* Post the text input from external input window, like IME
*
* @param nWindowId Specify the window id to post the input event to. If
* nWindow is 0, the event is posted into the document
* @param nType see LibreOfficeKitExtTextInputType
* @param pText Text for LOK_EXT_TEXTINPUT
*/
void postExtTextInputEvent(int nType, const char* pText)
void postExtTextInputEvent(unsigned nWindowId, int nType, const char* pText)
{
mpDoc->pClass->postExtTextInputEvent(mpDoc, nType, pText);
mpDoc->pClass->postExtTextInputEvent(mpDoc, nWindowId, nType, pText);
}
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY

View file

@ -563,7 +563,7 @@ typedef enum
* - "invalidate" - the area as described by "rectangle" is invalidated
* Clients must request the new area
* - "cursor_invalidate" - cursor is invalidated. New position is in "rectangle"
* - "cursor_visible" - cursor visible status is changed. Status is availabe
* - "cursor_visible" - cursor visible status is changed. Status is available
* in "visible" field
* - "close" - window is closed
*/

View file

@ -68,7 +68,6 @@ extern "C"
{
(void)pPath;
}
#endif // IOS
static void *lok_dlsym(void *Hnd, const char *pName)
{
@ -79,10 +78,10 @@ extern "C"
{
return dlclose(Hnd);
}
#endif // IOS
#else
#pragma warning(disable:4996)
#if !defined WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
@ -165,12 +164,12 @@ extern "C"
}
#endif
#if !defined(IOS)
static void *lok_dlopen( const char *install_path, char ** _imp_lib )
{
char *imp_lib;
void *dlhandle;
#if !defined(IOS)
size_t partial_length, imp_lib_size;
struct stat dir_st;
@ -233,14 +232,10 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib )
return NULL;
}
}
#else
(void)install_path;
imp_lib = strdup("the app executable");
dlhandle = RTLD_MAIN_ONLY;
#endif
*_imp_lib = imp_lib;
return dlhandle;
}
#endif
typedef LibreOfficeKit *(LokHookFunction)( const char *install_path);
@ -248,10 +243,16 @@ typedef LibreOfficeKit *(LokHookFunction2)( const char *install_path, const char
typedef int (LokHookPreInit) ( const char *install_path, const char *user_profile_url );
#if defined(IOS)
extern __attribute__ ((visibility("default")))
LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path);
#endif
static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_profile_url )
{
char *imp_lib;
#if !defined(IOS)
void *dlhandle;
char *imp_lib;
LokHookFunction *pSym;
LokHookFunction2 *pSym2;
@ -288,6 +289,9 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p
// dlhandle is "leaked"
// coverity[leaked_storage]
return pSym2( install_path, user_profile_url );
#else
return libreofficekit_hook_2( install_path, user_profile_url );
#endif
}
static