daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Import the clutter class form the gi repository(the object introspection repository)
  2. const Clutter = imports.gi.Clutter;
  3. // Initialize clutter
  4. Clutter.init(null);
  5. /*
  6.  * Create a stage. This function returns a new default stage, with its own
  7.  * window. ClutterStage is derived from the ClutterActor object so many of that
  8.  * object's functions are useful for the stage. For instance, call
  9.  * Clutter.Stage.get_default().show() to make the stage visible.
  10.  */
  11. let stage = new Clutter.Stage();
  12.  
  13. // We connect the destroy event to quit from the mainloop when we close the
  14. // window.
  15. stage.connect("destroy", Clutter.main_quit);
  16. // Put some title
  17. stage.title = "Test";
  18. // Set a color to the stage to show that it is working
  19. stage.set_background_color(new Clutter.Color({
  20.     red : 150,
  21.     blue : 0,
  22.     green : 0,
  23.     alpha : 255
  24. }));
  25. // As we say, the stage is also an actor, so we shoe it to make visible
  26. stage.show();
  27. // Start a main loop so that the stage can animate its contents and respond to
  28. // user interaction.
  29. Clutter.main();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top