Ejemplo n.º 1
0
 /// <summary>
 /// ネイティブから
 /// </summary>
 /// <param name="app">ApplicationContext</param>
 /// <param name="tabs">WidgetList</param>
 internal WidgetList(ApplicationContext app, IntPtr widgets, int count)
 {
     IntPtr [] ps = new IntPtr[count+1];
     widgetList = new List<IWidget>();
     Marshal.Copy(widgets, ps, 0, count);
     for (int i = 0;i < count;i++) {
         IWidget w = app.FindWidgetByHandle(ps[i]);
         if (null == w) {
             throw new NullReferenceException("w == NULL");
         }
         widgetList.Add(w);
     }
 }