diff options
author | Dave Parks <davep@lindenlab.com> | 2009-11-24 23:21:57 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2009-11-24 23:21:57 -0600 |
commit | e264f00c833805e1f813bc1d0b2cfd7a1bf7b272 (patch) | |
tree | 1a64a520502d2ed2c7dadc2316e543ae9e9a91d2 /indra/newview/llviewerwindowlistener.cpp | |
parent | c9e153c182dae9472a2b87cddfec8c47b30b06b9 (diff) | |
parent | 5b5354c933aa7b1ceeb307853c24fba28d4e31bf (diff) |
Merge
Diffstat (limited to 'indra/newview/llviewerwindowlistener.cpp')
-rw-r--r-- | indra/newview/llviewerwindowlistener.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp index 317e361c80..de57788271 100644 --- a/indra/newview/llviewerwindowlistener.cpp +++ b/indra/newview/llviewerwindowlistener.cpp @@ -20,8 +20,9 @@ // other Linden headers #include "llviewerwindow.h" -LLViewerWindowListener::LLViewerWindowListener(const std::string& pumpname, LLViewerWindow* llviewerwindow): - LLDispatchListener(pumpname, "op"), +LLViewerWindowListener::LLViewerWindowListener(LLViewerWindow* llviewerwindow): + LLEventAPI("LLViewerWindow", + "LLViewerWindow listener to (e.g.) save a screenshot"), mViewerWindow(llviewerwindow) { // add() every method we want to be able to invoke via this event API. @@ -34,8 +35,15 @@ LLViewerWindowListener::LLViewerWindowListener(const std::string& pumpname, LLVi // saveSnapshotArgs["showui"] = LLSD::Boolean(); // saveSnapshotArgs["rebuild"] = LLSD::Boolean(); // saveSnapshotArgs["type"] = LLSD::String(); - add("saveSnapshot", &LLViewerWindowListener::saveSnapshot, saveSnapshotArgs); - add("requestReshape", &LLViewerWindowListener::requestReshape); + add("saveSnapshot", + "Save screenshot: [\"filename\"], [\"width\"], [\"height\"], [\"showui\"], [\"rebuild\"], [\"type\"]\n" + "type: \"COLOR\", \"DEPTH\", \"OBJECT_ID\"\n" + "Post on [\"reply\"] an event containing [\"ok\"]", + &LLViewerWindowListener::saveSnapshot, + saveSnapshotArgs); + add("requestReshape", + "Resize the window: [\"w\"], [\"h\"]", + &LLViewerWindowListener::requestReshape); } void LLViewerWindowListener::saveSnapshot(const LLSD& event) const @@ -50,8 +58,8 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const #undef tp // Our add() call should ensure that the incoming LLSD does in fact // contain our required arguments. Deal with the optional ones. - S32 width (mViewerWindow->getWindowDisplayWidth()); - S32 height(mViewerWindow->getWindowDisplayHeight()); + S32 width (mViewerWindow->getWindowWidthRaw()); + S32 height(mViewerWindow->getWindowHeightRaw()); if (event.has("width")) width = event["width"].asInteger(); if (event.has("height")) |