mirror of
https://github.com/google/pebble.git
synced 2025-11-20 22:40:57 -05:00
Import of the watch repository from Pebble
This commit is contained in:
50
src/fw/applib/ui/time_range_selection_window.h
Normal file
50
src/fw/applib/ui/time_range_selection_window.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright 2024 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "applib/ui/date_time_selection_window_private.h"
|
||||
#include "applib/ui/selection_layer.h"
|
||||
#include "applib/ui/text_layer.h"
|
||||
#include "applib/ui/window.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
struct TimeRangeSelectionWindowData;
|
||||
|
||||
typedef void (*TimeRangeSelectionCompleteCallback)(struct TimeRangeSelectionWindowData *window,
|
||||
void *context);
|
||||
|
||||
typedef struct TimeRangeSelectionWindowData {
|
||||
Window window;
|
||||
SelectionLayer from_selection_layer;
|
||||
SelectionLayer to_selection_layer;
|
||||
TextLayer from_text_layer;
|
||||
TextLayer to_text_layer;
|
||||
|
||||
TimeRangeSelectionCompleteCallback complete_callback;
|
||||
void *callback_context;
|
||||
|
||||
TimeData from;
|
||||
TimeData to;
|
||||
char buf[3];
|
||||
} TimeRangeSelectionWindowData;
|
||||
|
||||
|
||||
void time_range_selection_window_init(TimeRangeSelectionWindowData *time_range_selection_window,
|
||||
GColor color, TimeRangeSelectionCompleteCallback complete_callback, void *callback_context);
|
||||
|
||||
void time_range_selection_window_deinit(TimeRangeSelectionWindowData *time_range_selection_window);
|
||||
Reference in New Issue
Block a user