Files
neat_bar/src/c/neat_bar.h
T
2026-07-19 20:14:42 -04:00

38 lines
1.5 KiB
C

/* SPDX-FileCopyrightText: 2024 Google LLC */
/* SPDX-License-Identifier: Apache-2.0 */
#pragma once
#include <pebble.h>
typedef struct {
struct Window *window;
GRect main_grect;
Layer *main_layer;
BitmapLayer *up_layer;
BitmapLayer *down_layer;
BitmapLayer *select_layer;
ClickConfigProvider click_config_provider;
GColor8 background_color;
uint16_t corner_radius;
uint16_t x_offset;
int8_t spread;
//bool use_legacy_animations
void *context;
} NeatBarLayer;
void neat_bar_layer_set_theme_default_rect(NeatBarLayer *neat_bar);
void neat_bar_layer_set_theme_legacy_rect(NeatBarLayer *neat_bar);
void neat_bar_layer_add_to_window(NeatBarLayer *neat_bar, Window *window);
void neat_bar_layer_set_click_config_provider(NeatBarLayer *neat_bar, ClickConfigProvider click_config_provider);
void neat_bar_layer_set_floating(NeatBarLayer *neat_bar, uint16_t x_offset);
void neat_bar_layer_set_width(NeatBarLayer *neat_bar, uint16_t width);
void neat_bar_layer_set_height(NeatBarLayer *neat_bar, uint16_t height);
void neat_bar_layer_set_y_offset(NeatBarLayer *neat_bar, uint16_t y_offset);
void neat_bar_layer_set_corner_radius(NeatBarLayer *neat_bar, uint16_t corner_radius);
void neat_bar_layer_set_background_color(NeatBarLayer *neat_bar, GColor background_color);
void neat_bar_layer_set_spread(NeatBarLayer *neat_bar, int8_t spread);
void neat_bar_layer_set_icon(NeatBarLayer *layer, ButtonId button_id, GBitmap *icon);
NeatBarLayer *neat_bar_layer_create();
void neat_bar_layer_destroy(NeatBarLayer *neat_bar);