1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
|
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace Gtk {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class PlacesSidebar : Gtk.ScrolledWindow {
public PlacesSidebar (IntPtr raw) : base(raw) {}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_places_sidebar_new();
public PlacesSidebar () : base (IntPtr.Zero)
{
if (GetType () != typeof (PlacesSidebar)) {
CreateNativeObject (new string [0], new GLib.Value[0]);
return;
}
Raw = gtk_places_sidebar_new();
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_places_sidebar_get_location(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_location(IntPtr raw, IntPtr location);
[GLib.Property ("location")]
public GLib.IFile Location {
get {
IntPtr raw_ret = gtk_places_sidebar_get_location(Handle);
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
return ret;
}
set {
gtk_places_sidebar_set_location(Handle, value == null ? IntPtr.Zero : ((value is GLib.Object) ? (value as GLib.Object).Handle : (value as GLib.FileAdapter).Handle));
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern int gtk_places_sidebar_get_open_flags(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_open_flags(IntPtr raw, int flags);
[GLib.Property ("open-flags")]
public Gtk.PlacesOpenFlags OpenFlags {
get {
int raw_ret = gtk_places_sidebar_get_open_flags(Handle);
Gtk.PlacesOpenFlags ret = (Gtk.PlacesOpenFlags) raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_open_flags(Handle, (int) value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_show_recent(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_show_recent(IntPtr raw, bool show_recent);
[GLib.Property ("show-recent")]
public bool ShowRecent {
get {
bool raw_ret = gtk_places_sidebar_get_show_recent(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_show_recent(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_show_desktop(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_show_desktop(IntPtr raw, bool show_desktop);
[GLib.Property ("show-desktop")]
public bool ShowDesktop {
get {
bool raw_ret = gtk_places_sidebar_get_show_desktop(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_show_desktop(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_show_connect_to_server(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_show_connect_to_server(IntPtr raw, bool show_connect_to_server);
[Obsolete]
[GLib.Property ("show-connect-to-server")]
public bool ShowConnectToServer {
get {
bool raw_ret = gtk_places_sidebar_get_show_connect_to_server(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_show_connect_to_server(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_show_enter_location(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_show_enter_location(IntPtr raw, bool show_enter_location);
[GLib.Property ("show-enter-location")]
public bool ShowEnterLocation {
get {
bool raw_ret = gtk_places_sidebar_get_show_enter_location(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_show_enter_location(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_local_only(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_local_only(IntPtr raw, bool local_only);
[GLib.Property ("local-only")]
public bool LocalOnly {
get {
bool raw_ret = gtk_places_sidebar_get_local_only(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_local_only(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_show_trash(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_show_trash(IntPtr raw, bool show_trash);
[GLib.Property ("show-trash")]
public bool ShowTrash {
get {
bool raw_ret = gtk_places_sidebar_get_show_trash(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_show_trash(Handle, value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern bool gtk_places_sidebar_get_show_other_locations(IntPtr raw);
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_show_other_locations(IntPtr raw, bool show_other_locations);
[GLib.Property ("show-other-locations")]
public bool ShowOtherLocations {
get {
bool raw_ret = gtk_places_sidebar_get_show_other_locations(Handle);
bool ret = raw_ret;
return ret;
}
set {
gtk_places_sidebar_set_show_other_locations(Handle, value);
}
}
[GLib.Property ("populate-all")]
public bool PopulateAll {
get {
GLib.Value val = GetProperty ("populate-all");
bool ret = (bool) val;
val.Dispose ();
return ret;
}
set {
GLib.Value val = new GLib.Value(value);
SetProperty("populate-all", val);
val.Dispose ();
}
}
[GLib.Signal("show-other-locations-with-flags")]
public event Gtk.ShowOtherLocationsWithFlagsHandler ShowOtherLocationsWithFlags {
add {
this.AddSignalHandler ("show-other-locations-with-flags", value, typeof (Gtk.ShowOtherLocationsWithFlagsArgs));
}
remove {
this.RemoveSignalHandler ("show-other-locations-with-flags", value);
}
}
[GLib.Signal("show-connect-to-server")]
public event System.EventHandler ShowedConnectToServer {
add {
this.AddSignalHandler ("show-connect-to-server", value);
}
remove {
this.RemoveSignalHandler ("show-connect-to-server", value);
}
}
[GLib.Signal("open-location")]
public event Gtk.OpenLocationHandler OpenLocation {
add {
this.AddSignalHandler ("open-location", value, typeof (Gtk.OpenLocationArgs));
}
remove {
this.RemoveSignalHandler ("open-location", value);
}
}
[GLib.Signal("mount")]
public event Gtk.MountHandler Mount {
add {
this.AddSignalHandler ("mount", value, typeof (Gtk.MountArgs));
}
remove {
this.RemoveSignalHandler ("mount", value);
}
}
[GLib.Signal("populate-popup")]
public event Gtk.PopulatePopupHandler PopulatePopup {
add {
this.AddSignalHandler ("populate-popup", value, typeof (Gtk.PopulatePopupArgs));
}
remove {
this.RemoveSignalHandler ("populate-popup", value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int DragActionRequestedSignalDelegate (IntPtr inst, IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr gch);
static int DragActionRequestedSignalCallback (IntPtr inst, IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr gch)
{
Gtk.DragActionRequestedArgs args = new Gtk.DragActionRequestedArgs ();
try {
GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
if (sig == null)
throw new Exception("Unknown signal GC handle received " + gch);
args.Args = new object[3];
args.Args[0] = GLib.Object.GetObject(arg0) as Gdk.DragContext;
args.Args[1] = GLib.FileAdapter.GetObject (arg1, false);
if (arg2 == IntPtr.Zero)
args.Args[2] = null;
else {
args.Args[2] = new GLib.List(arg2);
}
Gtk.DragActionRequestedHandler handler = (Gtk.DragActionRequestedHandler) sig.Handler;
handler (GLib.Object.GetObject (inst), args);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
try {
return (int) ((Gdk.DragAction) args.RetVal);
} catch (Exception) {
Exception ex = new Exception ("args.RetVal or 'out' property unset or set to incorrect type in Gtk.DragActionRequestedHandler callback");
GLib.ExceptionManager.RaiseUnhandledException (ex, true);
// NOTREACHED: above call doesn't return.
throw ex;
}
}
[GLib.Signal("drag-action-requested")]
public event Gtk.DragActionRequestedHandler DragActionRequested {
add {
this.AddSignalHandler ("drag-action-requested", value, new DragActionRequestedSignalDelegate(DragActionRequestedSignalCallback));
}
remove {
this.RemoveSignalHandler ("drag-action-requested", value);
}
}
[GLib.Signal("show-error-message")]
public event Gtk.ShowErrorMessageHandler ShowErrorMessage {
add {
this.AddSignalHandler ("show-error-message", value, typeof (Gtk.ShowErrorMessageArgs));
}
remove {
this.RemoveSignalHandler ("show-error-message", value);
}
}
[GLib.Signal("drag-action-ask")]
public event Gtk.DragActionAskHandler DragActionAsk {
add {
this.AddSignalHandler ("drag-action-ask", value, typeof (Gtk.DragActionAskArgs));
}
remove {
this.RemoveSignalHandler ("drag-action-ask", value);
}
}
[GLib.Signal("show-other-locations")]
public event System.EventHandler ShowedOtherLocations {
add {
this.AddSignalHandler ("show-other-locations", value);
}
remove {
this.RemoveSignalHandler ("show-other-locations", value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void DragPerformDropSignalDelegate (IntPtr inst, IntPtr arg0, IntPtr arg1, int arg2, IntPtr gch);
static void DragPerformDropSignalCallback (IntPtr inst, IntPtr arg0, IntPtr arg1, int arg2, IntPtr gch)
{
Gtk.DragPerformDropArgs args = new Gtk.DragPerformDropArgs ();
try {
GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
if (sig == null)
throw new Exception("Unknown signal GC handle received " + gch);
args.Args = new object[3];
args.Args[0] = GLib.FileAdapter.GetObject (arg0, false);
if (arg1 == IntPtr.Zero)
args.Args[1] = null;
else {
args.Args[1] = new GLib.List(arg1);
}
args.Args[2] = (Gdk.DragAction) arg2;
Gtk.DragPerformDropHandler handler = (Gtk.DragPerformDropHandler) sig.Handler;
handler (GLib.Object.GetObject (inst), args);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.Signal("drag-perform-drop")]
public event Gtk.DragPerformDropHandler DragPerformDrop {
add {
this.AddSignalHandler ("drag-perform-drop", value, new DragPerformDropSignalDelegate(DragPerformDropSignalCallback));
}
remove {
this.RemoveSignalHandler ("drag-perform-drop", value);
}
}
[GLib.Signal("unmount")]
public event Gtk.UnmountHandler Unmount {
add {
this.AddSignalHandler ("unmount", value, typeof (Gtk.UnmountArgs));
}
remove {
this.RemoveSignalHandler ("unmount", value);
}
}
[GLib.Signal("show-enter-location")]
public event System.EventHandler ShowEnteredLocation {
add {
this.AddSignalHandler ("show-enter-location", value);
}
remove {
this.RemoveSignalHandler ("show-enter-location", value);
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_add_shortcut(IntPtr raw, IntPtr location);
public void AddShortcut(GLib.IFile location) {
gtk_places_sidebar_add_shortcut(Handle, location == null ? IntPtr.Zero : ((location is GLib.Object) ? (location as GLib.Object).Handle : (location as GLib.FileAdapter).Handle));
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_places_sidebar_get_nth_bookmark(IntPtr raw, int n);
public GLib.IFile GetNthBookmark(int n) {
IntPtr raw_ret = gtk_places_sidebar_get_nth_bookmark(Handle, n);
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_places_sidebar_get_type();
public static new GLib.GType GType {
get {
IntPtr raw_ret = gtk_places_sidebar_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr gtk_places_sidebar_list_shortcuts(IntPtr raw);
public GLib.SList ListShortcuts() {
IntPtr raw_ret = gtk_places_sidebar_list_shortcuts(Handle);
GLib.SList ret = new GLib.SList(raw_ret);
return ret;
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_remove_shortcut(IntPtr raw, IntPtr location);
public void RemoveShortcut(GLib.IFile location) {
gtk_places_sidebar_remove_shortcut(Handle, location == null ? IntPtr.Zero : ((location is GLib.Object) ? (location as GLib.Object).Handle : (location as GLib.FileAdapter).Handle));
}
[DllImport("gtk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
static extern void gtk_places_sidebar_set_drop_targets_visible(IntPtr raw, bool visible, IntPtr context);
public void SetDropTargetsVisible(bool visible, Gdk.DragContext context) {
gtk_places_sidebar_set_drop_targets_visible(Handle, visible, context == null ? IntPtr.Zero : context.Handle);
}
#endregion
}
}
|