aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewergesture.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llviewergesture.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to 'linden/indra/newview/llviewergesture.h')
-rw-r--r--linden/indra/newview/llviewergesture.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewergesture.h b/linden/indra/newview/llviewergesture.h
new file mode 100644
index 0000000..8d2e24f
--- /dev/null
+++ b/linden/indra/newview/llviewergesture.h
@@ -0,0 +1,90 @@
1/**
2 * @file llviewergesture.h
3 * @brief LLViewerGesture class header file
4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#ifndef LL_LLVIEWERGESTURE_H
29#define LL_LLVIEWERGESTURE_H
30
31#include "llanimationstates.h"
32#include "lluuid.h"
33#include "llstring.h"
34#include "lldarray.h"
35#include "llgesture.h"
36
37class LLMessageSystem;
38
39class LLViewerGesture : public LLGesture
40{
41public:
42 LLViewerGesture();
43 LLViewerGesture(KEY key, MASK mask, const std::string &trigger,
44 const LLUUID &sound_item_id, const std::string &animation,
45 const std::string &output_string);
46
47 LLViewerGesture(U8 **buffer, S32 max_size); // deserializes, advances buffer
48 LLViewerGesture(const LLViewerGesture &gesture);
49
50 // Triggers if a key/mask matches it
51 virtual BOOL trigger(KEY key, MASK mask);
52
53 // Triggers if case-insensitive substring matches (assumes string is lowercase)
54 virtual BOOL trigger(const std::string &string);
55
56 void doTrigger( BOOL send_chat );
57
58protected:
59 static const F32 SOUND_VOLUME;
60};
61
62class LLViewerGestureList : public LLGestureList
63{
64public:
65 LLViewerGestureList();
66
67 void saveToServer();
68 //void requestFromServer();
69 BOOL getIsLoaded() { return mIsLoaded; }
70
71 //void requestResetFromServer( BOOL is_male );
72
73 // See if the prefix matches any gesture. If so, return TRUE
74 // and place the full text of the gesture trigger into
75 // output_str
76 BOOL matchPrefix(const std::string& in_str, std::string* out_str);
77
78 static void xferCallback(void *data, S32 size, void** /*user_data*/, S32 status);
79 static void processGestureUpdate(LLMessageSystem *msg, void** /*user_data*/);
80
81protected:
82 LLGesture *create_gesture(U8 **buffer, S32 max_size);
83
84protected:
85 BOOL mIsLoaded;
86};
87
88extern LLViewerGestureList gGestureList;
89
90#endif