Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: include/utils/SkLua.h

Issue 15737010: add dumpops.lua as a sample scraper that just dumps the arguments (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tools.gyp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkLua.h
diff --git a/include/utils/SkLua.h b/include/utils/SkLua.h
new file mode 100644
index 0000000000000000000000000000000000000000..232ba9b8ee4a5fb860dc8b4b705d4905b61741a0
--- /dev/null
+++ b/include/utils/SkLua.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkLua_DEFINED
+#define SkLua_DEFINED
+
+#include "SkColor.h"
+#include "SkScalar.h"
+
+struct lua_State;
+
+class SkCanvas;
+class SkMatrix;
+class SkPaint;
+class SkPath;
+struct SkRect;
+class SkRRect;
+class SkString;
+
+#define SkScalarToLua(x) SkScalarToDouble(x)
+#define SkLuaToScalar(x) SkDoubleToScalar(x)
+
+class SkLua {
+public:
+ static void Load(lua_State*);
+
+ SkLua(lua_State*);
+ ~SkLua();
+
+ lua_State* getL() const { return fL; }
+
+ void pushBool(bool, const char tableKey[] = NULL);
+ void pushString(const char[], const char tableKey[] = NULL);
+ void pushString(const SkString&, const char tableKey[] = NULL);
+ void pushColor(SkColor, const char tableKey[] = NULL);
+ void pushScalar(SkScalar, const char tableKey[] = NULL);
+ void pushRect(const SkRect&, const char tableKey[] = NULL);
+ void pushRRect(const SkRRect&, const char tableKey[] = NULL);
+ void pushMatrix(const SkMatrix&, const char tableKey[] = NULL);
+ void pushPaint(const SkPaint&, const char tableKey[] = NULL);
+ void pushPath(const SkPath&, const char tableKey[] = NULL);
+ void pushCanvas(SkCanvas*, const char tableKey[] = NULL);
+
+private:
+ lua_State* fL;
+};
+
+#endif
« no previous file with comments | « gyp/tools.gyp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698