2013-11-15 12:09:10 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2015-02-02 11:03:13 +01:00
|
|
|
#ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKIT_H
|
|
|
|
#define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKIT_H
|
2013-11-15 12:09:10 +00:00
|
|
|
|
2014-06-12 16:33:23 +01:00
|
|
|
#include <stddef.h>
|
|
|
|
|
2015-11-03 13:20:06 +01:00
|
|
|
#ifdef LOK_USE_UNSTABLE_API
|
|
|
|
// the unstable API needs C99's bool
|
|
|
|
#include <stdbool.h>
|
|
|
|
#endif
|
|
|
|
|
2015-03-13 09:14:16 +01:00
|
|
|
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
|
|
|
|
|
2013-11-15 12:09:10 +00:00
|
|
|
#ifdef __cplusplus
|
2014-04-06 12:05:13 +02:00
|
|
|
extern "C"
|
|
|
|
{
|
2013-11-15 12:09:10 +00:00
|
|
|
#endif
|
|
|
|
|
2014-06-10 11:31:51 +01:00
|
|
|
typedef struct _LibreOfficeKit LibreOfficeKit;
|
2014-06-17 15:13:33 +01:00
|
|
|
typedef struct _LibreOfficeKitClass LibreOfficeKitClass;
|
|
|
|
|
2014-06-10 11:31:51 +01:00
|
|
|
typedef struct _LibreOfficeKitDocument LibreOfficeKitDocument;
|
2014-06-17 15:13:33 +01:00
|
|
|
typedef struct _LibreOfficeKitDocumentClass LibreOfficeKitDocumentClass;
|
2013-11-15 12:09:10 +00:00
|
|
|
|
2014-06-12 13:28:26 +01:00
|
|
|
// Do we have an extended member in this struct ?
|
|
|
|
#define LIBREOFFICEKIT_HAS_MEMBER(strct,member,nSize) \
|
2015-03-10 16:13:39 +01:00
|
|
|
(offsetof(strct, member) < (nSize))
|
2014-06-12 13:28:26 +01:00
|
|
|
|
2014-06-17 15:13:33 +01:00
|
|
|
#define LIBREOFFICEKIT_HAS(pKit,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitClass,member,(pKit)->pClass->nSize)
|
2014-06-12 13:28:26 +01:00
|
|
|
|
2014-06-10 11:31:51 +01:00
|
|
|
struct _LibreOfficeKit
|
2014-06-17 15:13:33 +01:00
|
|
|
{
|
|
|
|
LibreOfficeKitClass* pClass;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _LibreOfficeKitClass
|
2014-04-06 12:05:13 +02:00
|
|
|
{
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
size_t nSize;
|
|
|
|
|
|
|
|
void (*destroy) (LibreOfficeKit* pThis);
|
|
|
|
|
|
|
|
LibreOfficeKitDocument* (*documentLoad) (LibreOfficeKit* pThis,
|
|
|
|
const char* pURL);
|
|
|
|
|
|
|
|
char* (*getError) (LibreOfficeKit* pThis);
|
|
|
|
|
|
|
|
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
|
|
|
|
const char* pURL,
|
|
|
|
const char* pOptions);
|
2015-05-06 16:43:33 +03:00
|
|
|
#ifdef LOK_USE_UNSTABLE_API
|
|
|
|
void (*registerCallback) (LibreOfficeKit* pThis,
|
|
|
|
LibreOfficeKitCallback pCallback,
|
|
|
|
void* pData);
|
2015-09-25 01:02:23 +02:00
|
|
|
|
|
|
|
/// @see lok::Office::getFilterTypes().
|
|
|
|
char* (*getFilterTypes) (LibreOfficeKit* pThis);
|
2015-05-06 16:43:33 +03:00
|
|
|
#endif
|
2013-11-15 12:09:10 +00:00
|
|
|
};
|
|
|
|
|
2014-06-17 15:13:33 +01:00
|
|
|
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
|
2014-06-12 13:28:26 +01:00
|
|
|
|
2014-06-10 11:31:51 +01:00
|
|
|
struct _LibreOfficeKitDocument
|
2014-06-17 15:13:33 +01:00
|
|
|
{
|
|
|
|
LibreOfficeKitDocumentClass* pClass;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _LibreOfficeKitDocumentClass
|
2014-04-06 12:05:13 +02:00
|
|
|
{
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
size_t nSize;
|
|
|
|
|
|
|
|
void (*destroy) (LibreOfficeKitDocument* pThis);
|
|
|
|
|
|
|
|
int (*saveAs) (LibreOfficeKitDocument* pThis,
|
|
|
|
const char* pUrl,
|
|
|
|
const char* pFormat,
|
|
|
|
const char* pFilterOptions);
|
2013-11-15 12:09:10 +00:00
|
|
|
|
2014-05-09 14:37:27 +01:00
|
|
|
#ifdef LOK_USE_UNSTABLE_API
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
/// @see lok::Document::getDocumentType().
|
|
|
|
int (*getDocumentType) (LibreOfficeKitDocument* pThis);
|
|
|
|
|
|
|
|
/// @see lok::Document::getParts().
|
|
|
|
int (*getParts) (LibreOfficeKitDocument* pThis);
|
|
|
|
|
2015-09-29 10:47:31 +02:00
|
|
|
/// @see lok::Document::getPartPageRectangles().
|
|
|
|
char* (*getPartPageRectangles) (LibreOfficeKitDocument* pThis);
|
|
|
|
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
/// @see lok::Document::getPart().
|
|
|
|
int (*getPart) (LibreOfficeKitDocument* pThis);
|
|
|
|
|
|
|
|
/// @see lok::Document::setPart().
|
|
|
|
void (*setPart) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nPart);
|
|
|
|
|
|
|
|
/// @see lok::Document::getPartName().
|
|
|
|
char* (*getPartName) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nPart);
|
|
|
|
|
2015-09-16 14:31:49 +02:00
|
|
|
/// @see lok::Document::setPartMode().
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
void (*setPartMode) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nMode);
|
|
|
|
|
|
|
|
/// @see lok::Document::paintTile().
|
|
|
|
void (*paintTile) (LibreOfficeKitDocument* pThis,
|
|
|
|
unsigned char* pBuffer,
|
|
|
|
const int nCanvasWidth,
|
|
|
|
const int nCanvasHeight,
|
|
|
|
const int nTilePosX,
|
|
|
|
const int nTilePosY,
|
|
|
|
const int nTileWidth,
|
|
|
|
const int nTileHeight);
|
|
|
|
|
|
|
|
/// @see lok::Document::getDocumentSize().
|
|
|
|
void (*getDocumentSize) (LibreOfficeKitDocument* pThis,
|
|
|
|
long* pWidth,
|
|
|
|
long* pHeight);
|
|
|
|
|
|
|
|
/// @see lok::Document::initializeForRendering().
|
2015-11-18 14:59:51 +01:00
|
|
|
void (*initializeForRendering) (LibreOfficeKitDocument* pThis,
|
|
|
|
const char* pArguments);
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
|
2015-09-16 14:31:49 +02:00
|
|
|
/// @see lok::Document::registerCallback().
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
void (*registerCallback) (LibreOfficeKitDocument* pThis,
|
2015-01-06 15:49:12 +01:00
|
|
|
LibreOfficeKitCallback pCallback,
|
|
|
|
void* pData);
|
2015-01-21 12:42:08 +01:00
|
|
|
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
/// @see lok::Document::postKeyEvent
|
|
|
|
void (*postKeyEvent) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nType,
|
|
|
|
int nCharCode,
|
|
|
|
int nKeyCode);
|
|
|
|
|
|
|
|
/// @see lok::Document::postMouseEvent
|
|
|
|
void (*postMouseEvent) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nType,
|
|
|
|
int nX,
|
|
|
|
int nY,
|
2015-10-04 19:40:13 +03:00
|
|
|
int nCount,
|
|
|
|
int nButtons,
|
|
|
|
int nModifier);
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
|
|
|
|
/// @see lok::Document::postUnoCommand
|
|
|
|
void (*postUnoCommand) (LibreOfficeKitDocument* pThis,
|
2015-04-22 14:28:36 +02:00
|
|
|
const char* pCommand,
|
2015-11-03 13:20:06 +01:00
|
|
|
const char* pArguments,
|
|
|
|
bool bNotifyWhenFinished);
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
|
|
|
|
/// @see lok::Document::setTextSelection
|
|
|
|
void (*setTextSelection) (LibreOfficeKitDocument* pThis,
|
2015-03-19 13:58:12 +02:00
|
|
|
int nType,
|
|
|
|
int nX,
|
|
|
|
int nY);
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
|
2015-06-17 18:00:01 +02:00
|
|
|
/// @see lok::Document::getTextSelection
|
|
|
|
char* (*getTextSelection) (LibreOfficeKitDocument* pThis,
|
2015-06-19 18:13:27 +02:00
|
|
|
const char* pMimeType,
|
|
|
|
char** pUsedMimeType);
|
2015-06-17 18:00:01 +02:00
|
|
|
|
2015-10-22 11:26:13 +02:00
|
|
|
/// @see lok::Document::paste().
|
|
|
|
bool (*paste) (LibreOfficeKitDocument* pThis,
|
|
|
|
const char* pMimeType,
|
|
|
|
const char* pData,
|
|
|
|
size_t nSize);
|
|
|
|
|
The mode lines says we use 4-column indentation steps, so do that then
Also, be consistent in spacing, indentation and alignment. Inconsistency is
infuritating.
In this case, I decided to drop the attempts to align the names of "methods",
and their parameter lists. They were not all aligned anyway, and some of those
that tried to be in fact were off by one column. Also, consistently use a
blank line between the method pointers,
If you feel strongly about this and *want* such inter-line alignment, by all
means re-introduce it, but at least try to be consistent then, and do it for
all methods.
Change-Id: I382ca0eaf8533ebc3f829ebd978a9676ebcefaf0
2015-04-16 12:34:43 +03:00
|
|
|
/// @see lok::Document::setGraphicSelection
|
|
|
|
void (*setGraphicSelection) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nType,
|
|
|
|
int nX,
|
|
|
|
int nY);
|
|
|
|
|
|
|
|
/// @see lok::Document::resetSelection
|
|
|
|
void (*resetSelection) (LibreOfficeKitDocument* pThis);
|
2015-08-17 18:49:40 +03:00
|
|
|
|
2015-09-16 14:46:39 +02:00
|
|
|
/// @see lok::Document::getCommandValues().
|
2015-09-10 09:21:45 +03:00
|
|
|
char* (*getCommandValues) (LibreOfficeKitDocument* pThis, const char* pCommand);
|
2015-09-14 14:36:56 +02:00
|
|
|
|
2015-11-06 14:34:28 +02:00
|
|
|
/// @see lok::Document::setClientZoom().
|
|
|
|
void (*setClientZoom) (LibreOfficeKitDocument* pThis,
|
|
|
|
int nTilePixelWidth,
|
|
|
|
int nTilePixelHeight,
|
|
|
|
int nTileTwipWidth,
|
|
|
|
int nTileTwipHeight);
|
|
|
|
|
2015-09-14 14:36:56 +02:00
|
|
|
/// @see lok::Document::createView().
|
|
|
|
int (*createView) (LibreOfficeKitDocument* pThis);
|
2015-09-15 09:31:49 +02:00
|
|
|
/// @see lok::Document::destroyView().
|
|
|
|
void (*destroyView) (LibreOfficeKitDocument* pThis, int nId);
|
2015-09-16 09:30:41 +02:00
|
|
|
/// @see lok::Document::setView().
|
|
|
|
void (*setView) (LibreOfficeKitDocument* pThis, int nId);
|
|
|
|
/// @see lok::Document::getView().
|
|
|
|
int (*getView) (LibreOfficeKitDocument* pThis);
|
2015-09-16 14:14:04 +02:00
|
|
|
/// @see lok::Document::getViews().
|
|
|
|
int (*getViews) (LibreOfficeKitDocument* pThis);
|
2014-05-09 14:37:27 +01:00
|
|
|
#endif // LOK_USE_UNSTABLE_API
|
2013-11-15 12:09:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2014-04-08 17:39:10 +02:00
|
|
|
}
|
2013-11-15 12:09:10 +00:00
|
|
|
#endif
|
|
|
|
|
2015-02-02 11:03:13 +01:00
|
|
|
#endif // INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKIT_H
|
|
|
|
|
2013-11-15 12:09:10 +00:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|