gio2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/gio2/extconf.rb +4 -42
- data/ext/gio2/gio2.c +18 -117
- data/ext/gio2/gio2.h +20 -339
- data/ext/gio2/rbgio.c +132 -0
- data/ext/gio2/rbgio2.h +156 -0
- data/ext/gio2/rbgio2conversions.h +154 -0
- data/ext/gio2/rbgio2private.h +147 -0
- data/ext/gio2/{gappinfo.c → rbgioappinfo.c} +81 -82
- data/ext/gio2/rbgioapplaunchcontext.c +81 -0
- data/ext/gio2/{gasyncinitable.c → rbgioasyncinitable.c} +33 -30
- data/ext/gio2/rbgioasyncresult.c +41 -0
- data/ext/gio2/{gbufferedinputstream.c → rbgiobufferedinputstream.c} +37 -35
- data/ext/gio2/rbgiobufferedoutputstream.c +50 -0
- data/ext/gio2/rbgiocancellable.c +180 -0
- data/ext/gio2/rbgiocharsetconverter.c +57 -0
- data/ext/gio2/rbgiocontenttype.c +131 -0
- data/ext/gio2/{gconverter.c → rbgioconverter.c} +24 -28
- data/ext/gio2/rbgioconverterinputstream.c +43 -0
- data/ext/gio2/rbgioconverteroutputstream.c +43 -0
- data/ext/gio2/{gdatainputstream.c → rbgiodatainputstream.c} +49 -58
- data/ext/gio2/{gdataoutputstream.c → rbgiodataoutputstream.c} +39 -37
- data/ext/gio2/rbgiodesktopappinfo.c +87 -0
- data/ext/gio2/{gdrive.c → rbgiodrive.c} +75 -76
- data/ext/gio2/rbgioemblem.c +52 -0
- data/ext/gio2/rbgioemblemedicon.c +65 -0
- data/ext/gio2/{gfile.c → rbgiofile.c} +256 -266
- data/ext/gio2/rbgiofileattribute.c +114 -0
- data/ext/gio2/rbgiofileattributeinfo.c +86 -0
- data/ext/gio2/rbgiofileattributeinfolist.c +106 -0
- data/ext/gio2/rbgiofileattributematcher.c +93 -0
- data/ext/gio2/rbgiofiledescriptorbased.c +45 -0
- data/ext/gio2/{gfileenumerator.c → rbgiofileenumerator.c} +42 -40
- data/ext/gio2/rbgiofileicon.c +41 -0
- data/ext/gio2/{gfileinfo.c → rbgiofileinfo.c} +159 -163
- data/ext/gio2/{gfileinputstream.c → rbgiofileinputstream.c} +26 -25
- data/ext/gio2/{gfileiostream.c → rbgiofileiostream.c} +28 -26
- data/ext/gio2/rbgiofilemonitor.c +46 -0
- data/ext/gio2/rbgiofilenamecompleter.c +74 -0
- data/ext/gio2/{gfileoutputstream.c → rbgiofileoutputstream.c} +28 -26
- data/ext/gio2/rbgiofilterinputstream.c +28 -0
- data/ext/gio2/rbgiofilteroutputstream.c +28 -0
- data/ext/gio2/rbgioicon.c +69 -0
- data/ext/gio2/rbgioinetaddress.c +118 -0
- data/ext/gio2/rbgioinetsocketaddress.c +41 -0
- data/ext/gio2/{ginitable.c → rbgioinitable.c} +29 -25
- data/ext/gio2/{ginputstream.c → rbgioinputstream.c} +50 -48
- data/ext/gio2/rbgioio.c +73 -0
- data/ext/gio2/rbgioiomodule.c +45 -0
- data/ext/gio2/rbgioiomodules.c +47 -0
- data/ext/gio2/rbgioioscheduler.c +102 -0
- data/ext/gio2/rbgioioschedulerjob.c +121 -0
- data/ext/gio2/rbgioiostream.c +108 -0
- data/ext/gio2/{gloadableicon.c → rbgioloadableicon.c} +26 -24
- data/ext/gio2/rbgiomemoryinputstream.c +67 -0
- data/ext/gio2/rbgiomemoryoutputstream.c +44 -0
- data/ext/gio2/{gmount.c → rbgiomount.c} +70 -68
- data/ext/gio2/rbgiomountoperation.c +53 -0
- data/ext/gio2/rbgionetworkaddress.c +59 -0
- data/ext/gio2/rbgionetworkservice.c +45 -0
- data/ext/gio2/{goutputstream.c → rbgiooutputstream.c} +61 -62
- data/ext/gio2/{gresolver.c → rbgioresolver.c} +50 -48
- data/ext/gio2/rbgioseekable.c +91 -0
- data/ext/gio2/rbgiosimpleasyncresult.c +155 -0
- data/ext/gio2/{gsocket.c → rbgiosocket.c} +74 -76
- data/ext/gio2/rbgiosocketaddress.c +34 -0
- data/ext/gio2/rbgiosocketaddressenumerator.c +83 -0
- data/ext/gio2/{gsocketclient.c → rbgiosocketclient.c} +41 -39
- data/ext/gio2/rbgiosocketconnectable.c +41 -0
- data/ext/gio2/rbgiosocketconnection.c +66 -0
- data/ext/gio2/rbgiosocketconnectionfactory.c +39 -0
- data/ext/gio2/rbgiosocketcontrolmessage.c +82 -0
- data/ext/gio2/{gsocketlistener.c → rbgiosocketlistener.c} +49 -47
- data/ext/gio2/rbgiosocketservice.c +66 -0
- data/ext/gio2/rbgiosrvtarget.c +76 -0
- data/ext/gio2/rbgiotcpconnection.c +28 -0
- data/ext/gio2/rbgiothemedicon.c +83 -0
- data/ext/gio2/rbgiothreadedsocketservice.c +43 -0
- data/ext/gio2/rbgiounixconnection.c +71 -0
- data/ext/gio2/rbgiounixfdlist.c +115 -0
- data/ext/gio2/rbgiounixfdmessage.c +74 -0
- data/ext/gio2/rbgiounixinputstream.c +51 -0
- data/ext/gio2/rbgiounixmount.c +164 -0
- data/ext/gio2/rbgiounixmountmonitor.c +66 -0
- data/ext/gio2/rbgiounixmountpoint.c +136 -0
- data/ext/gio2/rbgiounixmountpoints.c +58 -0
- data/ext/gio2/rbgiounixmounts.c +58 -0
- data/ext/gio2/rbgiounixoutputstream.c +51 -0
- data/ext/gio2/rbgiounixsocketaddress.c +69 -0
- data/ext/gio2/rbgiovfs.c +84 -0
- data/ext/gio2/rbgiovolume.c +193 -0
- data/ext/gio2/rbgiovolumemonitor.c +77 -0
- data/ext/gio2/rbgiozlibcompressor.c +52 -0
- data/ext/gio2/rbgiozlibdecompressor.c +45 -0
- data/ext/gio2/util.c +57 -60
- data/lib/1.8/gio2.so +0 -0
- data/lib/1.9/gio2.so +0 -0
- data/lib/gio2/deprecated.rb +102 -0
- data/lib/gio2.rb +14 -12
- metadata +100 -88
- data/ChangeLog +0 -129
- data/ext/gio2/gapplaunchcontext.c +0 -79
- data/ext/gio2/gasyncresult.c +0 -39
- data/ext/gio2/gbufferedoutputstream.c +0 -48
- data/ext/gio2/gcancellable.c +0 -177
- data/ext/gio2/gcharsetconverter.c +0 -55
- data/ext/gio2/gcontenttype.c +0 -128
- data/ext/gio2/gconverterinputstream.c +0 -41
- data/ext/gio2/gconverteroutputstream.c +0 -41
- data/ext/gio2/gdesktopappinfo.c +0 -88
- data/ext/gio2/gemblem.c +0 -52
- data/ext/gio2/gemblemedicon.c +0 -63
- data/ext/gio2/gfileattribute.c +0 -111
- data/ext/gio2/gfileattributeinfo.c +0 -89
- data/ext/gio2/gfileattributeinfolist.c +0 -109
- data/ext/gio2/gfileattributematcher.c +0 -90
- data/ext/gio2/gfiledescriptorbased.c +0 -42
- data/ext/gio2/gfileicon.c +0 -39
- data/ext/gio2/gfilemonitor.c +0 -44
- data/ext/gio2/gfilenamecompleter.c +0 -72
- data/ext/gio2/gfilterinputstream.c +0 -27
- data/ext/gio2/gfilteroutputstream.c +0 -27
- data/ext/gio2/gicon.c +0 -67
- data/ext/gio2/ginetaddress.c +0 -116
- data/ext/gio2/ginetsocketaddress.c +0 -38
- data/ext/gio2/gioerror.c +0 -70
- data/ext/gio2/giomodule.c +0 -63
- data/ext/gio2/gioscheduler.c +0 -193
- data/ext/gio2/giostream.c +0 -106
- data/ext/gio2/gmemoryinputstream.c +0 -65
- data/ext/gio2/gmemoryoutputstream.c +0 -41
- data/ext/gio2/gmountoperation.c +0 -66
- data/ext/gio2/gnetworkaddress.c +0 -57
- data/ext/gio2/gnetworkservice.c +0 -43
- data/ext/gio2/gseekable.c +0 -89
- data/ext/gio2/gsimpleasyncresult.c +0 -153
- data/ext/gio2/gsocketaddress.c +0 -33
- data/ext/gio2/gsocketconnectable.c +0 -97
- data/ext/gio2/gsocketconnection.c +0 -75
- data/ext/gio2/gsocketcontrolmessage.c +0 -80
- data/ext/gio2/gsocketservice.c +0 -64
- data/ext/gio2/gsrvtarget.c +0 -77
- data/ext/gio2/gtcpconnection.c +0 -27
- data/ext/gio2/gthemedicon.c +0 -81
- data/ext/gio2/gthreadedsocketservice.c +0 -40
- data/ext/gio2/gunixconnection.c +0 -69
- data/ext/gio2/gunixfdlist.c +0 -112
- data/ext/gio2/gunixfdmessage.c +0 -72
- data/ext/gio2/gunixinputstream.c +0 -49
- data/ext/gio2/gunixmounts.c +0 -343
- data/ext/gio2/gunixoutputstream.c +0 -49
- data/ext/gio2/gunixsocketaddress.c +0 -67
- data/ext/gio2/gvfs.c +0 -82
- data/ext/gio2/gvolume.c +0 -191
- data/ext/gio2/gvolumemonitor.c +0 -75
- data/ext/gio2/gzlibcompressor.c +0 -50
- data/ext/gio2/gzlibdecompressor.c +0 -43
@@ -0,0 +1,114 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE mFileAttribute
|
25
|
+
|
26
|
+
void
|
27
|
+
Init_gfileattribute(VALUE mGio)
|
28
|
+
{
|
29
|
+
VALUE RG_TARGET_NAMESPACE;
|
30
|
+
|
31
|
+
RG_TARGET_NAMESPACE = rb_define_module_under(mGio, "FileAttribute");
|
32
|
+
|
33
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_TYPE", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_TYPE));
|
34
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_IS_HIDDEN", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN));
|
35
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_IS_BACKUP", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP));
|
36
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_IS_SYMLINK", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK));
|
37
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_IS_VIRTUAL", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL));
|
38
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_NAME", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_NAME));
|
39
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_DISPLAY_NAME", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME));
|
40
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_EDIT_NAME", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME));
|
41
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_COPY_NAME", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_COPY_NAME));
|
42
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_DESCRIPTION", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION));
|
43
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_ICON", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_ICON));
|
44
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_CONTENT_TYPE", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE));
|
45
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_FAST_CONTENT_TYPE", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE));
|
46
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_SIZE", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_SIZE));
|
47
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_ALLOCATED_SIZE", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE));
|
48
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_SYMLINK_TARGET", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET));
|
49
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_TARGET_URI", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_TARGET_URI));
|
50
|
+
rb_define_const(RG_TARGET_NAMESPACE, "STANDARD_SORT_ORDER", CSTR2RVAL(G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER));
|
51
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ETAG_VALUE", CSTR2RVAL(G_FILE_ATTRIBUTE_ETAG_VALUE));
|
52
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ID_FILE", CSTR2RVAL(G_FILE_ATTRIBUTE_ID_FILE));
|
53
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ID_FILESYSTEM", CSTR2RVAL(G_FILE_ATTRIBUTE_ID_FILESYSTEM));
|
54
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ACCESS_CAN_READ", CSTR2RVAL(G_FILE_ATTRIBUTE_ACCESS_CAN_READ));
|
55
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ACCESS_CAN_WRITE", CSTR2RVAL(G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE));
|
56
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ACCESS_CAN_EXECUTE", CSTR2RVAL(G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE));
|
57
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ACCESS_CAN_DELETE", CSTR2RVAL(G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE));
|
58
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ACCESS_CAN_TRASH", CSTR2RVAL(G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH));
|
59
|
+
rb_define_const(RG_TARGET_NAMESPACE, "ACCESS_CAN_RENAME", CSTR2RVAL(G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME));
|
60
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_MOUNT", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT));
|
61
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_UNMOUNT", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT));
|
62
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_EJECT", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT));
|
63
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_UNIX_DEVICE", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE));
|
64
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_UNIX_DEVICE_FILE", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE));
|
65
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_HAL_UDI", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI));
|
66
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_POLL", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL));
|
67
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC));
|
68
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_START", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START));
|
69
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_START_DEGRADED", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED));
|
70
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_CAN_STOP", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP));
|
71
|
+
rb_define_const(RG_TARGET_NAMESPACE, "MOUNTABLE_START_STOP_TYPE", CSTR2RVAL(G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE));
|
72
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_MODIFIED", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_MODIFIED));
|
73
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_MODIFIED_USEC", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC));
|
74
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_ACCESS", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_ACCESS));
|
75
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_ACCESS_USEC", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_ACCESS_USEC));
|
76
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_CHANGED", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_CHANGED));
|
77
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_CHANGED_USEC", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_CHANGED_USEC));
|
78
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_CREATED", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_CREATED));
|
79
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TIME_CREATED_USEC", CSTR2RVAL(G_FILE_ATTRIBUTE_TIME_CREATED_USEC));
|
80
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_DEVICE", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_DEVICE));
|
81
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_INODE", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_INODE));
|
82
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_MODE", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_MODE));
|
83
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_NLINK", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_NLINK));
|
84
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_UID", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_UID));
|
85
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_GID", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_GID));
|
86
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_RDEV", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_RDEV));
|
87
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_BLOCK_SIZE", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE));
|
88
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_BLOCKS", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_BLOCKS));
|
89
|
+
rb_define_const(RG_TARGET_NAMESPACE, "UNIX_IS_MOUNTPOINT", CSTR2RVAL(G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT));
|
90
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DOS_IS_ARCHIVE", CSTR2RVAL(G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE));
|
91
|
+
rb_define_const(RG_TARGET_NAMESPACE, "DOS_IS_SYSTEM", CSTR2RVAL(G_FILE_ATTRIBUTE_DOS_IS_SYSTEM));
|
92
|
+
rb_define_const(RG_TARGET_NAMESPACE, "OWNER_USER", CSTR2RVAL(G_FILE_ATTRIBUTE_OWNER_USER));
|
93
|
+
rb_define_const(RG_TARGET_NAMESPACE, "OWNER_USER_REAL", CSTR2RVAL(G_FILE_ATTRIBUTE_OWNER_USER_REAL));
|
94
|
+
rb_define_const(RG_TARGET_NAMESPACE, "OWNER_GROUP", CSTR2RVAL(G_FILE_ATTRIBUTE_OWNER_GROUP));
|
95
|
+
rb_define_const(RG_TARGET_NAMESPACE, "THUMBNAIL_PATH", CSTR2RVAL(G_FILE_ATTRIBUTE_THUMBNAIL_PATH));
|
96
|
+
rb_define_const(RG_TARGET_NAMESPACE, "THUMBNAILING_FAILED", CSTR2RVAL(G_FILE_ATTRIBUTE_THUMBNAILING_FAILED));
|
97
|
+
rb_define_const(RG_TARGET_NAMESPACE, "PREVIEW_ICON", CSTR2RVAL(G_FILE_ATTRIBUTE_PREVIEW_ICON));
|
98
|
+
rb_define_const(RG_TARGET_NAMESPACE, "FILESYSTEM_SIZE", CSTR2RVAL(G_FILE_ATTRIBUTE_FILESYSTEM_SIZE));
|
99
|
+
rb_define_const(RG_TARGET_NAMESPACE, "FILESYSTEM_FREE", CSTR2RVAL(G_FILE_ATTRIBUTE_FILESYSTEM_FREE));
|
100
|
+
rb_define_const(RG_TARGET_NAMESPACE, "FILESYSTEM_TYPE", CSTR2RVAL(G_FILE_ATTRIBUTE_FILESYSTEM_TYPE));
|
101
|
+
rb_define_const(RG_TARGET_NAMESPACE, "FILESYSTEM_READONLY", CSTR2RVAL(G_FILE_ATTRIBUTE_FILESYSTEM_READONLY));
|
102
|
+
rb_define_const(RG_TARGET_NAMESPACE, "FILESYSTEM_USE_PREVIEW", CSTR2RVAL(G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW));
|
103
|
+
rb_define_const(RG_TARGET_NAMESPACE, "GVFS_BACKEND", CSTR2RVAL(G_FILE_ATTRIBUTE_GVFS_BACKEND));
|
104
|
+
rb_define_const(RG_TARGET_NAMESPACE, "SELINUX_CONTEXT", CSTR2RVAL(G_FILE_ATTRIBUTE_SELINUX_CONTEXT));
|
105
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TRASH_ITEM_COUNT", CSTR2RVAL(G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT));
|
106
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TRASH_DELETION_DATE", CSTR2RVAL(G_FILE_ATTRIBUTE_TRASH_DELETION_DATE));
|
107
|
+
rb_define_const(RG_TARGET_NAMESPACE, "TRASH_ORIG_PATH", CSTR2RVAL(G_FILE_ATTRIBUTE_TRASH_ORIG_PATH));
|
108
|
+
|
109
|
+
G_DEF_CLASS(G_TYPE_FILE_ATTRIBUTE_TYPE, "Type", RG_TARGET_NAMESPACE);
|
110
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_FILE_ATTRIBUTE_TYPE, "G_FILE_ATTRIBUTE_");
|
111
|
+
|
112
|
+
G_DEF_CLASS(G_TYPE_FILE_ATTRIBUTE_STATUS, "Status", RG_TARGET_NAMESPACE);
|
113
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_FILE_ATTRIBUTE_STATUS, "G_FILE_ATTRIBUTE_");
|
114
|
+
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cFileAttributeInfo
|
25
|
+
|
26
|
+
static GFileAttributeInfo *
|
27
|
+
fileattributeinfo_copy(const GFileAttributeInfo *info)
|
28
|
+
{
|
29
|
+
return (GFileAttributeInfo *)info;
|
30
|
+
}
|
31
|
+
|
32
|
+
static void
|
33
|
+
fileattributeinfo_free(G_GNUC_UNUSED GFileAttributeInfo *info)
|
34
|
+
{
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
|
38
|
+
GType
|
39
|
+
g_file_attribute_info_get_type(void)
|
40
|
+
{
|
41
|
+
static GType our_type = 0;
|
42
|
+
|
43
|
+
if (our_type == 0)
|
44
|
+
our_type = g_boxed_type_register_static("GFileAttributeInfo",
|
45
|
+
(GBoxedCopyFunc)fileattributeinfo_copy,
|
46
|
+
(GBoxedFreeFunc)fileattributeinfo_free);
|
47
|
+
|
48
|
+
return our_type;
|
49
|
+
}
|
50
|
+
|
51
|
+
#define _SELF(value) RVAL2GFILEATTRIBUTEINFO(value)
|
52
|
+
|
53
|
+
static VALUE
|
54
|
+
rg_name(VALUE self)
|
55
|
+
{
|
56
|
+
return CSTR2RVAL(_SELF(self)->name);
|
57
|
+
}
|
58
|
+
|
59
|
+
static VALUE
|
60
|
+
rg_type(VALUE self)
|
61
|
+
{
|
62
|
+
return GFILEATTRIBUTETYPE2RVAL(_SELF(self)->type);
|
63
|
+
}
|
64
|
+
|
65
|
+
static VALUE
|
66
|
+
rg_flags(VALUE self)
|
67
|
+
{
|
68
|
+
return GFILEATTRIBUTEINFOFLAGS2RVAL(_SELF(self)->flags);
|
69
|
+
}
|
70
|
+
|
71
|
+
void
|
72
|
+
Init_gfileattributeinfo(VALUE mGio)
|
73
|
+
{
|
74
|
+
VALUE RG_TARGET_NAMESPACE;
|
75
|
+
|
76
|
+
RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FILE_ATTRIBUTE_INFO, "FileAttributeInfo", mGio);
|
77
|
+
|
78
|
+
G_DEF_CLASS(G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS, "Flags", RG_TARGET_NAMESPACE);
|
79
|
+
G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS, "G_FILE_ATTRIBUTE_INFO_");
|
80
|
+
|
81
|
+
rbgobj_boxed_not_copy_obj(G_TYPE_FILE_ATTRIBUTE_INFO);
|
82
|
+
|
83
|
+
RG_DEF_METHOD(name, 0);
|
84
|
+
RG_DEF_METHOD(type, 0);
|
85
|
+
RG_DEF_METHOD(flags, 0);
|
86
|
+
}
|
@@ -0,0 +1,106 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cFileAttributeInfoList
|
25
|
+
|
26
|
+
#define RVAL2GFILEATTRIBUTEINFOFLAGSDEFAULT(value) \
|
27
|
+
RVAL2TYPE_WITH_DEFAULT((value), \
|
28
|
+
RVAL2GFILEATTRIBUTEINFOFLAGS, \
|
29
|
+
G_FILE_ATTRIBUTE_INFO_NONE)
|
30
|
+
|
31
|
+
GType
|
32
|
+
g_file_attribute_info_list_get_type(void)
|
33
|
+
{
|
34
|
+
static GType our_type = 0;
|
35
|
+
if (our_type == 0)
|
36
|
+
our_type = g_boxed_type_register_static("GFileAttributeInfoList",
|
37
|
+
(GBoxedCopyFunc)g_file_attribute_info_list_ref,
|
38
|
+
(GBoxedFreeFunc)g_file_attribute_info_list_unref);
|
39
|
+
return our_type;
|
40
|
+
}
|
41
|
+
|
42
|
+
#define _SELF(value) RVAL2GFILEATTRIBUTEINFOLIST(value)
|
43
|
+
|
44
|
+
static VALUE
|
45
|
+
rg_initialize(VALUE self)
|
46
|
+
{
|
47
|
+
G_INITIALIZE(self, g_file_attribute_info_list_new());
|
48
|
+
|
49
|
+
return Qnil;
|
50
|
+
}
|
51
|
+
|
52
|
+
static VALUE
|
53
|
+
rg_dup(VALUE self)
|
54
|
+
{
|
55
|
+
return GFILEATTRIBUTEINFOLIST2RVAL(g_file_attribute_info_list_dup(_SELF(self)));
|
56
|
+
}
|
57
|
+
|
58
|
+
static VALUE
|
59
|
+
rg_lookup(VALUE self, VALUE name)
|
60
|
+
{
|
61
|
+
/* TODO: How do we deal with the const? */
|
62
|
+
return GFILEATTRIBUTEINFO2RVAL((GFileAttributeInfo *)g_file_attribute_info_list_lookup(_SELF(self),
|
63
|
+
RVAL2CSTR(name)));
|
64
|
+
}
|
65
|
+
|
66
|
+
static VALUE
|
67
|
+
rg_add(int argc, VALUE *argv, VALUE self)
|
68
|
+
{
|
69
|
+
VALUE name, type, flags;
|
70
|
+
|
71
|
+
rb_scan_args(argc, argv, "21", &name, &type, &flags);
|
72
|
+
|
73
|
+
g_file_attribute_info_list_add(_SELF(self),
|
74
|
+
RVAL2CSTR(name),
|
75
|
+
RVAL2GFILEATTRIBUTETYPE(type),
|
76
|
+
RVAL2GFILEATTRIBUTEINFOFLAGSDEFAULT(flags));
|
77
|
+
|
78
|
+
return self;
|
79
|
+
}
|
80
|
+
|
81
|
+
static VALUE
|
82
|
+
rg_each(VALUE self)
|
83
|
+
{
|
84
|
+
GFileAttributeInfoList *list = RVAL2GFILEATTRIBUTEINFOLIST(self);
|
85
|
+
int i;
|
86
|
+
|
87
|
+
for (i = 0; i < list->n_infos; i++)
|
88
|
+
rb_yield(GFILEATTRIBUTEINFO2RVAL(&list->infos[i]));
|
89
|
+
|
90
|
+
return self;
|
91
|
+
}
|
92
|
+
|
93
|
+
void
|
94
|
+
Init_fileattributeinfolist(VALUE mGio)
|
95
|
+
{
|
96
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FILE_ATTRIBUTE_INFO_LIST, "FileAttributeInfoList", mGio);
|
97
|
+
|
98
|
+
rb_include_module(RG_TARGET_NAMESPACE, rb_mEnumerable);
|
99
|
+
|
100
|
+
RG_DEF_METHOD(initialize, 0);
|
101
|
+
RG_DEF_METHOD(dup, 0);
|
102
|
+
RG_DEF_METHOD(lookup, 1);
|
103
|
+
RG_DEF_ALIAS("[]", "lookup");
|
104
|
+
RG_DEF_METHOD(add, 3);
|
105
|
+
RG_DEF_METHOD(each, 0);
|
106
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cFileAttributeMatcher
|
25
|
+
|
26
|
+
GType
|
27
|
+
g_file_attribute_matcher_get_type(void)
|
28
|
+
{
|
29
|
+
static GType our_type = 0;
|
30
|
+
if (our_type == 0)
|
31
|
+
our_type = g_boxed_type_register_static("GFileAttributeMatcher",
|
32
|
+
(GBoxedCopyFunc)g_file_attribute_matcher_ref,
|
33
|
+
(GBoxedFreeFunc)g_file_attribute_matcher_unref);
|
34
|
+
return our_type;
|
35
|
+
}
|
36
|
+
|
37
|
+
#define _SELF(value) RVAL2GFILEATTRIBUTEMATCHER(value)
|
38
|
+
|
39
|
+
static VALUE
|
40
|
+
rg_initialize(VALUE self, VALUE attributes)
|
41
|
+
{
|
42
|
+
G_INITIALIZE(self, g_file_attribute_matcher_new(RVAL2CSTR(attributes)));
|
43
|
+
|
44
|
+
return Qnil;
|
45
|
+
}
|
46
|
+
|
47
|
+
static VALUE
|
48
|
+
rg_matches_p(VALUE self, VALUE attribute)
|
49
|
+
{
|
50
|
+
return CBOOL2RVAL(g_file_attribute_matcher_matches(_SELF(self), RVAL2CSTR(attribute)));
|
51
|
+
}
|
52
|
+
|
53
|
+
static VALUE
|
54
|
+
rg_matches_only_p(VALUE self, VALUE attribute)
|
55
|
+
{
|
56
|
+
return CBOOL2RVAL(g_file_attribute_matcher_matches_only(_SELF(self), RVAL2CSTR(attribute)));
|
57
|
+
}
|
58
|
+
|
59
|
+
static VALUE
|
60
|
+
rg_enumerate_namespace(VALUE self, VALUE ns)
|
61
|
+
{
|
62
|
+
const char *match;
|
63
|
+
gboolean matches_all = g_file_attribute_matcher_enumerate_namespace(_SELF(self),
|
64
|
+
RVAL2CSTR(ns));
|
65
|
+
if (!rb_block_given_p())
|
66
|
+
return CBOOL2RVAL(matches_all);
|
67
|
+
|
68
|
+
while ((match = g_file_attribute_matcher_enumerate_next(_SELF(self))) != NULL)
|
69
|
+
rb_yield(CSTR2RVAL(match));
|
70
|
+
|
71
|
+
return self;
|
72
|
+
}
|
73
|
+
|
74
|
+
static VALUE
|
75
|
+
rg_enumerate_next(VALUE self)
|
76
|
+
{
|
77
|
+
return CSTR2RVAL(g_file_attribute_matcher_enumerate_next(_SELF(self)));
|
78
|
+
}
|
79
|
+
|
80
|
+
void
|
81
|
+
Init_gfileattributematcher(VALUE mGio)
|
82
|
+
{
|
83
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FILE_ATTRIBUTE_MATCHER, "FileAttributeMatcher", mGio);
|
84
|
+
|
85
|
+
RG_DEF_METHOD(initialize, 1);
|
86
|
+
RG_DEF_METHOD_P(matches, 1);
|
87
|
+
/* TODO: Is this confusing when we have both #matches and
|
88
|
+
* #matches_only? What does #=~ call? */
|
89
|
+
RG_DEF_ALIAS("=~", "matches?");
|
90
|
+
RG_DEF_METHOD_P(matches_only, 1);
|
91
|
+
RG_DEF_METHOD(enumerate_namespace, 1);
|
92
|
+
RG_DEF_METHOD(enumerate_next, 0);
|
93
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#ifdef HAVE_GIO_UNIX
|
25
|
+
#include <gio/gfiledescriptorbased.h>
|
26
|
+
|
27
|
+
#define RG_TARGET_NAMESPACE mFileDescriptorBased
|
28
|
+
#define _SELF(value) RVAL2GFILEDESCRIPTORBASED(value)
|
29
|
+
|
30
|
+
static VALUE
|
31
|
+
rg_fd(VALUE self)
|
32
|
+
{
|
33
|
+
return FD2RVAL(g_file_descriptor_based_get_fd(_SELF(self)));
|
34
|
+
}
|
35
|
+
#endif
|
36
|
+
|
37
|
+
void
|
38
|
+
Init_gfiledescriptorbased(G_GNUC_UNUSED VALUE mGio)
|
39
|
+
{
|
40
|
+
#ifdef HAVE_GIO_UNIX
|
41
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(G_TYPE_FILE_DESCRIPTOR_BASED, "FileDescriptorBased", mGio);
|
42
|
+
|
43
|
+
RG_DEF_METHOD(fd, 0);
|
44
|
+
#endif
|
45
|
+
}
|
@@ -1,29 +1,31 @@
|
|
1
|
-
/* -*- c-file-style: "ruby" -*- */
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
2
|
/*
|
3
|
-
*
|
4
|
-
*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
5
|
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
10
|
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
15
|
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
19
20
|
*/
|
20
21
|
|
21
|
-
#include "
|
22
|
+
#include "rbgio2private.h"
|
22
23
|
|
23
|
-
#define
|
24
|
+
#define RG_TARGET_NAMESPACE cFileEnumerator
|
25
|
+
#define _SELF(value) RVAL2GFILEENUMERATOR(value)
|
24
26
|
|
25
27
|
static VALUE
|
26
|
-
|
28
|
+
rg_next_file(int argc, VALUE *argv, VALUE self)
|
27
29
|
{
|
28
30
|
VALUE cancellable;
|
29
31
|
GError *error = NULL;
|
@@ -40,7 +42,7 @@ fileenumerator_next_file(int argc, VALUE *argv, VALUE self)
|
|
40
42
|
}
|
41
43
|
|
42
44
|
static VALUE
|
43
|
-
|
45
|
+
rg_close(int argc, VALUE *argv, VALUE self)
|
44
46
|
{
|
45
47
|
VALUE cancellable;
|
46
48
|
GError *error = NULL;
|
@@ -53,7 +55,7 @@ fileenumerator_close(int argc, VALUE *argv, VALUE self)
|
|
53
55
|
}
|
54
56
|
|
55
57
|
static VALUE
|
56
|
-
|
58
|
+
rg_next_files_async(int argc, VALUE *argv, VALUE self)
|
57
59
|
{
|
58
60
|
VALUE rbnum_files, rbio_priority, rbcancellable, block;
|
59
61
|
int num_files;
|
@@ -76,7 +78,7 @@ fileenumerator_next_files_async(int argc, VALUE *argv, VALUE self)
|
|
76
78
|
}
|
77
79
|
|
78
80
|
static VALUE
|
79
|
-
|
81
|
+
rg_next_files_finish(VALUE self, VALUE result)
|
80
82
|
{
|
81
83
|
GError *error = NULL;
|
82
84
|
GList *files = g_file_enumerator_next_files_finish(_SELF(self),
|
@@ -89,7 +91,7 @@ fileenumerator_next_files_finish(VALUE self, VALUE result)
|
|
89
91
|
}
|
90
92
|
|
91
93
|
static VALUE
|
92
|
-
|
94
|
+
rg_close_async(int argc, VALUE *argv, VALUE self)
|
93
95
|
{
|
94
96
|
VALUE rbio_priority, rbcancellable, block;
|
95
97
|
int io_priority;
|
@@ -109,7 +111,7 @@ fileenumerator_close_async(int argc, VALUE *argv, VALUE self)
|
|
109
111
|
}
|
110
112
|
|
111
113
|
static VALUE
|
112
|
-
|
114
|
+
rg_close_finish(VALUE self, VALUE result)
|
113
115
|
{
|
114
116
|
GError *error = NULL;
|
115
117
|
if (!g_file_enumerator_close_finish(_SELF(self),
|
@@ -121,19 +123,19 @@ fileenumerator_close_finish(VALUE self, VALUE result)
|
|
121
123
|
}
|
122
124
|
|
123
125
|
static VALUE
|
124
|
-
|
126
|
+
rg_closed_p(VALUE self)
|
125
127
|
{
|
126
128
|
return CBOOL2RVAL(g_file_enumerator_is_closed(_SELF(self)));
|
127
129
|
}
|
128
130
|
|
129
131
|
static VALUE
|
130
|
-
|
132
|
+
rg_has_pending_p(VALUE self)
|
131
133
|
{
|
132
134
|
return CBOOL2RVAL(g_file_enumerator_has_pending(_SELF(self)));
|
133
135
|
}
|
134
136
|
|
135
137
|
static VALUE
|
136
|
-
|
138
|
+
rg_set_pending(VALUE self, VALUE pending)
|
137
139
|
{
|
138
140
|
g_file_enumerator_set_pending(_SELF(self), RVAL2CBOOL(pending));
|
139
141
|
|
@@ -141,25 +143,25 @@ fileenumerator_set_pending(VALUE self, VALUE pending)
|
|
141
143
|
}
|
142
144
|
|
143
145
|
static VALUE
|
144
|
-
|
146
|
+
rg_container(VALUE self)
|
145
147
|
{
|
146
148
|
return GOBJ2RVAL(g_file_enumerator_get_container(_SELF(self)));
|
147
149
|
}
|
148
150
|
|
149
151
|
void
|
150
|
-
Init_gfileenumerator(VALUE
|
152
|
+
Init_gfileenumerator(VALUE mGio)
|
151
153
|
{
|
152
|
-
VALUE
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
G_DEF_SETTER(
|
164
|
-
|
154
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FILE_ENUMERATOR, "FileEnumerator", mGio);
|
155
|
+
|
156
|
+
RG_DEF_METHOD(next_file, -1);
|
157
|
+
RG_DEF_METHOD(close, -1);
|
158
|
+
RG_DEF_METHOD(next_files_async, -1);
|
159
|
+
RG_DEF_METHOD(next_files_finish, 1);
|
160
|
+
RG_DEF_METHOD(close_async, -1);
|
161
|
+
RG_DEF_METHOD(close_finish, 1);
|
162
|
+
RG_DEF_METHOD_P(closed, 0);
|
163
|
+
RG_DEF_METHOD_P(has_pending, 0);
|
164
|
+
RG_DEF_METHOD(set_pending, 1);
|
165
|
+
G_DEF_SETTER(RG_TARGET_NAMESPACE, "pending");
|
166
|
+
RG_DEF_METHOD(container, 0);
|
165
167
|
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
+
* Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2.1 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library; if not, write to the Free Software
|
18
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19
|
+
* MA 02110-1301 USA
|
20
|
+
*/
|
21
|
+
|
22
|
+
#include "rbgio2private.h"
|
23
|
+
|
24
|
+
#define RG_TARGET_NAMESPACE cFileIcon
|
25
|
+
#define _SELF(value) RVAL2GFILEICON(value)
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
rg_initialize(VALUE self, VALUE file)
|
29
|
+
{
|
30
|
+
G_INITIALIZE(self, g_file_icon_new(RVAL2GFILE(file)));
|
31
|
+
|
32
|
+
return Qnil;
|
33
|
+
}
|
34
|
+
|
35
|
+
void
|
36
|
+
Init_gfileicon(VALUE mGio)
|
37
|
+
{
|
38
|
+
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_FILE_ICON, "FileIcon", mGio);
|
39
|
+
|
40
|
+
RG_DEF_METHOD(initialize, 1);
|
41
|
+
}
|