harmony(鸿蒙)Native API Differences

2022-08-09 浏览 (667)

Native API Differences

This document describes the changes of APIs in OpenHarmony 3.1 Release when compared with OpenHarmony 3.0 LTS.

Standard System API Changes

ModuleAPIChange TypeChange Description
Graphics - drawingOH_Drawing_FontCollection* OH_Drawing_CreateFontCollection(void)AddedAdded the API for creating an OH_Drawing_FontCollection object.
Graphics - drawingvoid OH_Drawing_DestroyFontCollection(OH_Drawing_FontCollection*)AddedAdded the API for releasing the memory occupied by an OH_Drawing_FontCollection object.
Graphics - drawingOH_Drawing_TypographyStyle* OH_Drawing_CreateTypographyStyle(void)AddedAdded the API for creating an OH_Drawing_TypographyStyle object.
Graphics - drawingvoid OH_Drawing_DestroyTypographyStyle(OH_Drawing_TypographyStyle*)AddedAdded the API for releasing the memory occupied by an OH_Drawing_TypographyStyle object.
Graphics - drawingvoid OH_Drawing_SetTypographyTextDirection(OH_Drawing_TypographyStyle*, int /* OH_Drawing_TextDirection */)AddedAdded the API for setting the text direction.
Graphics - drawingvoid OH_Drawing_SetTypographyTextAlign(OH_Drawing_TypographyStyle*, int /* OH_Drawing_TextAlign */)AddedAdded the API for setting the text alignment mode.
Graphics - drawingvoid OH_Drawing_SetTypographyTextMaxLines(OH_Drawing_TypographyStyle*, int /* maxLines */)AddedAdded the API for setting the maximum number of lines in the text.
Graphics - drawingOH_Drawing_TextStyle* OH_Drawing_CreateTextStyle(void)AddedAdded the API for creating an OH_Drawing_TextStyle object.
Graphics - drawingvoid OH_Drawing_DestroyTextStyle(OH_Drawing_TextStyle*)AddedAdded the API for releasing the memory occupied by an OH_Drawing_TextStyle object.
Graphics - drawingvoid OH_Drawing_SetTextStyleColor(OH_Drawing_TextStyle*, uint32_t /* color */)AddedAdded the API for setting the text color.
Graphics - drawingvoid OH_Drawing_SetTextStyleFontSize(OH_Drawing_TextStyle*, double /* fontSize */);AddedAdded the API for setting the font size.
Graphics - drawingvoid OH_Drawing_SetTextStyleFontWeight(OH_Drawing_TextStyle*, int /* OH_Drawing_FontWeight */)AddedAdded the API for setting the font weight.
Graphics - drawingvoid OH_Drawing_SetTextStyleBaseLine(OH_Drawing_TextStyle*, int /* OH_Drawing_TextBaseline */)AddedAdded the API for setting the text baseline.
Graphics - drawingvoid OH_Drawing_SetTextStyleDecoration(OH_Drawing_TextStyle*, int /* OH_Drawing_TextDecoration */)AddedAdded the API for setting the text decoration.
Graphics - drawingvoid OH_Drawing_SetTextStyleDecorationColor(OH_Drawing_TextStyle*, uint32_t /* color */)AddedAdded the API for setting the color for the text decoration.
Graphics - drawingvoid OH_Drawing_SetTextStyleFontHeight(OH_Drawing_TextStyle*, double /* fontHeight */)AddedAdded the API for setting the font height.
Graphics - drawingvoid OH_Drawing_SetTextStyleFontFamilies(OH_Drawing_TextStyle*,int /* fontFamiliesNumber */, const char* fontFamilies[]);AddedAdded the API for setting the font families.
Graphics - drawingvoid OH_Drawing_SetTextStyleFontStyle(OH_Drawing_TextStyle*, int /* OH_Drawing_FontStyle */)AddedAdded the API for setting the font style.
Graphics - drawingvoid OH_Drawing_SetTextStyleLocale(OH_Drawing_TextStyle*, const char*)AddedAdded the API for setting the locale.
Graphics - drawingOH_Drawing_TypographyCreate* OH_Drawing_CreateTypographyHandler(OH_Drawing_TypographyStyle*, OH_Drawing_FontCollection*)AddedAdded the API for creating a pointer to an OH_Drawing_TypographyCreate object.
Graphics - drawingvoid OH_Drawing_DestroyTypographyHandler(OH_Drawing_TypographyCreate*)AddedAdded the API for releasing the memory occupied by an OH_Drawing_TypographyCreate object.
Graphics - drawingvoid OH_Drawing_TypographyHandlerPushTextStyle(OH_Drawing_TypographyCreate*, OH_Drawing_TextStyle*)AddedAdded the API for setting the text style.
Graphics - drawingvoid OH_Drawing_TypographyHandlerAddText(OH_Drawing_TypographyCreate*, const char*)AddedAdded the API for setting the text content.
Graphics - drawingvoid OH_Drawing_TypographyHandlerPopTextStyle(OH_Drawing_TypographyCreate*)AddedAdded the API for removing the topmost style in the stack, leaving the remaining styles in effect.
Graphics - drawingOH_Drawing_Typography* OH_Drawing_CreateTypography(OH_Drawing_TypographyCreate*)AddedAdded the API for creating an OH_Drawing_Typography object.
Graphics - drawingvoid OH_Drawing_DestroyTypography(OH_Drawing_Typography*)AddedAdded the API for releasing the memory occupied by an OH_Drawing_Typography object.
Graphics - drawingvoid OH_Drawing_TypographyLayout(OH_Drawing_Typography*, double /* maxWidth */)AddedAdded the API for laying out the typography.
Graphics - drawingvoid OH_Drawing_TypographyPaint(OH_Drawing_Typography*, OH_Drawing_Canvas*, double /* potisionX */, double /* potisionY */)AddedAdded the API for painting text on the canvas.
Graphics - drawingOH_Drawing_Bitmap* OH_Drawing_BitmapCreate(void)AddedAdded the API for creating an OH_Drawing_Bitmap object.
Graphics - drawingvoid OH_Drawing_BitmapDestroy(OH_Drawing_Bitmap*)AddedAdded the API for destroying an OH_Drawing_Bitmap object and reclaiming the memory occupied by the object.
Graphics - drawingvoid OH_Drawing_BitmapBuild(OH_Drawing_Bitmap*, const uint32_t width, const uint32_t height, const OH_Drawing_BitmapFormat*)AddedAdded the API for initializing the width and height of an OH_Drawing_Bitmap object and setting the pixel format for the bitmap.
Graphics - drawinguint32_t OH_Drawing_BitmapGetWidth(OH_Drawing_Bitmap*)AddedAdded the API for obtaining the width of a bitmap.
Graphics - drawinguint32_t OH_Drawing_BitmapGetHeight(OH_Drawing_Bitmap*)AddedAdded the API for obtaining the height of a bitmap.
Graphics - drawingvoid* OH_Drawing_BitmapGetPixels(OH_Drawing_Bitmap*)AddedAdded the API for obtaining the pixel address of a bitmap. You can use this address to obtain the pixel data of the bitmap.
Graphics - drawingOH_Drawing_Brush* OH_Drawing_BrushCreate(void)AddedAdded the API for creating an OH_Drawing_Brush object.
Graphics - drawingvoid OH_Drawing_BrushDestroy(OH_Drawing_Brush*)AddedAdded the API for destroying an OH_Drawing_Brush object and reclaiming the memory occupied by the object.
Graphics - drawingbool OH_Drawing_BrushIsAntiAlias(const OH_Drawing_Brush*)AddedAdded the API for checking whether anti-aliasing is enabled for a brush. If anti-aliasing is enabled, edges will be drawn with partial transparency.
Graphics - drawingvoid OH_Drawing_BrushSetAntiAlias(OH_Drawing_Brush*, bool)AddedAdded the API for enabling or disabling anti-aliasing for a brush. If anti-aliasing is enabled, edges will be drawn with partial transparency.
Graphics - drawinguint32_t OH_Drawing_BrushGetColor(const OH_Drawing_Brush*)AddedAdded the API for obtaining the color of a brush. The color is used by the brush to fill in a shape.
Graphics - drawingvoid OH_Drawing_BrushSetColor(OH_Drawing_Brush*, uint32_t color)AddedAdded the API for setting the color for a brush. The color will be used by the brush to fill in a shape.
Graphics - drawingOH_Drawing_Canvas* OH_Drawing_CanvasCreate(void)AddedAdded the API for creating an OH_Drawing_Canvas object.
Graphics - drawingvoid OH_Drawing_CanvasDestroy(OH_Drawing_Canvas*)AddedAdded the API for destroying an OH_Drawing_Canvas object and reclaiming the memory occupied by the object.
Graphics - drawingvoid OH_Drawing_CanvasBind(OH_Drawing_Canvas*, OH_Drawing_Bitmap*)AddedAdded the API for binding a bitmap to a canvas so that the content drawn on the canvas is output to the bitmap (this process is called CPU rendering).
Graphics - drawingvoid OH_Drawing_CanvasAttachPen(OH_Drawing_Canvas*, const OH_Drawing_Pen*)AddedAdded the API for attaching a pen to a canvas so that the canvas will use the style and color of the pen to outline a shape.
Graphics - drawingvoid OH_Drawing_CanvasDetachPen(OH_Drawing_Canvas*)AddedAdded the API for detaching the pen from a canvas so that the canvas will not use the style and color of the pen to outline a shape.
Graphics - drawingvoid OH_Drawing_CanvasAttachBrush(OH_Drawing_Canvas*, const OH_Drawing_Brush*)AddedAdded the API for attaching a brush to a canvas so that the canvas will use the style and color of the brush to fill in a shape.
Graphics - drawingvoid OH_Drawing_CanvasDetachBrush(OH_Drawing_Canvas*)AddedAdded the API for detaching the brush from a canvas so that the canvas will not use the style and color of the brush to fill in a shape.
Graphics - drawingvoid OH_Drawing_CanvasSave(OH_Drawing_Canvas*)AddedAdded the API for saving the current canvas status (canvas matrix) to the top of the stack.
Graphics - drawingvoid OH_Drawing_CanvasRestore(OH_Drawing_Canvas*)AddedAdded the API for restoring the canvas status (canvas matrix) saved on the top of the stack.
Graphics - drawingvoid OH_Drawing_CanvasDrawLine(OH_Drawing_Canvas*, float x1, float y1, float x2, float y2)AddedAdded the API for drawing a line segment.
Graphics - drawingvoid OH_Drawing_CanvasDrawPath(OH_Drawing_Canvas*, const OH_Drawing_Path*)AddedAdded the API for drawing a path.
Graphics - drawingvoid OH_Drawing_CanvasClear(OH_Drawing_Canvas*, uint32_t color)AddedAdded the API for clearing a canvas by using a specified color.
Graphics - drawinguint32_t OH_Drawing_ColorSetArgb(uint32_t alpha, uint32_t red, uint32_t green, uint32_t blue)AddedAdded the API for converting four variables (alpha, red, green, and blue) into a 32-bit (ARGB) variable that describes a color.
Graphics - drawingOH_Drawing_Path* OH_Drawing_PathCreate(void)AddedAdded the API for creating an OH_Drawing_Path object.
Graphics - drawingvoid OH_Drawing_PathDestroy(OH_Drawing_Path*)AddedAdded the API for destroying an OH_Drawing_Path object and reclaiming the memory occupied by the object.
Graphics - drawingvoid OH_Drawing_PathMoveTo(OH_Drawing_Path*, float x, float y)AddedAdded the API for setting the start point of a path.
Graphics - drawingvoid OH_Drawing_PathLineTo(OH_Drawing_Path*, float x, float y)AddedAdded the API for drawing a line segment from the last point of a path to the target point.
Graphics - drawingvoid OH_Drawing_PathArcTo(OH_Drawing_Path*, float x1, float y1, float x2, float y2, float startDeg, float sweepDeg)AddedAdded the API for drawing an arc to a path. This is done by using angle arc mode. In this mode, a rectangle that encloses an ellipse is specified first, and then a start angle and a sweep angle are specified. The arc is a portion of the ellipse defined by the start angle and the sweep angle. By default, a line segment from the last point of the path to the start point of the arc is also added.
Graphics - drawingvoid OH_Drawing_PathQuadTo(OH_Drawing_Path*, float ctrlX, float ctrlY, float endX, float endY)AddedAdded the API for drawing a quadratic Bezier curve from the last point of a path to the target point.
Graphics - drawingvoid OH_Drawing_PathCubicTo(OH_Drawing_Path*, float ctrlX1, float ctrlY1, float ctrlX2, float ctrlY2, float endX, float endY)AddedAdded the API for drawing a cubic Bezier curve from the last point of a path to the target point.
Graphics - drawingvoid OH_Drawing_PathClose(OH_Drawing_Path*)AddedAdded the API for closing a path. A line segment from the start point to the last point of the path is added.
Graphics - drawingvoid OH_Drawing_PathReset(OH_Drawing_Path*)AddedAdded the API for resetting path data.
Graphics - drawingOH_Drawing_Pen* OH_Drawing_PenCreate(void)AddedAdded the API for creating an OH_Drawing_Pen object.
Graphics - drawingvoid OH_Drawing_PenDestroy(OH_Drawing_Pen*)AddedAdded the API for destroying an OH_Drawing_Pen object and reclaiming the memory occupied by the object.
Graphics - drawingbool OH_Drawing_PenIsAntiAlias(const OH_Drawing_Pen*)AddedAdded the API for checking whether anti-aliasing is enabled for a pen. If anti-aliasing is enabled, edges will be drawn with partial transparency.
Graphics - drawingvoid OH_Drawing_PenSetAntiAlias(OH_Drawing_Pen*, bool)AddedAdded the API for enabling or disabling anti-aliasing for a pen. If anti-aliasing is enabled, edges will be drawn with partial transparency.
Graphics - drawinguint32_t OH_Drawing_PenGetColor(const OH_Drawing_Pen*)AddedAdded the API for obtaining the color of a pen. The color is used by the pen to outline a shape.
Graphics - drawingvoid OH_Drawing_PenSetColor(OH_Drawing_Pen*, uint32_t color)AddedAdded the API for setting the color for a pen. The color is used by the pen to outline a shape.
Graphics - drawingfloat OH_Drawing_PenGetWidth(const OH_Drawing_Pen*)AddedAdded the API for obtaining the thickness of a pen. This thickness determines the width of the outline of a shape.
Graphics - drawingvoid OH_Drawing_PenSetWidth(OH_Drawing_Pen*, float width)AddedAdded the API for setting the thickness for a pen. This thickness determines the width of the outline of a shape.
Graphics - drawingfloat OH_Drawing_PenGetMiterLimit(const OH_Drawing_Pen*)AddedAdded the API for obtaining the stroke miter limit of a polyline drawn by a pen. When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded.
Graphics - drawingvoid OH_Drawing_PenSetMiterLimit(OH_Drawing_Pen*, float miter)AddedAdded the API for setting the stroke miter limit for a polyline drawn by a pen. When the corner type is bevel, a beveled corner is displayed if the miter limit is exceeded, and a mitered corner is displayed if the miter limit is not exceeded.
Graphics - drawingOH_Drawing_PenLineCapStyle OH_Drawing_PenGetCap(const OH_Drawing_Pen*)AddedAdded the API for obtaining the line cap style of a pen.
Graphics - drawingvoid OH_Drawing_PenSetCap(OH_Drawing_Pen*, OH_Drawing_PenLineCapStyle)AddedAdded the API for setting the line cap style for a pen.
Graphics - drawingOH_Drawing_PenLineJoinStyle OH_Drawing_PenGetJoin(const OH_Drawing_Pen*)AddedAdded the API for obtaining the line join style of a pen.
Graphics - drawingvoid OH_Drawing_PenSetJoin(OH_Drawing_Pen*, OH_Drawing_PenLineJoinStyle)AddedAdded the API for setting the line join style for a pen.
Graphics - NativeWindowstruct NativeWindow* OH_NativeWindow_CreateNativeWindow(void* pSurface)AddedAdded the API for creating a NativeWindow instance.
Graphics - NativeWindowvoid OH_NativeWindow_DestroyNativeWindow(struct NativeWindow* window)AddedAdded the API for decreasing the reference count of a NativeWindow instance by 1 and, when the reference count reaches 0, destroying the instance.
Graphics - NativeWindowstruct NativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer(void* pSurfaceBuffer)AddedAdded the API for creating a NativeWindowBuffer instance.
Graphics - NativeWindowvoid OH_NativeWindow_DestroyNativeWindowBuffer(struct NativeWindowBuffer* buffer)AddedAdded the API for decreasing the reference count of a NativeWindowBuffer instance by 1 and, when the reference count reaches 0, destroying the instance.
Graphics - NativeWindowint32_t OH_NativeWindow_NativeWindowRequestBuffer(struct NativeWindow *window, struct NativeWindowBuffer **buffer, int *fenceFd)AddedAdded the API for requesting a NativeWindowBuffer through a NativeWindow instance for content production.
Graphics - NativeWindowint32_t OH_NativeWindow_NativeWindowFlushBuffer(struct NativeWindow *window, struct NativeWindowBuffer *buffer, int fenceFd, Region region)AddedAdded the API for flushing the NativeWindowBuffer filled with the content to the buffer queue through a NativeWindow instance for content consumption.
Graphics - NativeWindowint32_t OH_NativeWindow_NativeWindowAbortBuffer(struct NativeWindow *window, struct NativeWindowBuffer *buffer)AddedAdded the API for returning the NativeWindowBuffer to the buffer queue through a NativeWindow instance, without filling in any content. The NativeWindowBuffer can be used for another request.
Graphics - NativeWindowint32_t OH_NativeWindow_NativeWindowHandleOpt(struct NativeWindow *window, int code, ...)AddedAdded the API for setting and obtaining the attributes of a native window, including the width, height, and content format.
Graphics - NativeWindowBufferHandle *OH_NativeWindow_GetBufferHandleFromNative(struct NativeWindowBuffer *buffer)AddedAdded the API for obtaining the pointer to a BufferHandle of a NativeWindowBuffer instance.
Graphics - NativeWindowint32_t OH_NativeWindow_NativeObjectReference(void *obj)AddedAdded the API for adding the reference count of a native object.
Graphics - NativeWindowint32_t OH_NativeWindow_NativeObjectUnreference(void *obj)AddedAdded the API for decreasing the reference count of a native object and, when the reference count reaches 0, destroying this object.
Graphics - NativeWindowint32_t OH_NativeWindow_GetNativeObjectMagic(void *obj)AddedAdded the API for obtaining the magic ID of a native object.
DFX - HiLogLOG_DOMAINAddedAdded this hexadecimal integer macro to identify the service domain of a log file.
DFX - HiLogLOG_TAGAddedAdded this string macro to identify the class or service behavior.
DFX - HiLogLOG_APPAddedAdded this enumeration to identify the log type.
DFX - HiLogLOG_DEBUGAddedAdded this enumeration to identify the DEBUG log level.
DFX - HiLogLOG_INFOAddedAdded this enumeration to identify the INFO log level.
DFX - HiLogLOG_WARNAddedAdded this enumeration to identify the WARN log level.
DFX - HiLogLOG_ERRORAddedAdded this enumeration to identify the ERROR log level.
DFX - HiLogLOG_FATALAddedAdded this enumeration to identify the FATAL log level.
DFX - HiLogbool OH_LOG_IsLoggable(unsigned int domain, const char *tag, LogLevel level)AddedAdded the API for checking whether logs of the specified service domain, tag, and level can be printed.
DFX - HiLogint OH_LOG_Print(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt, ...)AddedAdded the API for outputting logs.
DFX - HiLogOH_LOG_DEBUG(type, ...)AddedAdded this function-like macro for outputting DEBUG logs.
DFX - HiLogOH_LOG_INFO(type, ...)AddedAdded this function-like macro for outputting INFO logs.
DFX - HiLogOH_LOG_WARN(type, ...)AddedAdded this function-like macro for outputting WARN logs.
DFX - HiLogOH_LOG_ERROR(type, ...)AddedAdded this function-like macro for outputting ERROR logs.
DFX - HiLogOH_LOG_FATAL(type, ...)AddedAdded this function-like macro for outputting FATAL logs.
zlibZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
ZEXTERN uLong ZEXPORT adler32_z OF((uLong adler, const Bytef *buf, z_size_t len));
AddedAdded the APIs for updating an Adler-32 checksum from the buffer.
zlibZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
AddedAdded the APIs for combining two Adler-32 checksums into one.
zlibZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level));
ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen));
AddedAdded the APIs for compressing the source buffer into the destination buffer.
zlibZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));AddedAdded the API for returning the upper limit of a buffer to hold the compressed data. This API must be called to determine the size of the buffer to allocate before compress2 or compress is called.
zlibZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
ZEXTERN uLong ZEXPORT crc32_z OF((uLong adler, const Bytef *buf, z_size_t len));
AddedAdded the APIs for updating a CRC-32 checksum from the buffer.
zlibZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
AddedAdded the APIs for combines two CRC-32 checksums into one.
zlibZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));AddedAdded the API for compression.
zlibZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, uLong sourceLen));AddedAdded the API for returning the upper limit of a buffer to hold the compressed data. This API must be called to determine the size of the buffer to allocate before deflateInit or deflateInit2 is called.
zlibZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, z_streamp source));AddedAdded the API for setting the destination stream as a complete copy of the source stream.
zlibZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));AddedAdded the API for freeing up space after the compression is complete.
zlibZEXTERN int ZEXPORT deflateGetDictionary OF((z_streamp strm, Bytef *dictionary, uInt *dictLength));AddedAdded the API for obtaining the sliding dictionary maintained by deflate.
zlibZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, const char *version, int stream_size));
ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy, const char *version, int stream_size));
AddedAdded the APIs for deflate initialization.
zlibZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy));AddedAdded the API for dynamically updating the compression level and compression strategy.
zlibZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, unsigned *pending, int *bits));AddedAdded the API for returning the number of bytes and bits of output that has been generated but not yet provided in the available output.
zlibZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, int bits, int value));AddedAdded the APIs for inserting bits in the deflate output stream.
zlibZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));AddedAdded this API, which is equivalent to deflateEnd followed by deflateInit, but does not free or reallocate the internal compression state.
zlibZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, const Bytef *dictionary, uInt dictLength));AddedAdded the API for initializing the compression dictionary from a given sequence of bytes without producing any compression output.
zlibZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gz_headerp head));AddedAdded the API for providing the gzip header information when a gzip stream is requested by delateInit2().
zlibZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, int good_length, int max_lazy, int nice_length, int max_chain));AddedAdded the API for fine-tuning the internal compression parameters of deflate.
zlibZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));AddedAdded the API for setting the size of the internal buffer used by this library's functions. The default buffer size is 8192 bytes.
zlibZEXTERN void ZEXPORT gzclearerr OF((gzFile file));AddedAdded the API for clearing the error and end-of-file flags for a file.
zlibZEXTERN int ZEXPORT gzclose OF((gzFile file));
ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
AddedAdded the APIs for flushing all pending output, closing the compressed file, and deallocating the compression state.
zlibZEXTERN int ZEXPORT gzdirect OF((gzFile file));AddedAdded the API for returning true (1) if the file is being copied directly while reading, and returning false (0) if the file is a gzip stream being decompressed.
zlibZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));AddedAdded the API for associating a gzFile with a file descriptor. File descriptors are obtained from calls such as open, dup, create, pipe, or fileno (in the file that has been opened using fopen). The mode parameter is the same as that in gzopen.
zlibZEXTERN int ZEXPORT gzeof OF((gzFile file));AddedAdded the API for returning true (1) if the end-of-file indicator has been set while reading, and returning false (0) otherwise.
zlibZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));AddedAdded the API for returning the error message for the last error that occurred on a given compressed file.
zlibZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));AddedAdded the API for flushing all pending output into a compressed file.
zlibZEXTERN z_size_t ZEXPORT gzfread OF((voidp buf, z_size_t size, z_size_t nitems, gzFile file));AddedAdded the API for reading a given number of bytes from a compressed file to the buffer.
zlibZEXTERN z_size_t ZEXPORT gzfwrite OF((voidpc buf, z_size_t size, z_size_t nitems, gzFile file));AddedAdded the API for writing a given number of bytes from the buffer to a compressed file, duplicating the interface of stdio's fwrite(), with size_t request and return types.
zlibZEXTERN int ZEXPORT gzgetc OF((gzFile file));
ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));
AddedAdded the APIs for reading a byte from a compressed file.
zlibZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));AddedAdded the API for reading bytes from a compressed file until len-1 characters are read, a newline character is read and transferred to a buffer, or an end-of-file condition is encountered.
zlibZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
AddedAdded the APIs for returning the current offset in the file being read or written.
zlibZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
AddedAdded the APIs for opening a gzip (.gz) file for reading or writing.
zlibZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));AddedAdded the API for converting, formatting, and writing the parameters to a compressed file under the control of the format string.
zlibZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
AddedAdded the APIs for writing c, which is converted to an unsigned character, into a compressed file. gzputc returns the written value or -1 in the case of an error.
zlibZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));AddedAdded the API for reading a given number of uncompressed bytes from a compressed file.
zlibZEXTERN int ZEXPORT gzrewind OF((gzFile file));AddedAdded the API for rewinding a file.
zlibZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
AddedAdded the APIs for setting the start position for the next gzread or gzwrite operation of a given compressed file.
zlibZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));AddedAdded the API for dynamically updating the compression level or strategy.
zlibZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
AddedAdded the API for returning the start position of the next gzread or gzwrite operation of a given compressed file.
zlibZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));AddedAdded the API for pushing a character back to the stream to be read again.
zlibZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len));AddedAdded the API for writing a given number of uncompressed bytes to a compressed file.
zlibZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));AddedAdded an API for decompressing as much data as possible and stopping when the input buffer becomes empty or the output buffer becomes full.
zlibZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc));
ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, unsigned char FAR *window, const char *version, int stream_size));
AddedAdded the callback APIs for decompression.
zlibZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, z_streamp source));AddedAdded the API for setting the destination stream as a complete copy of the source stream.
zlibZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));AddedAdded the API for freeing up all dynamically allocated data structures of this stream.
zlibZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, Bytef *dictionary, uInt *dictLength));AddedAdded the API for obtaining the sliding dictionary maintained by inflate.
zlibZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, gz_headerp head));AddedAdded the API for storing the gzip header information in the provided gz_header structure.
zlibZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, const char *version, int stream_size));
/ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, const char *version, int stream_size));
AddedAdded the APIs for decompression initialization.
zlibZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));AddedAdded the API for returning two values. One is in the lower 16 bits of the return value, and the other is in the remaining upper bits, obtained by shifting the return value down by 16 bits.
zlibZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, int bits, int value));AddedAdded the API for inserting bits into the inflate input stream.
zlibZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, int windowBits));
AddedAdded these APIs, which are equivalent to inflateEnd followed by inflateInit, but do not free or reallocate the internal decompression state. The stream will retain attributes that may have been set by inflateInit2.
zlibZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, const Bytef *dictionary, uInt dictLength));AddedAdded the API for initializing the decompression dictionary from a given uncompressed byte sequence.
zlibZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));AddedAdded the API for skipping invalid compressed data until a possible full flush point is found, or until all available input is skipped. There is no output.
zlibZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen));
ZEXTERN int ZEXPORT uncompress2 OF((Bytef *dest, uLongf *destLen, const Bytef *source, uLong *sourceLen));
AddedAdded the APIs for decompressing the source buffer into the destination buffer. sourceLen indicates the byte length of the source buffer.
zlibZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));AddedAdded the API for returning flags indicating compile-time options.
zlibZEXTERN const char * ZEXPORT zlibVersion OF((void));AddedAdded the API for returning the zlib version.
Globalization - resmgrNativeResourceManager *OH_ResourceManager_InitNativeResourceManager(napi_env env, napi_value jsResMgr)AddedAdded the API for initializing the native resource manager.
Globalization - resmgrvoid OH_ResourceManager_ReleaseNativeResourceManager(NativeResourceManager *resMgr)AddedAdded the API for releasing the native resource manager.
Globalization - resmgrRawDir *OH_ResourceManager_OpenRawDir(const NativeResourceManager *mgr, const char *dirName)AddedAdded the API for opening a raw file directory.
Globalization - resmgrRawFile *OH_ResourceManager_OpenRawFile(const NativeResourceManager *mgr, const char *fileName)AddedAdded the API for opening a raw file.
Globalization - resmgrconst char *OH_ResourceManager_GetRawFileName(RawDir *rawDir, int index)AddedAdded the API for obtaining a raw file name.
Globalization - resmgrint OH_ResourceManager_GetRawFileCount(RawDir *rawDir)AddedAdded the API for obtaining the number of raw files in a raw file directory.
Globalization - resmgrvoid OH_ResourceManager_CloseRawDir(RawDir *rawDir)AddedAdded the API for releasing the resources related to a raw file directory.
Globalization - resmgrint OH_ResourceManager_ReadRawFile(const RawFile *rawFile, void *buf, size_t length)AddedAdded the API for reading a raw file.
Globalization - resmgrint OH_ResourceManager_SeekRawFile(const RawFile *rawFile, long offset, int whence)AddedAdded the API for querying data in a raw file based on a given offset.
Globalization - resmgrlong OH_ResourceManager_GetRawFileSize(RawFile *rawFile)AddedAdded the API for obtaining the size of a raw file.
Globalization - resmgrvoid OH_ResourceManager_CloseRawFile(RawFile *rawFile)AddedAdded the API for releasing the resources related to a raw file.
Globalization - resmgrlong OH_ResourceManager_GetRawFileOffset(const RawFile *rawFile)AddedAdded the API for obtaining the offset of a raw file.
Globalization - resmgrbool OH_ResourceManager_GetRawFileDescriptor(const RawFile *rawFile, RawFileDescriptor &descriptor)AddedAdded the API for obtaining the file descriptor of a raw file.
Globalization - resmgrbool OH_ResourceManager_ReleaseRawFileDescriptor(const RawFileDescriptor &descriptor)AddedAdded the API for releasing the file descriptor of a raw file.
Media - MultimediaOH_GetImageInfoAddedAdded the API for obtaining image information based on the pixel address.
Media - MultimediaOH_AccessPixelsAddedAdded the API for locking the address of a given pixel.
Media - MultimediaOH_UnAccessPixelsAddedAdded the API for unlocking the address of a given pixel.
Media - audio_standardSL_API SLresult SLAPIENTRY slCreateEngine(
SLObjectItf *pEngine,
SLuint32 numOptions,
const SLEngineOption *pEngineOptions,
SLuint32 numInterfaces,
const SLInterfaceID *pInterfaceIds,
const SLboolean * pInterfaceRequired
);
AddedAdded the API for creating a Engine object.
Media - audio_standardSLObjectItf_
SLresult (*Realize) (
SLObjectItf self,
SLboolean async
);
AddedAdded the API for initializing an object.
Media - audio_standardSLObjectItf_
SLresult (*Resume) (
SLObjectItf self,
SLboolean async
);
AddedAdded the API for resuming an object.
Media - audio_standardSLObjectItf_
SLresult (*GetState) (
SLObjectItf self,
SLuint32 * pState
);
AddedAdded the API for obtaining the object state.
Media - audio_standardSLObjectItf_
SLresult (*GetInterface) (
SLObjectItf self,
const SLInterfaceID iid,
void * pInterface
);
AddedAdded the API for obtaining an object based on the interface ID.
Media - audio_standardSLObjectItf_
SLresult (*RegisterCallback) (
SLObjectItf self,
slObjectCallback callback,
void * pContext
);
AddedAdded the API for registering a callback.
Media - audio_standardSLObjectItf_
void (*Destroy) (
SLObjectItf self
);
AddedAdded the API for destroying an object.
Media - audio_standardSLresult (*CreateAudioPlayer) (
SLEngineItf self,
SLObjectItf * pPlayer,
SLDataSource *pAudioSrc,
SLDataSink *pAudioSnk,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
AddedAdded the API for creating an AudioPlayer object.
Media - audio_standardSLresult (*CreateOutputMix) (
SLEngineItf self,
SLObjectItf * pMix,
SLuint32 numInterfaces,
const SLInterfaceID * pInterfaceIds,
const SLboolean * pInterfaceRequired
);
AddedAdded the API for creating an OutputMix object.
Media - audio_standardSLPlayItf_
SLresult (*SetPlayState) (
SLPlayItf self,
SLuint32 state
);
AddedAdded the API for setting the player state.
Media - audio_standardSLPlayItf_
SLresult (*GetPlayState) (
SLPlayItf self,
SLuint32 *pState
);
AddedAdded the API for obtaining the player state.
Media - audio_standardSLBufferQueueItf_
SLresult (*Enqueue) (
SLBufferQueueItf self,
const void *pBuffer,
SLuint32 size
);
AddedAdded the API for filling a buffer queue.
Media - audio_standardSLBufferQueueItf_
SLresult (*Clear) (
SLBufferQueueItf self
);
AddedAdded the API for clearing a buffer queue.
Media - audio_standardSLBufferQueueItf_
SLresult (*GetState) (
SLBufferQueueItf self,
SLBufferQueueState *pState
);
AddedAdded the API for obtaining the buffer queue state.
Media - audio_standardSLVolumeItf_
SLresult (*SetVolumeLevel) (
SLVolumeItf self,
SLmillibel level
);
AddedAdded the API for setting the volume level.
Media - audio_standardSLVolumeItf_
SLresult (*GetVolumeLevel) (
SLVolumeItf self,
SLmillibel *pLevel
);
AddedAdded the API for obtaining the volume level.
Media - audio_standardSLVolumeItf_
SLresult (*GetMaxVolumeLevel) (
SLVolumeItf self,
SLmillibel *pMaxLevel
);
AddedAdded the API for setting the maximum volume level.
LIBUVLIBUVAddedAdded the LIBUV interface.
Node-APINode-APIAddedThe NAPI component re-implements the Node-API interface and supports some interfaces in the Node-API standard library.
EGLEGLAddedAdded the EGL interface.
GLES3GLES3AddedAdded the OpenGL ES 3.0 interface.
C++ standard librarylibc++AddedAdded the C++ standard library interface.
C standard libraryC11 standard library implemented by libc, libm, and libdlAddedAdded the C standard library interface.

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Updates (OpenHarmony 3.1 Beta -> OpenHarmony 3.1 Release)

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the Accessibility Subsystem

harmony(鸿蒙)JS API Changes of the Account Subsystem

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Power Management Subsystem

harmony(鸿蒙)JS API Changes of the Bundle Management Framework

harmony(鸿蒙)JS API Changes of the Communication Subsystem

harmony(鸿蒙)JS API Changes of the Utils Subsystem

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/0e8e6fc854ab4b6ab14bc08b2ca1f275