Port MatrixResizeMethod to C

This commit is contained in:
Gergely Polonkai 2017-11-02 09:54:22 +01:00
parent fe238ff236
commit b211ee2fc2
4 changed files with 22 additions and 20 deletions

View File

@ -162,3 +162,12 @@ G_DEFINE_QUARK(matrix-error-quark, matrix_error);
* *
* Receipt types of acknowledgment. * Receipt types of acknowledgment.
*/ */
/**
* MatrixResizeMethod:
* @MATRIX_RESIZE_METHOD_DEFAULT: use the server default value
* @MATRIX_RESIZE_METHOD_CROP: crop thumbnail to the requested size
* @MATRIX_RESIZE_METHOD_SCALE: scale thumbnail to the requested size
*
* Resizing methods for matrix_api_media_thumbnail().
*/

View File

@ -118,4 +118,10 @@ typedef enum {
MATRIX_RECEIPT_TYPE_READ MATRIX_RECEIPT_TYPE_READ
} MatrixReceiptType; } MatrixReceiptType;
typedef enum {
MATRIX_RESIZE_METHOD_DEFAULT,
MATRIX_RESIZE_METHOD_CROP,
MATRIX_RESIZE_METHOD_SCALE
} MatrixResizeMethod;
#endif /* __MATRIX_TYPE_H__ */ #endif /* __MATRIX_TYPE_H__ */

View File

@ -17,26 +17,6 @@
*/ */
namespace Matrix { namespace Matrix {
/**
* Resizing methods for matrix_api_media_thumbnail().
*/
public enum ResizeMethod {
/**
* use the server default value
*/
DEFAULT,
/**
* crop thumbnail to the requested size
*/
CROP,
/**
* scale thumbnail to the requested size
*/
SCALE;
}
/** /**
* Room membership types. * Room membership types.
*/ */

View File

@ -115,6 +115,13 @@ namespace Matrix {
READ; READ;
} }
[CCode (cheader_filename = "matrix-enumtypes.h", cprefix = "MATRIX_RESIZE_METHOD_")]
public enum ResizeMethod {
DEFAULT,
CROP,
SCALE;
}
/** /**
* The major version number of the Matrix.org GLib SDK. * The major version number of the Matrix.org GLib SDK.
*/ */