diff --git a/includes/bwl.hh b/includes/bwl.hh index 0907d38175906674a15f8ba8e9b4abebb7c50c50..e01940c6e93d7bbe9d69dd113057976ce2afdb30 100644 --- a/includes/bwl.hh +++ b/includes/bwl.hh @@ -19,6 +19,22 @@ namespace bwl */ void initBadWayland(std::string __monitor_device); + /** + * @brief 获得一个页 + * 此函数只能获取页的信息,背景缓冲指针是无效的(修改背景缓冲可能是致命的) + * @param pgid + * @return void* + */ + void *getPage(id_t pgid); + + /** + * @brief 获得一个窗口 + * 此函数只能获取窗口信息,窗口缓冲是无效的(修改窗口缓冲可能是致命的) + * @param fid + * @return void* + */ + void *getFrame(id_t fid); + }; #endif diff --git a/libs/bwl.cc b/libs/bwl.cc index d87af5aa3d47ab831bb325de3b7130c7b778b984..64f71d9862f810ebb841223e0e2c17e53bb8352f 100644 --- a/libs/bwl.cc +++ b/libs/bwl.cc @@ -169,7 +169,7 @@ namespace bwl return frame; } - void deleteFrame(__frame * frame) + void deleteFrame(__frame *frame) { int fid = frame->fid; std::munmap(frame->client_buf, frame->size[0] * frame->size[1] * frame->pixdepth); @@ -208,4 +208,13 @@ namespace bwl return bad_wayland_server::pix_depth; } + // TODO这两个getter没有实现 + void *getPage(id_t pgid) + { + } + + void *getFrame(id_t fid) + { + } + };