History

Add WindowScriptingInterface and LocationScriptingInterface

Ryan Huffman committed 12 years ago

Commit b9f296d1 parent 3ab61f24 files · +223 −0Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.h (1 of 4 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.h+43−0
@@ -0,0 +1,43 @@
1//
2// WindowScriptingInterface.cpp
3// interface/src/scripting
4//
5// Created by Ryan Huffman on 4/29/14.
6// Copyright 2014 High Fidelity, Inc.
7//
8// Distributed under the Apache License, Version 2.0.
9// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10//
11
12#ifndef hifi_WindowScriptingInterface_h
13#define hifi_WindowScriptingInterface_h
14
15#include <QDebug>
16#include <QMutex>
17#include <QObject>
18#include <QString>
19
20#include "LocationScriptingInterface.h"
21
22class WindowScriptingInterface : public QObject {
23 Q_OBJECT
24 Q_PROPERTY(int innerWidth READ getInnerWidth)
25 Q_PROPERTY(int innerHeight READ getInnerHeight)
26 WindowScriptingInterface() { };
27public:
28 static WindowScriptingInterface* getInstance();
29 int getInnerWidth();
30 int getInnerHeight();
31
32public slots:
33 QScriptValue alert(const QString& message);
34 QScriptValue confirm(const QString& message);
35 QScriptValue prompt(const QString& message, const QString& defaultText="");
36
37private slots:
38 QScriptValue showAlert(const QString& message);
39 QScriptValue showConfirm(const QString& message);
40 QScriptValue showPrompt(const QString& message, const QString& defaultText);
41};
42
43#endif // hifi_WindowScriptingInterface_h

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t