also, disable the call do BindColumns in
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ThemeGtk.cs
index bc70cffc688bab08d3158f1b9a0d8091a029d5fc..90aa89eaf343050abf15aa9f9c076b5c7da7f495 100644 (file)
@@ -98,9 +98,9 @@ namespace System.Windows.Forms
 
                [StructLayout(LayoutKind.Sequential)]   
                internal struct GObjectStruct {
-                       IntPtr  Instance;
-                       IntPtr  ref_count;
-                       IntPtr  data;
+                       public IntPtr Instance;
+                       public IntPtr ref_count;
+                       public IntPtr data;
                }
 
 
@@ -150,34 +150,34 @@ namespace System.Windows.Forms
                [DllImport("libgdk-x11-2.0.so")]
                static extern bool gdk_init_check(IntPtr argc, IntPtr argv);    
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern IntPtr gdk_pixmap_new (IntPtr drawable, int width, int height, int depth);
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern IntPtr gdk_pixmap_new (IntPtr drawable, int width, int height, int depth);
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern IntPtr gdk_pixbuf_get_from_drawable (IntPtr dest, IntPtr drawable_src, IntPtr cmap,
-                                                                  int src_x, int src_y, int dest_x, int dest_y, int width, int height);
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern IntPtr gdk_pixbuf_get_from_drawable (IntPtr dest, IntPtr drawable_src, IntPtr cmap,
+               //                                                 int src_x, int src_y, int dest_x, int dest_y, int width, int height);
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern bool gdk_pixbuf_save_to_buffer (IntPtr pixbuf, out IntPtr buffer, out UIntPtr buffer_size, string type, out IntPtr error, IntPtr option_dummy);
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern bool gdk_pixbuf_save_to_buffer (IntPtr pixbuf, out IntPtr buffer, out UIntPtr buffer_size, string type, out IntPtr error, IntPtr option_dummy);
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern IntPtr gdk_drawable_get_colormap (IntPtr drawable);
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern IntPtr gdk_drawable_get_colormap (IntPtr drawable);
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern IntPtr gdk_colormap_get_system ();
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern IntPtr gdk_colormap_get_system ();
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern IntPtr gdk_pixbuf_new (int colorspace, bool has_alpha, int bits_per_sample, int width, int height);
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern IntPtr gdk_pixbuf_new (int colorspace, bool has_alpha, int bits_per_sample, int width, int height);
                
-               [DllImport("libgdk-x11-2.0.so")]
-               static extern IntPtr gdk_gc_new (IntPtr drawable);
+               //[DllImport("libgdk-x11-2.0.so")]
+               //static extern IntPtr gdk_gc_new (IntPtr drawable);
                
                /* glib imports*/
-               [DllImport("libglib-2.0.so")]
-               static extern void g_free (IntPtr mem);
+               //[DllImport("libglib-2.0.so")]
+               //static extern void g_free (IntPtr mem);
                
-               [DllImport("libgobject-2.0.so")]
-               static extern void g_object_unref (IntPtr nativeObject);
+               //[DllImport("libgobject-2.0.so")]
+               //static extern void g_object_unref (IntPtr nativeObject);
 
                /* GTK imports */               
                [DllImport("libgtk-x11-2.0.so")]
@@ -198,8 +198,8 @@ namespace System.Windows.Forms
                [DllImport("libgtk-x11-2.0.so")]
                static extern IntPtr gtk_style_attach (IntPtr raw, IntPtr window);
 
-               [DllImport("libgtk-x11-2.0.so")]
-               static extern IntPtr gtk_rc_style_new ();
+               //[DllImport("libgtk-x11-2.0.so")]
+               //static extern IntPtr gtk_rc_style_new ();
 
                [DllImport("libgtk-x11-2.0.so")]
                static extern IntPtr gtk_invisible_new ();
@@ -210,8 +210,8 @@ namespace System.Windows.Forms
                [DllImport("libgtk-x11-2.0.so")]
                static extern IntPtr gtk_widget_get_style (IntPtr raw);
 
-               [DllImport("libgtk-x11-2.0.so")]
-               static extern void gtk_style_detach (IntPtr raw);
+               //[DllImport("libgtk-x11-2.0.so")]
+               //static extern void gtk_style_detach (IntPtr raw);
                
                [DllImport("libgtk-x11-2.0.so")]
                static extern IntPtr gtk_button_new ();
@@ -238,8 +238,8 @@ namespace System.Windows.Forms
                static extern void gtk_range_set_value (IntPtr range, double value);
 
                /* GTK Drawing */
-               [DllImport("libgtk-x11-2.0.so")]
-               static extern void gtk_paint_handle (IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, string detail, int x, int y, int width, int height, int orientation);
+               //[DllImport("libgtk-x11-2.0.so")]
+               //static extern void gtk_paint_handle (IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, string detail, int x, int y, int width, int height, int orientation);
 
                [DllImport("libgtk-x11-2.0.so")]
                static extern void gtk_paint_arrow (IntPtr style, IntPtr window, int state_type, int shadow_type, 
@@ -257,11 +257,11 @@ namespace System.Windows.Forms
                static extern void gtk_paint_flat_box (IntPtr style, IntPtr window, int state_type, int shadow_type,
                                                       IntPtr area, IntPtr widget, string detail, int x, int y, int width, int height);
                
-               [DllImport("libgtk-x11-2.0.so")]
-               static extern void gtk_paint_hline(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, string detail, int x1, int x2, int y);
+               //[DllImport("libgtk-x11-2.0.so")]
+               //static extern void gtk_paint_hline(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, string detail, int x1, int x2, int y);
                
-               [DllImport("libgtk-x11-2.0.so")]
-               static extern void gtk_paint_vline(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, string detail, int y1, int y2, int x);
+               //[DllImport("libgtk-x11-2.0.so")]
+               //static extern void gtk_paint_vline(IntPtr style, IntPtr window, int state_type, IntPtr area, IntPtr widget, string detail, int y1, int y2, int x);
                
                [DllImport("libgtk-x11-2.0.so")]
                static extern void gtk_paint_check(IntPtr style, IntPtr window, int state_type, int shadow_type, IntPtr area, IntPtr widget, string detail, int x, int y, int width, int height);
@@ -383,7 +383,6 @@ namespace System.Windows.Forms
                {
                        Console.WriteLine ("ThemeGtk constructor");
                        InitGtk ();
-                       default_font =  new Font (FontFamily.GenericSansSerif, 8.25f);
                        
                        LoadSysDefaultColors ();        
 
@@ -600,7 +599,7 @@ namespace System.Windows.Forms
                        #endif
 
                        // Now the text
-                       if (button.text != null && button.text != String.Empty)
+                       if (button.Text != null && button.Text != String.Empty)
                                ButtonBase_DrawText (button, dc);
                }
                
@@ -609,7 +608,7 @@ namespace System.Windows.Forms
                        Rectangle buttonRectangle = button.ClientRectangle;
                        
                        StateType state_type = StateType.Normal;
-                       ShadowType shadow_type = button.flat_style == FlatStyle.Flat ? ShadowType.In : ShadowType.Out;
+                       ShadowType shadow_type = button.FlatStyle == FlatStyle.Flat ? ShadowType.In : ShadowType.Out;
                        string detail = "buttondefault";
                        
                        if (((button is CheckBox) && (((CheckBox)button).check_state == CheckState.Checked)) ||
@@ -633,7 +632,7 @@ namespace System.Windows.Forms
                        if (button.Focused)
                                gtk_widget_grab_focus (global_gtk_button);
                        
-                       if (button.flat_style == FlatStyle.Flat)
+                       if (button.FlatStyle == FlatStyle.Flat)
                                gtk_paint_flat_box (current_style,
                                                    current_gdk_drawable,
                                                    (int) state_type,
@@ -644,7 +643,7 @@ namespace System.Windows.Forms
                                                    buttonRectangle.X, buttonRectangle.Y,
                                                    buttonRectangle.Width, buttonRectangle.Height);
                        else
-                       if (button.flat_style != FlatStyle.Popup || (button.flat_style == FlatStyle.Popup && button.is_entered))
+                       if (button.FlatStyle != FlatStyle.Popup || (button.FlatStyle == FlatStyle.Popup && button.is_entered))
                                gtk_paint_box (current_style,
                                               current_gdk_drawable,
                                               (int) state_type,