20 inline operator ::ScrollLayer*() {
return scroll_layer_; }
31 inline void SetContentOffset(
int offset,
bool animated) { SetContentOffset(
GPoint(0, offset), animated); }
34 inline void SetContentSize(
int height,
int width) { SetContentSize(
GSize(height, width)); }
37 inline void SetFrame(int16_t x, int16_t y, int16_t w, int16_t h) { SetFrame(
GRect(x, y, w, h)); }
38 inline void SetFrame(
GPoint origin,
GSize size) { SetFrame(
GRect(origin, size)); }
52 SetCallbacks(owner_window, {
53 .click_config_provider = click_config_provider,
54 .content_offset_changed_handler = content_offset_changed_handler
58 inline void SetCallbacks(Window& owner_window, ::
ScrollLayerCallback content_offset_changed_handler)
60 SetCallbacks(owner_window,
nullptr, content_offset_changed_handler);
65 SetCallbacks(owner_window, click_config_provider,
nullptr);
70 ::ScrollLayer* scroll_layer_;
75 template<
class T,
void (T::*Method)(
void)>
76 static void pebble_callback_handler(::ScrollLayer* scroll_layer,
void* context)
78 (((T*)context)->*Method)();