Subversion Repositories tpanel

Rev

Rev 97 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 97 Rev 98
Line 90... Line 90...
90
        bool haveSubPage(const std::string& page, int id);
90
        bool haveSubPage(const std::string& page, int id);
91
        TFont *getFonts() { return mFonts; }
91
        TFont *getFonts() { return mFonts; }
92
        Button::TButton *findButton(ulong handle);
92
        Button::TButton *findButton(ulong handle);
93
 
93
 
94
        void registerCallbackDB(std::function<void(ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> displayButton) { _displayButton = displayButton; }
94
        void registerCallbackDB(std::function<void(ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> displayButton) { _displayButton = displayButton; }
-
 
95
        void registerCBsetVisible(std::function<void(ulong handle, bool state)> setVisible) { _setVisible = setVisible; }
95
        void registerCallbackSP(std::function<void (ulong handle, int width, int height)> setPage) { _setPage = setPage; }
96
        void registerCallbackSP(std::function<void (ulong handle, int width, int height)> setPage) { _setPage = setPage; }
96
        void registerCallbackSSP(std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> setSubPage) { _setSubPage = setSubPage; }
97
        void registerCallbackSSP(std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> setSubPage) { _setSubPage = setSubPage; }
97
        void registerCallbackSB(std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> setBackground) {_setBackground = setBackground; }
98
        void registerCallbackSB(std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> setBackground) {_setBackground = setBackground; }
98
        void deployCallbacks();
99
        void deployCallbacks();
99
#ifdef __ANDROID__
100
#ifdef __ANDROID__
Line 231... Line 232...
231
         */
232
         */
232
        void startUp();
233
        void startUp();
233
 
234
 
234
        // Callbacks who will be registered by the graphical surface.
235
        // Callbacks who will be registered by the graphical surface.
235
        std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> getCallbackDB() { return _displayButton; }
236
        std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> getCallbackDB() { return _displayButton; }
-
 
237
        std::function<void (ulong handle, bool state)> getVisible() { return _setVisible; };
236
        std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> getCallbackBG() { return _setBackground; }
238
        std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> getCallbackBG() { return _setBackground; }
237
        std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> getCallbackPV() { return _callPlayVideo; }
239
        std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> getCallbackPV() { return _callPlayVideo; }
238
        std::function<void (ulong handle, int width, int height)> getCallbackSetPage() { return _setPage; }
240
        std::function<void (ulong handle, int width, int height)> getCallbackSetPage() { return _setPage; }
239
        std::function<void (Button::TButton *button, Button::BITMAP_t& bm)> getCallbackInputText() { return _callInputText; }
241
        std::function<void (Button::TButton *button, Button::BITMAP_t& bm)> getCallbackInputText() { return _callInputText; }
240
        std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> getCallbackSetSubPage() { return _setSubPage; }
242
        std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> getCallbackSetSubPage() { return _setSubPage; }
Line 260... Line 262...
260
        void dropAllPages();
262
        void dropAllPages();
261
        bool startComm();
263
        bool startComm();
262
 
264
 
263
    private:
265
    private:
264
        std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
266
        std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
-
 
267
        std::function<void (ulong handle, bool state)> _setVisible{nullptr};
265
        std::function<void (ulong handle, int width, int height)> _setPage{nullptr};
268
        std::function<void (ulong handle, int width, int height)> _setPage{nullptr};
266
        std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> _setSubPage{nullptr};
269
        std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> _setSubPage{nullptr};
267
        std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> _setBackground{nullptr};
270
        std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, int width, int height, ulong color)> _setBackground{nullptr};
268
        std::function<void (ulong handle, const std::string& text, const std::string& font, const std::string& family, int size, int x, int y, ulong color, ulong effectColor, FONT_STYLE style, Button::TEXT_ORIENTATION ori, Button::TEXT_EFFECT effect, bool ww)> _setText{nullptr};
271
        std::function<void (ulong handle, const std::string& text, const std::string& font, const std::string& family, int size, int x, int y, ulong color, ulong effectColor, FONT_STYLE style, Button::TEXT_ORIENTATION ori, Button::TEXT_EFFECT effect, bool ww)> _setText{nullptr};
269
        std::function<void (ulong handle)> _callDropPage{nullptr};
272
        std::function<void (ulong handle)> _callDropPage{nullptr};