src/java.desktop/share/native/libfontmanager/harfbuzz/hb-map.h
author phh
Sat, 30 Nov 2019 14:33:05 -0800
changeset 59330 5b96c12f909d
parent 50826 f5b95be8b6e2
permissions -rw-r--r--
8234541: C1 emits an empty message when it inlines successfully Summary: Use "inline" as the message when successfull Reviewed-by: thartmann, mdoerr Contributed-by: navy.xliu@gmail.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50826
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     1
/*
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     2
 * Copyright © 2018  Google, Inc.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     3
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     4
 *  This is part of HarfBuzz, a text shaping library.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     5
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     6
 * Permission is hereby granted, without written agreement and without
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     7
 * license or royalty fees, to use, copy, modify, and distribute this
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     8
 * software and its documentation for any purpose, provided that the
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
     9
 * above copyright notice and the following two paragraphs appear in
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    10
 * all copies of this software.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    11
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    12
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    13
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    14
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    15
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    16
 * DAMAGE.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    17
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    18
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    19
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    20
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    21
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    22
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    23
 *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    24
 * Google Author(s): Behdad Esfahbod
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    25
 */
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    26
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    27
#ifndef HB_H_IN
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    28
#error "Include <hb.h> instead."
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    29
#endif
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    30
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    31
#ifndef HB_MAP_H
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    32
#define HB_MAP_H
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    33
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    34
#include "hb-common.h"
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    35
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    36
HB_BEGIN_DECLS
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    37
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    38
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    39
/*
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    40
 * Since: 1.7.7
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    41
 */
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    42
#define HB_MAP_VALUE_INVALID ((hb_codepoint_t) -1)
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    43
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    44
typedef struct hb_map_t hb_map_t;
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    45
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    46
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    47
HB_EXTERN hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    48
hb_map_create (void);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    49
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    50
HB_EXTERN hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    51
hb_map_get_empty (void);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    52
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    53
HB_EXTERN hb_map_t *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    54
hb_map_reference (hb_map_t *map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    55
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    56
HB_EXTERN void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    57
hb_map_destroy (hb_map_t *map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    58
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    59
HB_EXTERN hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    60
hb_map_set_user_data (hb_map_t           *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    61
                      hb_user_data_key_t *key,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    62
                      void *              data,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    63
                      hb_destroy_func_t   destroy,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    64
                      hb_bool_t           replace);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    65
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    66
HB_EXTERN void *
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    67
hb_map_get_user_data (hb_map_t           *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    68
                      hb_user_data_key_t *key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    69
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    70
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    71
/* Returns false if allocation has failed before */
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    72
HB_EXTERN hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    73
hb_map_allocation_successful (const hb_map_t *map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    74
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    75
HB_EXTERN void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    76
hb_map_clear (hb_map_t *map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    77
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    78
HB_EXTERN hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    79
hb_map_is_empty (const hb_map_t *map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    80
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    81
HB_EXTERN unsigned int
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    82
hb_map_get_population (const hb_map_t *map);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    83
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    84
HB_EXTERN void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    85
hb_map_set (hb_map_t       *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    86
            hb_codepoint_t  key,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    87
            hb_codepoint_t  value);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    88
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    89
HB_EXTERN hb_codepoint_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    90
hb_map_get (const hb_map_t *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    91
            hb_codepoint_t  key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    92
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    93
HB_EXTERN void
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    94
hb_map_del (hb_map_t       *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    95
            hb_codepoint_t  key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    96
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    97
HB_EXTERN hb_bool_t
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    98
hb_map_has (const hb_map_t *map,
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
    99
            hb_codepoint_t  key);
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   100
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   101
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   102
HB_END_DECLS
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   103
f5b95be8b6e2 8205441: Upgrade to harfbuzz 1.8.1
prr
parents:
diff changeset
   104
#endif /* HB_MAP_H */