Skip to content

Commit

Permalink
Merge branch 'master' of github.com:INRIA/libpointing
Browse files Browse the repository at this point in the history
  • Loading branch information
Géry CASIEZ committed Feb 28, 2017
2 parents 34307e7 + fdedb35 commit 95ce763
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 27 deletions.
10 changes: 5 additions & 5 deletions bindings/Node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ Read this to learn how to write bindings
* Stable Node.js
* npm (Node package manager) (For ubuntu: `sudo apt-get install npm`)
* Python version > 2.7
* node-gyp (`sudo npm install -g node-gyp`)
* node-gyp (`npm install -g node-gyp`)

2. Install libpointing and link it in *libpointing/binding.gyp*

3. In the current folder install nan with `npm install nan`
3. In the current folder install nan with `npm install nan`.

## Compilation

* Run `make`, which will execute `node-gyp configure build`
* Run `node-gyp configure build` in the *libpointing* folder.

## Running

You can run *consoleExample.js* to test the bindings with `node consoleExample.js`
You can run *consoleExample.js* to test the bindings with `node consoleExample.js`.

# Server app

Expand All @@ -47,4 +47,4 @@ Follow these instructions to build the nw-app for Windows:

1. In *Node/nw*-folder run `npm install`

1. Run `node builder.js` (Make sure the target is the same)
1. Run `node builder.js` (Make sure the target is the same).
2 changes: 1 addition & 1 deletion bindings/Node/libpointing/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libpointing",

"version": "1.0.4",
"version": "1.0.5",

"description": "An open-source cross-platform library to get raw events from pointing devices and master transfer functions",

Expand Down
37 changes: 18 additions & 19 deletions pointing/input/PointingDeviceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,23 @@ namespace pointing
{
friend class SystemPointingDevice;

protected:
private:
PointingDescriptorSet descriptors;

void addDescriptor(PointingDeviceDescriptor &descriptor);
void removeDescriptor(PointingDeviceDescriptor &descriptor);

std::set<CallbackInfo> callbackInfos;

void callCallbackFunctions(PointingDeviceDescriptor &descriptor, bool wasAdded);

static PointingDeviceManager *singleManager;

void convertAnyCandidates();

void matchCandidates();

protected:
typedef std::list<SystemPointingDevice *> PointingList;

// This struct can be extended in subclasses to add
Expand All @@ -103,27 +118,9 @@ namespace pointing

std::map<identifier, PointingDeviceData *> devMap;

DeviceUpdateCallback callback = NULL;

virtual ~PointingDeviceManager(void) {}
static PointingDeviceManager *singleManager;

PointingDescriptorSet descriptors;

std::set<CallbackInfo> callbackInfos;

void callCallbackFunctions(PointingDeviceDescriptor &descriptor, bool wasAdded);

void addDescriptor(PointingDeviceDescriptor &descriptor);
void removeDescriptor(PointingDeviceDescriptor &descriptor);

PointingList candidates;
int debugLevel = 0;

void convertAnyCandidates();

void matchCandidates();

// Should be implemented by a subclass
virtual void processMatching(PointingDeviceData *pdd, SystemPointingDevice *device)=0;

Expand Down Expand Up @@ -202,6 +199,8 @@ namespace pointing
PointingDescriptorIterator begin() { return descriptors.begin(); }
PointingDescriptorIterator end() { return descriptors.end(); }
//@}

virtual ~PointingDeviceManager(void) {}
};
}

Expand Down
1 change: 0 additions & 1 deletion pointing/input/linux/linuxPointingDeviceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ namespace pointing {
linuxPointingDeviceManager();
~linuxPointingDeviceManager();
};

}

#endif
1 change: 0 additions & 1 deletion pointing/input/osx/osxPointingDeviceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,4 @@ namespace pointing
};
}


#endif

0 comments on commit 95ce763

Please sign in to comment.