Comments (5)
Josh, this is part of the whole section that I don't think should be in the
file, and doesn't exist in the WebKit and Chromium versions. Why does Gecko
need it, and can it be moved to another file?
Original comment by stuart.morgan
on 28 Jan 2012 at 8:21
from npapi-sdk.
We do use them in Gecko, but we can probably just move that stuff to another
file. I'd probably r+ a patch for npapi-sdk that removed the definitions. A
patch may need to fix sample code in npapi-sdk.
Original comment by [email protected]
on 29 Jan 2012 at 4:18
from npapi-sdk.
There might be justification for not separating function pointers typedefs from
function's declarations, in that if function declaration changes, appropriate
typedef should also change. But NP_* functions will hardly ever change, so
separation will probably make no harm.
As of how to implement it, there are two options: define guard or separate file.
With define guard approach there should be changes required for plugin side or
browser side. With separate file approach there should be changes for plugin
side.
I would not make changes required for plugin side because there are a way to
more plugins than browsers, so I'd prefer the define guard approach. But the
separate file approach is definitely better.
There can be a mix of those two:
We can add two files: npapi_plugin.h and npapi_browser.h. In one file there
will be "define NPAPI_SDK_PLUGIN" and "define NPAPI_SDK_BROWSER" in another.
npfunctions.h would generate an error if neither of these are defined.
Original comment by [email protected]
on 29 Jan 2012 at 5:04
from npapi-sdk.
I'm fine with the guards approach, that does make it easier for existing code.
Lets not create any new files though. That's an unnecessary pain.
Thanks for looking into this.
Original comment by [email protected]
on 29 Jan 2012 at 5:23
from npapi-sdk.
Ok, so where such guard should be defined? In browser/plugin or both? I
wouldn't change plugin code, not only because there are more plugins than
browsers, but also because, IMO, a compile time error should be generated if
client doesn't define a guard. What do you think?
Original comment by [email protected]
on 29 Jan 2012 at 5:51
from npapi-sdk.
Related Issues (20)
- Please add NPAPI_VERSION_REVISION to provide true API version number HOT 2
- add support for NPNVdocumentOrigin HOT 2
- Samples unix-basic BasicPlugin not working HOT 7
- NP_GetPluginVersion has incorrect const-ness HOT 1
- NP_VERSION_MINOR must be increased HOT 1
- Const correctness of some functions' arguments HOT 2
- [patch] Can ndata be const void *? Is it used anywhere? HOT 1
- NP_* function declarations are declared with calling convention incompatible with NP_*Func types HOT 3
- Code review request HOT 2
- add support for Asynchronous Drawing Models (Bitmap and Windows Accelerated) HOT 7
- Fix a calling convention of NPN_* function pointers HOT 11
- Patch for /trunk/samples/mac-basic/Info.plist HOT 1
- Under MinGW bool and uintptr_t are unknown type names HOT 3
- OpenGL.h include in npapi.h on mac is problematic for some users HOT 4
- Plugin compiles but plugin error when loaded
- Need a tutorial or sample code to develop NPAPI Plugin for Safari5.1 from scratch HOT 1
- add a pkgconfig template HOT 6
- Add a simple autotools buildsystem HOT 9
- rev5 breaks API compatibility for plugins HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npapi-sdk.