Skip to content

Commit f71e4ff

Browse files
author
alexanderthiele
committed
build fixes
1 parent e22650d commit f71e4ff

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

src/src/flmln.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "flmln.h"
2+
#include "flmln_ffi_gen.h"
23

34
#include <stdint.h>
45

@@ -41,11 +42,11 @@ MBGL_CONSTRAIN_MODE mbgl_map_options_constrain_mode_get(mbgl_map_options_t _mapO
4142
case mbgl::ConstrainMode::None:
4243
return MBGL_CONSTRAIN_MODE_NONE;
4344
case mbgl::ConstrainMode::HeightOnly:
44-
return MBGL_CONSTRAIN_MODE_HEIGHT;
45+
return MBGL_CONSTRAIN_MODE_HEIGHT_ONLY;
4546
case mbgl::ConstrainMode::WidthAndHeight:
4647
return MBGL_CONSTRAIN_MODE_WIDTH_AND_HEIGHT;
4748
case mbgl::ConstrainMode::Screen:
48-
return MBGL_CONSTRAIN_MODE_SCREEEN;
49+
return MBGL_CONSTRAIN_MODE_SCREEN;
4950
}
5051

5152
// TODO: Fallback values.
@@ -56,10 +57,9 @@ void mbgl_map_options_constrain_mode_set(mbgl_map_options_t _mapOptions) {
5657

5758
}
5859

59-
void mbgl_map_options_set_mode(mbgl_map_options_t _mapOptions, enum MbglMapMode mode) {
60+
void mbgl_map_options_set_mode(mbgl_map_options_t _mapOptions, MBGL_MAP_MODE mode) {
6061
auto* mapOptions = reinterpret_cast<mbgl::MapOptions*>(_mapOptions);
6162
mapOptions->withMapMode(static_cast<mbgl::MapMode>(mode));
62-
mapOptions->withConstrainMode(mbgl::ConstrainMode::)
6363
}
6464

6565
void mbgl_map_options_set_size(mbgl_map_options_t _mapOptions, uint32_t width, uint32_t height) {

src/src/flmln.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <stddef.h>
22
#include <stdint.h>
33
#include <stdbool.h>
4+
#include "flmln_ffi_gen.h"
45

56
#define FLMLN_EXPORT __attribute__((__visibility__("default"))) __attribute__((__used__))
67

@@ -34,6 +35,18 @@ typedef void* mbgl_color_t;
3435
typedef void* mbgl_padding_t;
3536
typedef void* mbgl_variable_anchor_offset_collection_t;
3637

38+
// ---------------------------------
39+
// mbgl_map_options_t
40+
// ---------------------------------
41+
42+
EXTERNC FLMLN_EXPORT mbgl_map_options_t mbgl_map_options_create();
43+
EXTERNC FLMLN_EXPORT void mbgl_map_options_destroy(mbgl_map_options_t _mapOptions);
44+
EXTERNC FLMLN_EXPORT MBGL_CONSTRAIN_MODE mbgl_map_options_constrain_mode_get(mbgl_map_options_t _mapOptions);
45+
EXTERNC FLMLN_EXPORT void mbgl_map_options_constrain_mode_set(mbgl_map_options_t _mapOptions);
46+
EXTERNC FLMLN_EXPORT void mbgl_map_options_set_mode(mbgl_map_options_t _mapOptions, MBGL_MAP_MODE mode);
47+
EXTERNC FLMLN_EXPORT void mbgl_map_options_set_size(mbgl_map_options_t _mapOptions, uint32_t width, uint32_t height);
48+
EXTERNC FLMLN_EXPORT void mbgl_map_options_set_pixel_ratio(mbgl_map_options_t _mapOptions, float pixelRatio);
49+
3750
// ----------------------------------
3851
// mbgl_tile_server_options_t
3952
// ----------------------------------

src/src/flmln_ffi_gen.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#include "stdint.h"
44
#include "stdbool.h"
55

6+
// Duration type for animation durations (in milliseconds)
7+
typedef int64_t MBGL_DURATION;
8+
69
// C-compatible enum definition for mbgl::MapMode
710
typedef enum MBGL_MAP_MODE {
811
MBGL_MAP_MODE_CONTINUOUS = 0,

0 commit comments

Comments
 (0)