~ubuntu-branches/ubuntu/natty/gtk-sharp2/natty

« back to all changes in this revision

Viewing changes to gtk/StatusIcon.custom

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-05-18 00:00:41 UTC
  • mfrom: (1.1.16 upstream) (13.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100518000041-tlgvki554jx6ndhi
Tags: 2.12.10-1
* New upstream release
* debian/rules:
  + Bump API version to 2.12.10
* debian/control:
  + Bump Standards to 3.8.4 (no changes needed)
* debian/source/format:
  + Force Debian source format 1.0
* debian/rules:
  + Write a get-orig-source rule
* debian/watch:
  + Get rid of evil "debian uupdate" line which breaks packaging work on
    Ubuntu
* debian/patches/01_dllmaps.dpatch:
  + Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                        }
69
69
                }
70
70
 
 
71
                [DllImport("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
 
72
                static extern bool gtk_status_icon_get_geometry(IntPtr raw, out IntPtr screen, IntPtr area, out int orientation);
 
73
 
 
74
                public bool GetGeometry(out Gdk.Screen screen, out Gdk.Rectangle area, out Gtk.Orientation orientation)
 
75
                {
 
76
                        IntPtr native_screen;
 
77
                        IntPtr native_area = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gdk.Rectangle)));
 
78
                        int native_orientation;
 
79
                        bool ret = gtk_status_icon_get_geometry(Handle, out native_screen, native_area, out native_orientation);
 
80
                        if (ret) {
 
81
                                screen = GLib.Object.GetObject(native_screen) as Gdk.Screen;
 
82
                                area = Gdk.Rectangle.New (native_area);
 
83
                                orientation = (Gtk.Orientation) native_orientation;
 
84
                        } else {
 
85
                                screen = null;
 
86
                                area = Gdk.Rectangle.Zero;
 
87
                                orientation = Gtk.Orientation.Horizontal;
 
88
                        }
 
89
                        Marshal.FreeHGlobal (native_area);
 
90
                        return ret;
 
91
                }
71
92