Kaydet (Commit) 958d26e1 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

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
üst 1d2ade49
...@@ -38,14 +38,18 @@ struct _LibreOfficeKit ...@@ -38,14 +38,18 @@ struct _LibreOfficeKit
struct _LibreOfficeKitClass struct _LibreOfficeKitClass
{ {
size_t nSize; size_t nSize;
void (*destroy) (LibreOfficeKit* pThis); void (*destroy) (LibreOfficeKit* pThis);
LibreOfficeKitDocument* (*documentLoad) (LibreOfficeKit* pThis, const char* pURL);
char* (*getError) (LibreOfficeKit* pThis); LibreOfficeKitDocument* (*documentLoad) (LibreOfficeKit* pThis,
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis, const char* pURL);
const char* pURL,
const char* pOptions); char* (*getError) (LibreOfficeKit* pThis);
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
}; };
#define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize) #define LIBREOFFICEKIT_DOCUMENT_HAS(pDoc,member) LIBREOFFICEKIT_HAS_MEMBER(LibreOfficeKitDocumentClass,member,(pDoc)->pClass->nSize)
...@@ -57,86 +61,93 @@ struct _LibreOfficeKitDocument ...@@ -57,86 +61,93 @@ struct _LibreOfficeKitDocument
struct _LibreOfficeKitDocumentClass struct _LibreOfficeKitDocumentClass
{ {
size_t nSize; size_t nSize;
void (*destroy) (LibreOfficeKitDocument* pThis);
int (*saveAs) (LibreOfficeKitDocument* pThis,
const char* pUrl,
const char* pFormat,
const char* pFilterOptions);
void (*destroy) (LibreOfficeKitDocument* pThis);
int (*saveAs) (LibreOfficeKitDocument* pThis,
const char* pUrl,
const char* pFormat,
const char* pFilterOptions);
#ifdef LOK_USE_UNSTABLE_API #ifdef LOK_USE_UNSTABLE_API
/// @see lok::Document::getDocumentType(). /// @see lok::Document::getDocumentType().
int (*getDocumentType) (LibreOfficeKitDocument* pThis); int (*getDocumentType) (LibreOfficeKitDocument* pThis);
/// @see lok::Document::getParts(). /// @see lok::Document::getParts().
int (*getParts) (LibreOfficeKitDocument* pThis); int (*getParts) (LibreOfficeKitDocument* pThis);
/// @see lok::Document::getPart(). /// @see lok::Document::getPart().
int (*getPart) (LibreOfficeKitDocument* pThis); int (*getPart) (LibreOfficeKitDocument* pThis);
/// @see lok::Document::setPart().
void (*setPart) (LibreOfficeKitDocument* pThis, /// @see lok::Document::setPart().
int nPart); void (*setPart) (LibreOfficeKitDocument* pThis,
int nPart);
/// @see lok::Document::getPartName().
char* (*getPartName) (LibreOfficeKitDocument* pThis, /// @see lok::Document::getPartName().
int nPart); char* (*getPartName) (LibreOfficeKitDocument* pThis,
int nPart);
/** Sets mode of the current part.
* /** Sets mode of the current part.
* @param nMode - element from the LibreOfficeKitPartMode enum. *
*/ * @param nMode - element from the LibreOfficeKitPartMode enum.
void (*setPartMode) (LibreOfficeKitDocument* pThis, */
int nMode); void (*setPartMode) (LibreOfficeKitDocument* pThis,
int nMode);
/// @see lok::Document::paintTile().
void (*paintTile) (LibreOfficeKitDocument* pThis, /// @see lok::Document::paintTile().
unsigned char* pBuffer, void (*paintTile) (LibreOfficeKitDocument* pThis,
const int nCanvasWidth, unsigned char* pBuffer,
const int nCanvasHeight, const int nCanvasWidth,
const int nTilePosX, const int nCanvasHeight,
const int nTilePosY, const int nTilePosX,
const int nTileWidth, const int nTilePosY,
const int nTileHeight); const int nTileWidth,
const int nTileHeight);
/// @see lok::Document::getDocumentSize().
void (*getDocumentSize) (LibreOfficeKitDocument* pThis, /// @see lok::Document::getDocumentSize().
long* pWidth, void (*getDocumentSize) (LibreOfficeKitDocument* pThis,
long* pHeight); long* pWidth,
long* pHeight);
/// @see lok::Document::initializeForRendering().
void (*initializeForRendering) (LibreOfficeKitDocument* pThis); /// @see lok::Document::initializeForRendering().
void (*initializeForRendering) (LibreOfficeKitDocument* pThis);
void (*registerCallback) (LibreOfficeKitDocument* pThis,
void (*registerCallback) (LibreOfficeKitDocument* pThis,
LibreOfficeKitCallback pCallback, LibreOfficeKitCallback pCallback,
void* pData); void* pData);
/// @see lok::Document::postKeyEvent /// @see lok::Document::postKeyEvent
void (*postKeyEvent)(LibreOfficeKitDocument* pThis, void (*postKeyEvent) (LibreOfficeKitDocument* pThis,
int nType, int nType,
int nCharCode, int nCharCode,
int nKeyCode); int nKeyCode);
/// @see lok::Document::postMouseEvent
void (*postMouseEvent)(LibreOfficeKitDocument* pThis, /// @see lok::Document::postMouseEvent
int nType, void (*postMouseEvent) (LibreOfficeKitDocument* pThis,
int nX, int nType,
int nY, int nX,
int nCount); int nY,
/// @see lok::Document::postUnoCommand int nCount);
void (*postUnoCommand)(LibreOfficeKitDocument* pThis,
const char* pCommand); /// @see lok::Document::postUnoCommand
void (*postUnoCommand) (LibreOfficeKitDocument* pThis,
/// @see lok::Document::setTextSelection const char* pCommand);
void (*setTextSelection)(LibreOfficeKitDocument* pThis,
int nType, /// @see lok::Document::setTextSelection
int nX, void (*setTextSelection) (LibreOfficeKitDocument* pThis,
int nY);
/// @see lok::Document::setGraphicSelection
void (*setGraphicSelection)(LibreOfficeKitDocument* pThis,
int nType, int nType,
int nX, int nX,
int nY); int nY);
/// @see lok::Document::resetSelection
void (*resetSelection)(LibreOfficeKitDocument* pThis); /// @see lok::Document::setGraphicSelection
void (*setGraphicSelection) (LibreOfficeKitDocument* pThis,
int nType,
int nX,
int nY);
/// @see lok::Document::resetSelection
void (*resetSelection) (LibreOfficeKitDocument* pThis);
#endif // LOK_USE_UNSTABLE_API #endif // LOK_USE_UNSTABLE_API
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment