public static void Main(string [] args) { Enlightenment.Ecore.MainLoop.Init(); Enlightenment.Ecore.Canvas.Init(); EE.SoftwareX11New(":0", IntPtr.Zero, 0, 0, app_w, app_h); EE.Title = "Sharp Table"; EE.NameClassSet("sharp_container", "sharp_container"); EE.ResizeEvent += new Enlightenment.Ecore.Canvas.EventHandler(AppResizeHandler); EE.Show(); Enlightenment.Ecore.Events.SignalExitEvent += new Enlightenment.Ecore.Events.EventHandler(AppSignalExitHandler); Rectangle bg_rect = new Rectangle(EE.Get()); bg_rect.Move(0, 0); bg_rect.Color = new Color(228, 226, 212, 255); bg_rect.Resize(app_w, app_h); bg_rect.Lower(); bg_rect.Show(); Rectangle left_toolbar = new Rectangle(EE.Get()); left_toolbar.Move(0, 0); left_toolbar.Resize(100, app_h); left_toolbar.Color = new Color(124, 126, 101, 200); left_toolbar.Show(); Rectangle top_toolbar = new Rectangle(EE.Get()); top_toolbar.Move(0, 0); top_toolbar.Resize(app_w, 50); top_toolbar.Color = new Color(124, 126, 101, 200); top_toolbar.Show(); DirectoryInfo myDirectory = new DirectoryInfo(args[0]); FileInfo[] _files = myDirectory.GetFiles(); foreach (FileInfo file in _files) { TableImage i = new TableImage(file); items.Add(i); } EE.DataSet("bg_rect", bg_rect); EE.DataSet("left_toolbar", left_toolbar); EE.DataSet("top_toolbar", top_toolbar); WaitCallback callback = new WaitCallback(DrawGui); ThreadPool.QueueUserWorkItem(callback); Enlightenment.Ecore.MainLoop.Begin(); }
public static void Main(string [] args) { Enlightenment.Ecore.Canvas.Init(); Enlightenment.Ecore.Canvas EE = new Enlightenment.Ecore.Canvas(); EE.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 800, 600); Image im = new Image(EE.Get()); im.Set("/tmp/test.png", null); int[] pixels = new int[im.Geometry.W * im.Geometry.H]; pixels = im.PixelsGet(1); // play around here. im.PixelsSet(pixels); }
public static void Main(string [] args) { Enlightenment.Ecore.Canvas.Init(); Enlightenment.Ecore.Canvas EE = new Enlightenment.Ecore.Canvas(); EE.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 800, 600); Image im = new Image(EE.Get()); im.Set("/tmp/test.png", null); int[] pixels = new int[im.Geometry.W * im.Geometry.H]; pixels = im.PixelsGet(1); // play around here. im.PixelsSet(pixels); }