2014-06-05 06:48:12 +00:00
|
|
|
if process.platform is 'linux' and process.type is 'renderer'
|
|
|
|
# On Linux we could not access clipboard in renderer process.
|
2014-06-05 07:22:36 +00:00
|
|
|
module.exports = require('remote').require 'clipboard'
|
2014-06-05 06:48:12 +00:00
|
|
|
else
|
|
|
|
binding = process.atomBinding 'clipboard'
|
|
|
|
|
|
|
|
module.exports =
|
|
|
|
has: (format, type='standard') -> binding._has format, type
|
|
|
|
read: (format, type='standard') -> binding._read format, type
|
|
|
|
readText: (type='standard') -> binding._readText type
|
|
|
|
writeText: (text, type='standard') -> binding._writeText text, type
|
|
|
|
clear: (type='standard') -> binding._clear type
|