Wiki

Changes between Initial Version and Version 1 of GtkSplashScreen

Show
Ignore:
Timestamp:
01/24/13 13:44:36 (11 years ago)
Author:
pyros2097
Comment:

created

Legend:

Unmodified
Added
Removed
Modified
  • GtkSplashScreen

    v1 v1  
     1This is a basic Splash Screen I created using Gtk 
     2 
     3{{{ 
     4#!cobra 
     5@args -pkg:gtk-sharp-2.0 
     6 
     7use System 
     8use Gtk 
     9 
     10class Splash inherits Window 
     11        cue init 
     12                base.init("") 
     13                .defaultSize = Gdk.Size(300,200) 
     14                .windowPosition = WindowPosition.Center 
     15                .decorated = false 
     16                .hasFocus = false 
     17                .hasFrame = false 
     18                .keepAbove = true 
     19                .modal = false 
     20                .skipPagerHint = true 
     21                .skipTaskbarHint = true 
     22                .typeHint = Gdk.WindowTypeHint.Splashscreen 
     23                .add(Image("logo.png")) 
     24                .showAll 
     25 
     26 
     27class MainWindow inherits Window 
     28    cue init 
     29        base.init("My Main") 
     30        #simulate something that times time like Thread.sleep(5) 
     31 
     32    def main is shared has STAThread 
     33        Application.init 
     34        spl = Splash() 
     35        while Application.eventsPending 
     36        Application.runIteration 
     37        MainWindow() #This is the window that takes a lot of time to load 
     38        spl.destroy 
     39        Application.run  
     40 
     41}}}