This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Clutter = imports.gi.Clutter; | |
Clutter.init(0, null); | |
let stage = new Clutter.Stage(); | |
let texture = new Clutter.Texture({ filename: 'test.jpg', | |
reactive: true }); | |
stage.add_actor(texture); | |
stage.show(); | |
Clutter.main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Clutter = imports.gi.Clutter; | |
const Tweener = imports.tweener.tweener; | |
function click(actor, ev) { | |
let properties = { time: 1.0, | |
x: texture.x+100, | |
y: texture.y+100, | |
scale_x: texture.scale_x*0.8, | |
scale_y: texture.scale_y*0.8, | |
opacity: texture.opacity*0.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Clutter = imports.gi.Clutter; | |
const Tweener = imports.tweener.tweener; | |
function click(actor, ev) { | |
if (ev.get_button() == 1) { | |
Tweener.addTween(t, {time: 1.0, x: t.x+100}); | |
Tweener.addTween(t, {time: 1.0, y: t.y+100, delay: 1.0}); | |
Tweener.addTween(t, {time: 1.0, scale_x:t.scale_x*0.5, delay: 2.0}); | |
} | |
else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Clutter = imports.gi.Clutter; | |
const Tweener = imports.tweener.tweener; | |
/* | |
easeInQuad, easeOutQuad, easeInOutQuad | |
easeInCubic, easeOutCubic, easeInOutCubic | |
easeInQuart, easeOutQuart, easeInOutQuart | |
easeInQuint, easeOutQuint, easeInOutQuint | |
easeInSine, easeOutSine, easeInOutSine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample extension code, makes clicking on the panel show a message | |
const St = imports.gi.St; | |
const Mainloop = imports.mainloop; | |
const Main = imports.ui.main; | |
function _showHello() { | |
let text = new St.Label({ style_class: 'helloworld-label', | |
text: "Hello, world!" }); | |
let monitor = global.get_primary_monitor(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example stylesheet */ | |
.helloworld-label { | |
font-size: 36px; | |
font-weight: bold; | |
color: #ffffff; | |
background-color: rgba(10,10,10,0.7); | |
border-radius: 5px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample extension code, makes clicking on the panel show a message | |
const St = imports.gi.St; | |
const Mainloop = imports.mainloop; | |
const Main = imports.ui.main; | |
function _showHello() { | |
let text = new St.Label({ style_class: 'helloworld-label', | |
text: "Hello, world!" }); | |
let monitor = global.get_primary_monitor(); | |
global.stage.add_actor(text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample extension code, makes clicking on the panel show a message | |
const St = imports.gi.St; | |
const Mainloop = imports.mainloop; | |
const Main = imports.ui.main; | |
function _showHello() { | |
let text = new St.Label({ style_class: 'helloworld-label', | |
text: "Hello, world!" }); | |
let monitor = global.get_primary_monitor(); | |
global.stage.add_actor(text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const St = imports.gi.St; | |
const PanelMenu = imports.ui.panelMenu; | |
const Main = imports.ui.main; | |
function HelloPanelButton() { | |
this._init(); | |
} | |
HelloPanelButton.prototype = { | |
__proto__: PanelMenu.Button.prototype, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const St = imports.gi.St; | |
const Mainloop = imports.mainloop; | |
const PanelMenu = imports.ui.panelMenu; | |
const PopupMenu = imports.ui.popupMenu; | |
const Main = imports.ui.main; | |
const Tweener = imports.tweener.tweener; | |
function _showHello() { | |
let text = new St.Label({ style_class: 'helloworld-label', | |
text: "Hello, world!" }); |