Mercurial > dwindows
comparison dw.hpp @ 2919:e609aa6a5b93
C++: Attempt to implement page 2 rendering...
Getting a crash on Mac, but want to commit before I sleep.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 28 Dec 2022 11:23:51 +0000 |
parents | 77e5d6743013 |
children | c6b699a441fe |
comparison
equal
deleted
inserted
replaced
2918:7d3276f80132 | 2919:e609aa6a5b93 |
---|---|
661 void BitBlt(int xdest, int ydest, int width, int height, Pixmap *src, int xsrc, int ysrc); | 661 void BitBlt(int xdest, int ydest, int width, int height, Pixmap *src, int xsrc, int ysrc); |
662 int SetFont(const char *fontname) { return dw_window_set_font(hwnd, fontname); } | 662 int SetFont(const char *fontname) { return dw_window_set_font(hwnd, fontname); } |
663 void GetTextExtents(const char *text, int *width, int *height) { dw_font_text_extents_get(hwnd, DW_NULL, text, width, height); } | 663 void GetTextExtents(const char *text, int *width, int *height) { dw_font_text_extents_get(hwnd, DW_NULL, text, width, height); } |
664 char *GetFont() { return dw_window_get_font(hwnd); } | 664 char *GetFont() { return dw_window_get_font(hwnd); } |
665 void Redraw() { dw_render_redraw(hwnd); } | 665 void Redraw() { dw_render_redraw(hwnd); } |
666 void Flush() { dw_flush(); } | |
666 #ifdef DW_LAMBDA | 667 #ifdef DW_LAMBDA |
667 void ConnectExpose(std::function<int(DWExpose *)> userfunc) | 668 void ConnectExpose(std::function<int(DWExpose *)> userfunc) |
668 #else | 669 #else |
669 void ConnectExpose(int (*userfunc)(DWExpose *)) | 670 void ConnectExpose(int (*userfunc)(DWExpose *)) |
670 #endif | 671 #endif |
768 MotionNotifyConnected = false; | 769 MotionNotifyConnected = false; |
769 return FALSE; | 770 return FALSE; |
770 }; | 771 }; |
771 }; | 772 }; |
772 | 773 |
773 class Pixmap : public Drawable, public Handle | 774 class Pixmap final : public Drawable, public Handle |
774 { | 775 { |
775 private: | 776 private: |
776 void SetHPIXMAP(HPIXMAP newpixmap) { | 777 void SetHPIXMAP(HPIXMAP newpixmap) { |
777 hpixmap = newpixmap; | 778 hpixmap = newpixmap; |
778 SetHandle(reinterpret_cast<void *>(newpixmap)); | 779 SetHandle(reinterpret_cast<void *>(newpixmap)); |
1671 int SetFeature(DWFEATURE feature, int state) { return dw_feature_set(feature, state); } | 1672 int SetFeature(DWFEATURE feature, int state) { return dw_feature_set(feature, state); } |
1672 HICN LoadIcon(unsigned long id) { return dw_icon_load(0, id); } | 1673 HICN LoadIcon(unsigned long id) { return dw_icon_load(0, id); } |
1673 HICN LoadIcon(const char *filename) { return dw_icon_load_from_file(filename); } | 1674 HICN LoadIcon(const char *filename) { return dw_icon_load_from_file(filename); } |
1674 HICN LoadIcon(const char *data, int len) { return dw_icon_load_from_data(data, len); } | 1675 HICN LoadIcon(const char *data, int len) { return dw_icon_load_from_data(data, len); } |
1675 void FreeIcon(HICN icon) { dw_icon_free(icon); } | 1676 void FreeIcon(HICN icon) { dw_icon_free(icon); } |
1676 void TaskBarInsert(Widget *handle, HICN icon, char *bubbletext) { dw_taskbar_insert(handle ? handle->GetHWND() : DW_NOHWND, icon, bubbletext); } | 1677 void TaskBarInsert(Widget *handle, HICN icon, const char *bubbletext) { dw_taskbar_insert(handle ? handle->GetHWND() : DW_NOHWND, icon, bubbletext); } |
1677 void TaskBarDelete(Widget *handle, HICN icon) { dw_taskbar_delete(handle ? handle->GetHWND() : DW_NOHWND, icon); } | 1678 void TaskBarDelete(Widget *handle, HICN icon) { dw_taskbar_delete(handle ? handle->GetHWND() : DW_NOHWND, icon); } |
1678 }; | 1679 }; |
1679 | 1680 |
1680 // Static singleton reference declared outside of the class | 1681 // Static singleton reference declared outside of the class |
1681 App* App::_app = DW_NULL; | 1682 App* App::_app = DW_NULL; |