Pebble Foundation Classes
0.2.0
C++ for Pebble
|
6 template<
class T,
void (T::*Method)(
void)>
7 static void pebble_callback_handler(::Window* window);
10 template<
class T,
void (T::*Method)(const ClickConfig&)>
11 static void pebble_callback_handler(
void* context);
14 template<
class T,
void (T::*Method)(const ClickRecognizer&)>
18 template<
class T,
void (T::*Method)(
void)>
19 static void pebble_callback_handler(::NumberWindow* window,
void* context);
42 operator ::Window*() {
return window_; }
150 inline static int& dummy() {
static int dummy = 0;
return dummy; }
163 .incremented = CALLBACK(OnIncremented),
164 .decremented = CALLBACK(OnDecremented),
165 .selected = CALLBACK(OnSelected),
177 operator ::NumberWindow*() {
return (::
NumberWindow*)window_; }
192 virtual void OnIncremented() { };
194 virtual void OnDecremented() { };
196 virtual void OnSelected() { };
201 template<
class T,
void (T::*Method)(
void)>
202 static void pebble_callback_handler(::Window* window)
204 (AppWindow::Get<T>(window).*Method)();
208 template<
class T,
void (T::*Method)(const ClickConfig&)>
209 static void pebble_callback_handler(
void* context)
211 (((T*)context)->*Method)(ClickConfig());
215 template<
class T,
void (T::*Method)(const ClickRecognizer&)>
218 (((T*)context)->*Method)(ClickRecognizer(recognizer));
222 template<
class T,
void (T::*Method)(
void)>
223 static void pebble_callback_handler(::NumberWindow* window,
void* context)
225 (((T*)context)->*Method)();
Definition: pebble_layer.hpp:34
void * window_get_user_data(const Window *window)
virtual ~Window()
Window destructor
Definition: pebble_window.hpp:36
Wraps and existing Pebble window but does not take ownership of it.
Definition: pebble_window.hpp:26
bool IsLoaded() const
Definition: pebble_window.hpp:75
void number_window_destroy(NumberWindow *number_window)
Destroys a NumberWindow previously created by number_window_create.
int32_t number_window_get_value(const NumberWindow *numberwindow)
Window * window_stack_get_top_window(void)
void number_window_set_max(NumberWindow *numberwindow, int32_t max)
NumberWindow(const char *label)
Definition: pebble_window.hpp:160
NumberWindow * number_window_create(const char *label, NumberWindowCallbacks callbacks, void *callback_context)
bool StackContainsWindow() const
Definition: pebble_window.hpp:52
virtual ~AppWindow()
Destroys the underlying Pebble window.
Definition: pebble_window.hpp:111
void window_set_background_color(Window *window, GColor background_color)
void(* ClickConfigProvider)(void *context)
Definition: pebble.h:4990
virtual void OnAppear()
Definition: pebble_window.hpp:136
void window_set_user_data(Window *window, void *data)
Window(::Window *window)
Definition: pebble_window.hpp:31
void window_stack_push(Window *window, bool animated)
AppWindow()
Definition: pebble_window.hpp:99
void window_set_window_handlers(Window *window, WindowHandlers handlers)
void SetBackgroundColor(GColor background_color)
Definition: pebble_window.hpp:84
bool window_stack_contains_window(Window *window)
bool window_stack_remove(Window *window, bool animated)
void window_destroy(Window *window)
Destroys a Window previously created by window_create.
virtual ~NumberWindow()
Destroys the underlying Pebble window.
Definition: pebble_window.hpp:173
void number_window_set_step_size(NumberWindow *numberwindow, int32_t step)
bool window_is_loaded(Window *window)
Window * window_create(void)
virtual void OnDisappear()
Definition: pebble_window.hpp:140
bool WindowIsTop()
Definition: pebble_window.hpp:56
ClickConfigProvider window_get_click_config_provider(const Window *window)
Definition: pebble_window.hpp:155
void window_set_click_config_provider_with_context(Window *window, ClickConfigProvider click_config_provider, void *context)
static T & Get(::Window *window)
Returns an object of the template class type from the specified window's user data.
Definition: pebble_window.hpp:121
void number_window_set_label(NumberWindow *numberwindow, const char *label)
void number_window_set_value(NumberWindow *numberwindow, int32_t value)
struct Layer * window_get_root_layer(const Window *window)
void * ClickRecognizerRef
Definition: pebble.h:4970
virtual void OnLoad()
Definition: pebble_window.hpp:126
virtual void OnUnload()
Definition: pebble_window.hpp:130
void StackPush(bool animated)
Definition: pebble_window.hpp:48
bool StackRemove(bool animated)
Definition: pebble_window.hpp:68
inline ::ClickConfigProvider GetClickConfigProvider() const
Gets the current click configuration provider of the window.
Definition: pebble_window.hpp:78
Definition: pebble.h:3268
Base class for application windows.
Definition: pebble_window.hpp:94
void SetClickConfigProvider(::ClickConfigProvider click_config_provider)
Sets the click config provider of this window to a local method.
Definition: pebble_window.hpp:143
void number_window_set_min(NumberWindow *numberwindow, int32_t min)