X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fhtml%2Fharfbuzz-hb-blob.html;h=822fb523e321a57d49d06a24fbd4bcb0447d8916;hb=8b9bac85deb2ace750acafa5e0da676f633aadeb;hp=88c5ee3b0ceb330e007974aedbd90b76128398e3;hpb=fe65a6a32ba3654c532639ba656bd66b041d7dc6;p=platform%2Fupstream%2Fharfbuzz.git diff --git a/docs/html/harfbuzz-hb-blob.html b/docs/html/harfbuzz-hb-blob.html index 88c5ee3..822fb52 100644 --- a/docs/html/harfbuzz-hb-blob.html +++ b/docs/html/harfbuzz-hb-blob.html @@ -3,12 +3,12 @@ hb-blob: HarfBuzz Manual - + - - + + - + @@ -18,8 +18,8 @@ Description Home -Up -Prev +Up +Prev Next
@@ -52,6 +52,14 @@ hb_blob_t * +hb_blob_create_or_fail () + + + + +hb_blob_t * + + hb_blob_create_from_file () @@ -60,6 +68,14 @@ hb_blob_t * +hb_blob_create_from_file_or_fail () + + + + +hb_blob_t * + + hb_blob_create_sub_blob () @@ -234,8 +250,8 @@ in bytes.

destroy

Callback to call when data -is not needed anymore.

-  +is not needed anymore.

+[nullable]
@@ -250,9 +266,78 @@ zero. Destroy with
+

hb_blob_create_or_fail ()

+
hb_blob_t *
+hb_blob_create_or_fail (const char *data,
+                        unsigned int length,
+                        hb_memory_mode_t mode,
+                        void *user_data,
+                        hb_destroy_func_t destroy);
+

Creates a new "blob" object wrapping data +. The mode + parameter is used +to negotiate ownership and lifecycle of data +.

+

Note that this function returns a freshly-allocated empty blob even if length + +is zero. This is in contrast to hb_blob_create(), which returns the singleton +empty blob (as returned by hb_blob_get_empty()) if length + is zero.

+

[skip]

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

data

Pointer to blob data.

 

length

Length of data +in bytes.

 

mode

Memory mode for data +.

 

user_data

Data parameter to pass to destroy +.

 

destroy

Callback to call when data +is not needed anymore.

[nullable]
+
+
+

Returns

+

New blob, or NULL if failed. Destroy with hb_blob_destroy().

+
+

Since: 2.8.2

+
+
+

hb_blob_create_from_file ()

hb_blob_t *
 hb_blob_create_from_file (const char *file_name);
+

Creates a new blob containing the data from the +specified binary font file.

Parameters

@@ -263,19 +348,49 @@ hb_blob_create_from_file (const c - +

file_name

font filename.

A font filename

 

Returns

-

A hb_blob_t pointer with the content of the file

+

An hb_blob_t pointer with the content of the file, +or hb_blob_get_empty() if failed.

Since: 1.7.7


+

hb_blob_create_from_file_or_fail ()

+
hb_blob_t *
+hb_blob_create_from_file_or_fail (const char *file_name);
+

Creates a new blob containing the data from the +specified binary font file.

+
+

Parameters

+
+++++ + + + + + +

file_name

A font filename

 
+
+
+

Returns

+

An hb_blob_t pointer with the content of the file, +or NULL if failed.

+
+

Since: 2.8.2

+
+
+

hb_blob_create_sub_blob ()

hb_blob_t *
 hb_blob_create_sub_blob (hb_blob_t *parent,
@@ -283,7 +398,7 @@ hb_blob_create_sub_blob (unsigned int length);

Returns a blob that represents a range of bytes in parent . The new -blob is always created with HB_MEMORY_MODE_READONLY, meaning that it +blob is always created with HB_MEMORY_MODE_READONLY, meaning that it will never modify data in the parent blob. The parent data is not expected to be modified, and will result in undefined behavior if it is.

@@ -352,7 +467,7 @@ hb_blob_copy_writable_or_fail (

Returns

-

New blob, or nullptr if allocation failed.

+

The new blob, or nullptr if allocation failed

Since: 1.8.0

@@ -391,6 +506,7 @@ was created for if it has not been called already.

const char *
 hb_blob_get_data (hb_blob_t *blob,
                   unsigned int *length);
+

Fetches the data from a blob.

Parameters

@@ -407,7 +523,7 @@ hb_blob_get_data (

length

-
+ @@ -415,7 +531,8 @@ hb_blob_get_data (

Returns

-

.

+

the byte data of blob +.

[transfer none][array length=length]

Since: 0.9.2

@@ -455,7 +572,7 @@ fails.

Returns

Writable blob data, -or NULL if failed.

+or NULL if failed.

[transfer none][array length=length]

Since: 0.9.2

@@ -469,7 +586,7 @@ hb_blob_get_empty (voidSee TODO:link object types for more information.

Returns

-

the empty blob.

+

The empty blob.

[transfer full]

Since: 0.9.2

@@ -479,6 +596,7 @@ hb_blob_get_empty (void

hb_blob_get_length ()

unsigned int
 hb_blob_get_length (hb_blob_t *blob);
+

Fetches the length of a blob's data.

Parameters

.

The length in bytes of the data retrieved.

[out]
@@ -496,7 +614,8 @@ hb_blob_get_length (

Returns

-

the length of blob data in bytes.

+

the length of blob +data in bytes.

Since: 0.9.2

@@ -506,6 +625,8 @@ hb_blob_get_length (void * hb_blob_get_user_data (hb_blob_t *blob, hb_user_data_key_t *key); +

Fetches the user data associated with the specified key, +attached to the specified font-functions structure.

[skip]

Parameters

@@ -518,12 +639,12 @@ hb_blob_get_user_data (

blob

-
+ - + @@ -531,7 +652,7 @@ hb_blob_get_user_data (

Returns

-

.

+

A pointer to the user data.

[transfer none]

Since: 0.9.2

@@ -541,6 +662,7 @@ hb_blob_get_user_data (

hb_blob_is_immutable ()

hb_bool_t
 hb_blob_is_immutable (hb_blob_t *blob);
+

Tests whether a blob is immutable.

Parameters

a blob.

a blob

 

key

key for data to get.

The user-data key to query

 
@@ -558,7 +680,8 @@ hb_blob_is_immutable (

Returns

-

TODO

+

true if blob +is immutable, false otherwise

Since: 0.9.2

@@ -567,6 +690,7 @@ hb_blob_is_immutable (

hb_blob_make_immutable ()

void
 hb_blob_make_immutable (hb_blob_t *blob);
+

Makes a blob immutable.

Parameters

@@ -577,7 +701,7 @@ hb_blob_make_immutable (

blob

-
+

a blob.

a blob

 
@@ -624,6 +748,7 @@ hb_blob_set_user_data (void *data, hb_destroy_func_t destroy, hb_bool_t replace); +

Attaches a user-data key/data pair to the specified blob.

[skip]

Parameters

@@ -636,33 +761,37 @@ hb_blob_set_user_data (

blob

-

a blob.

+

An hb_blob_t

 

key

-

key for data to set.

+

The user-data key to set

 

data

-

data to set.

+

A pointer to the user data to set

 

destroy

-

callback to call when data -is not needed anymore.

-  +

A callback to call when data +is not needed anymore.

+[nullable]

replace

-

whether to replace an existing data with the same key.

+

Whether to replace an existing data with the same key

 
+
+

Returns

+

true if success, false otherwise

+

Since: 0.9.2

@@ -672,10 +801,35 @@ is not needed anymore.

hb_blob_t

typedef struct hb_blob_t hb_blob_t;
 
+

Data type for blobs. A blob wraps a chunk of binary +data and facilitates its lifecycle management between +a client program and HarfBuzz.


enum hb_memory_mode_t

+

Data type holding the memory modes available to +client programs.

+

Regarding these various memory-modes:

+
    +
  • In no case shall the HarfBuzz client modify memory +that is passed to HarfBuzz in a blob. If there is +any such possibility, HB_MEMORY_MODE_DUPLICATE + should be used +such that HarfBuzz makes a copy immediately,

  • +
  • Use HB_MEMORY_MODE_READONLY + otherwise, unless you really really +really know what you are doing,

  • +
  • HB_MEMORY_MODE_WRITABLE + is appropriate if you really made a +copy of data solely for the purpose of passing to +HarfBuzz and doing that just once (no reuse!),

  • +
  • If the font is mmap()ed, it's okay to use +HB_MEMORY_READONLY_MAY_MAKE_WRITABLE +, however, using that mode +correctly is very tricky. Use HB_MEMORY_MODE_READONLY + instead.

  • +

Members

@@ -687,23 +841,33 @@ is not needed anymore.

- - + + - - + + - - + + - - + +

HB_MEMORY_MODE_DUPLICATE

   +

HarfBuzz immediately makes a copy of the data.

+
 

HB_MEMORY_MODE_READONLY

   +

HarfBuzz client will never modify the data, +and HarfBuzz will never modify the data.

+
 

HB_MEMORY_MODE_WRITABLE

   +

HarfBuzz client made a copy of the data solely +for HarfBuzz, so HarfBuzz may modify the data.

+
 

HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE

   +

See above

+
 
@@ -712,6 +876,6 @@ is not needed anymore.

+
Generated by GTK-Doc V1.32 \ No newline at end of file