PageRenderTime 78ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/glibmm-2.33.3/tools/m4/convert_gio.m4

#
m4 | 270 lines | 163 code | 55 blank | 52 comment | 0 complexity | a45766362766405b6f77d49cc291bb69 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. _CONV_ENUM(G,AppInfoCreateFlags)
  2. _CONV_ENUM(G,ApplicationFlags)
  3. _CONV_ENUM(G,AskPasswordFlags)
  4. _CONV_ENUM(G,BusType)
  5. _CONV_ENUM(G,CredentialsType)
  6. _CONV_ENUM(G,DataStreamByteOrder)
  7. _CONV_ENUM(G,DataStreamNewlineType)
  8. _CONV_ENUM(GDBus,CapabilityFlags)
  9. _CONV_ENUM(GDBus,MessageFlags)
  10. _CONV_ENUM(GDBus,MessageHeaderField)
  11. _CONV_ENUM(GDBus,MessageType)
  12. _CONV_ENUM(GDBus,ProxyFlags)
  13. _CONV_ENUM(GDBus,SendMessageFlags)
  14. _CONV_ENUM(GDBus,ServerFlags)
  15. _CONV_ENUM(G,DriveStartFlags)
  16. _CONV_ENUM(G,DriveStartFlags)
  17. _CONV_ENUM(G,DriveStartStopType)
  18. _CONV_ENUM(G,EmblemOrigin)
  19. _CONV_ENUM(G,FileAttributeInfoFlags)
  20. _CONV_ENUM(G,FileAttributeType)
  21. _CONV_ENUM(G,FileCopyFlags)
  22. _CONV_ENUM(G,FileCreateFlags)
  23. _CONV_ENUM(G,FileMonitorEvent)
  24. _CONV_ENUM(G,FileMonitorFlags)
  25. _CONV_ENUM(G,FileQueryInfoFlags)
  26. _CONV_ENUM(G,FileType)
  27. _CONV_ENUM(G,MountMountFlags)
  28. _CONV_ENUM(G,MountOperationResult)
  29. _CONV_ENUM(G,MountUnmountFlags)
  30. _CONV_ENUM(G,OutputStreamSpliceFlags)
  31. _CONV_ENUM(G,PasswordSave)
  32. _CONV_ENUM(G,SettingsBindFlags)
  33. _CONV_ENUM(G,SocketFamily)
  34. _CONV_ENUM(G,SocketMsgFlags)
  35. _CONV_ENUM(G,SocketProtocol)
  36. _CONV_ENUM(G,SocketType)
  37. _CONV_ENUM(G,UnixSocketAddressType)
  38. # Action
  39. _CONVERSION(`GAction*',`Glib::RefPtr<Action>',`Glib::wrap($3)')
  40. _CONVERSION(`const Glib::RefPtr<Action>&',`GAction*',__CONVERT_REFPTR_TO_P)
  41. # ActionGroup
  42. _CONVERSION(`const Glib::RefPtr<ActionGroup>&',`GActionGroup*',__CONVERT_REFPTR_TO_P)
  43. # AppInfo
  44. _CONVERSION(`GAppInfo*',`Glib::RefPtr<AppInfo>',`Glib::wrap($3)')
  45. _CONVERSION(`const Glib::RefPtr<AppLaunchContext>&',`GAppLaunchContext*',__CONVERT_REFPTR_TO_P)
  46. _CONVERSION(`GAppLaunchContext*',`const Glib::RefPtr<AppLaunchContext>&',Glib::wrap($3))
  47. _CONVERSION(`const Glib::RefPtr<AppInfo>&',`GAppInfo*',__CONVERT_REFPTR_TO_P)
  48. _CONVERSION(`Glib::RefPtr<AppInfo>',`GAppInfo*',__CONVERT_REFPTR_TO_P)
  49. _CONVERSION(`GAppInfo*',`const Glib::RefPtr<AppInfo>&',`Glib::wrap($3)')
  50. _CONVERSION(`const Glib::ListHandle< Glib::RefPtr<Gio::File> >&',`GList*',`$3.data()')
  51. # Application
  52. _CONVERSION(`GApplication*',`Glib::RefPtr<Application>',`Glib::wrap($3)')
  53. _CONVERSION(`const Glib::RefPtr<Application>&',`GApplication*',__CONVERT_CONST_REFPTR_TO_P)
  54. # ApplicationCommandLine
  55. _CONVERSION(`const Glib::RefPtr<ApplicationCommandLine>&',`GApplicationCommandLine*',__CONVERT_CONST_REFPTR_TO_P)
  56. # AsyncResult
  57. _CONVERSION(`Glib::RefPtr<Glib::Object>',`GObject*',__CONVERT_REFPTR_TO_P)
  58. _CONVERSION(`const Glib::RefPtr<AsyncResult>&',`GAsyncResult*',__CONVERT_REFPTR_TO_P)
  59. _CONVERSION(`Glib::RefPtr<AsyncResult>&',`GAsyncResult*',__CONVERT_REFPTR_TO_P)
  60. # Cancellable
  61. _CONVERSION(`const Glib::RefPtr<Cancellable>&',`GCancellable*',__CONVERT_CONST_REFPTR_TO_P)
  62. _CONVERSION(`const Glib::RefPtr<Gio::Cancellable>&',`GCancellable*',__CONVERT_CONST_REFPTR_TO_P)
  63. _CONVERSION(`GCancellable*', `Glib::RefPtr<Cancellable>', `Glib::wrap($3)')
  64. _CONVERSION(`GCancellable*', `const Glib::RefPtr<Cancellable>&', `Glib::wrap($3)')
  65. # Credentials
  66. _CONVERSION(`const Glib::RefPtr<Credentials>&',`GCredentials*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gio::Credentials))
  67. _CONVERSION(`const Glib::RefPtr<const Credentials>&',`GCredentials*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gio::Credentials))
  68. _CONVERSION(`GCredentials*',`Glib::RefPtr<Credentials>',`Glib::wrap($3)')
  69. _CONVERSION(`GCredentials*',`Glib::RefPtr<const Credentials>',`Glib::wrap($3)')
  70. # DBusConnection
  71. _CONVERSION(`const Glib::RefPtr<Connection>&',`GDBusConnection*',__CONVERT_REFPTR_TO_P)
  72. _CONVERSION(`GDBusConnection*',`Glib::RefPtr<Connection>',Glib::wrap($3))
  73. _CONVERSION(`GDBusConnection*',`Glib::RefPtr<const Connection>',Glib::wrap($3))
  74. # DBusMessage
  75. _CONVERSION(`const Glib::RefPtr<Message>&',`GDBusMessage*',__CONVERT_REFPTR_TO_P)
  76. _CONVERSION(`GDBusMessage*',`Glib::RefPtr<Message>',`Glib::wrap($3)')
  77. _CONVERSION(`const Glib::RefPtr<const Message>&',`GDBusMessage*',__CONVERT_CONST_REFPTR_TO_P)
  78. # DBus*Info
  79. _CONVERSION(`GDBusMethodInfo*',`Glib::RefPtr<MethodInfo>',`Glib::wrap($3)')
  80. _CONVERSION(`GDBusSignalInfo*',`Glib::RefPtr<SignalInfo>',`Glib::wrap($3)')
  81. _CONVERSION(`GDBusPropertyInfo*',`Glib::RefPtr<PropertyInfo>',`Glib::wrap($3)')
  82. _CONVERSION(`GDBusNodeInfo*',`Glib::RefPtr<NodeInfo>',`Glib::wrap($3)')
  83. _CONVERSION(`GDBusInterfaceInfo*',`Glib::RefPtr<InterfaceInfo>',`Glib::wrap($3)')
  84. _CONVERSION(`const Glib::RefPtr<InterfaceInfo>&',`GDBusInterfaceInfo*',`Glib::unwrap($3)')
  85. _CONVERSION(`Glib::RefPtr<InterfaceInfo>',`GDBusInterfaceInfo*',`Glib::unwrap($3)')
  86. _CONVERSION(`GDBusInterfaceInfo*',`const Glib::RefPtr<InterfaceInfo>',`Glib::wrap($3)')
  87. # DBusInterface
  88. _CONVERSION(`GDBusInterface*',`Glib::RefPtr<Gio::DBus::Interface>',`Glib::wrap($3)')
  89. _CONVERSION(`Glib::RefPtr<Gio::DBus::Interface>',`GDBusInterface*',`Glib::unwrap($3)')
  90. _CONVERSION(`const Glib::RefPtr<Gio::DBus::Interface>&',`GDBusInterface*',`Glib::unwrap($3)')
  91. # DBusObject
  92. _CONVERSION(`GDBusObject*',`Glib::RefPtr<Gio::DBus::Object>',`Glib::wrap($3)')
  93. _CONVERSION(`const Glib::RefPtr<Gio::DBus::Object>&',`GDBusObject*',`Glib::unwrap($3)')
  94. _CONVERSION(`Glib::RefPtr<Gio::DBus::Object>',`GDBusObject*',`Glib::unwrap($3)')
  95. # DBusProxy
  96. _CONVERSION(`GDBusProxy*',`Glib::RefPtr<Proxy>',`Glib::wrap($3)')
  97. # DesktopAppInfo
  98. _CONVERSION(`GDesktopAppInfo*', `Glib::RefPtr<DesktopAppInfo>', `Glib::wrap($3)')
  99. # Drive
  100. _CONVERSION(`GDrive*',`Glib::RefPtr<Drive>',`Glib::wrap($3)')
  101. # File
  102. _CONVERSION(`return-char*',`std::string',`Glib::convert_return_gchar_ptr_to_stdstring($3)')
  103. _CONVERSION(`Glib::RefPtr<File>',`GFile*',__CONVERT_REFPTR_TO_P)
  104. _CONVERSION(`const Glib::RefPtr<File>&',`GFile*',__CONVERT_REFPTR_TO_P)
  105. _CONVERSION(`const Glib::RefPtr<const File>&',`GFile*',__CONVERT_CONST_REFPTR_TO_P_SUN(Gio::File))
  106. _CONVERSION(`GFile*',`Glib::RefPtr<File>',`Glib::wrap($3)')
  107. _CONVERSION(`GFile*',`Glib::RefPtr<const File>',`Glib::wrap($3)')
  108. # FileAttribute
  109. _CONVERSION(`GFileAttributeValue*',`FileAttributeValue',`Glib::wrap($3)')
  110. _CONVERSION(`const FileAttributeValue&',`const GFileAttributeValue*',`$3.gobj()')
  111. _CONVERSION(`GFileAttributeInfoList*',`Glib::RefPtr<FileAttributeInfoList>',`Glib::wrap($3)')
  112. #FileEnumerator
  113. _CONVERSION(`GFileEnumerator*',`Glib::RefPtr<FileEnumerator>',`Glib::wrap($3)')
  114. # FileInfo
  115. _CONVERSION(`GFileInfo*',`Glib::RefPtr<FileInfo>',`Glib::wrap($3)')
  116. _CONVERSION(`Glib::RefPtr<FileInfo>&',`GFileInfo*',__CONVERT_REFPTR_TO_P)
  117. _CONVERSION(`const Glib::RefPtr<FileInfo>&',`GFileInfo*',__CONVERT_REFPTR_TO_P)
  118. _CONVERSION(`Glib::TimeVal&', `GTimeVal*', static_cast<$2>(&$3))
  119. _CONVERSION(`const Glib::TimeVal&', `GTimeVal*', const_cast<GTimeVal*>(static_cast<const GTimeVal*>(&$3)))
  120. _CONVERSION(`const Glib::RefPtr<FileAttributeMatcher>&',`GFileAttributeMatcher*',__CONVERT_CONST_REFPTR_TO_P)
  121. # FileInputStream
  122. _CONVERSION(`GFileInputStream*',`Glib::RefPtr<FileInputStream>',`Glib::wrap($3)')
  123. # FileMonitor
  124. _CONVERSION(`GFileMonitor*',`Glib::RefPtr<FileMonitor>',`Glib::wrap($3)')
  125. # FileOutputStream
  126. _CONVERSION(`GFileOutputStream*',`Glib::RefPtr<FileOutputStream>',`Glib::wrap($3)')
  127. # FilterInputStream
  128. #_CONVERSION(`GFilterInputStream*',`Glib::RefPtr<FilterInputStream>',`Glib::wrap($3)')
  129. _CONVERSION(`GFileIOStream*',`Glib::RefPtr<FileIOStream>',`Glib::wrap($3)')
  130. # Icon
  131. _CONVERSION(`GIcon*',`Glib::RefPtr<Icon>',`Glib::wrap($3)')
  132. _CONVERSION(`const Glib::RefPtr<Icon>&',`GIcon*',__CONVERT_CONST_REFPTR_TO_P)
  133. _CONVERSION(`Glib::RefPtr<Icon>',`GIcon*',__CONVERT_REFPTR_TO_P)
  134. _CONVERSION(`Glib::RefPtr<const Icon>',`GIcon*',__CONVERT_CONST_REFPTR_TO_P)
  135. # Emblem
  136. _CONVERSION(`const Glib::RefPtr<Emblem>&',`GEmblem*',__CONVERT_CONST_REFPTR_TO_P)
  137. # IOStream
  138. _CONVERSION(`GIOStream*',`Glib::RefPtr<Gio::IOStream>',`Glib::wrap($3)')
  139. _CONVERSION(`GIOStream*',`Glib::RefPtr<IOStream>',`Glib::wrap($3)')
  140. _CONVERSION(`GIOStream*',`Glib::RefPtr<const Gio::IOStream>',`Glib::wrap($3)')
  141. _CONVERSION(`GIOStream*',`Glib::RefPtr<const IOStream>',`Glib::wrap($3)')
  142. _CONVERSION(`const Glib::RefPtr<IOStream>&',`GIOStream*',`Glib::unwrap($3)')
  143. _CONVERSION(`const Glib::RefPtr<const IOStream>&',`GIOStream*',`const_cast<GIOStream*>(Glib::unwrap($3))')
  144. # InetAddress
  145. _CONVERSION(`const Glib::RefPtr<InetAddress>&',`GInetAddress*',__CONVERT_CONST_REFPTR_TO_P)
  146. _CONVERSION(`const Glib::RefPtr<const InetAddress>&',`GInetAddress*',`const_cast<GInetAddress*>(Glib::unwrap($3))')
  147. _CONVERSION(`GInetAddress*',`Glib::RefPtr<InetAddress>',`Glib::wrap($3)')
  148. # InputStream
  149. _CONVERSION(`const Glib::RefPtr<InputStream>&',`GInputStream*',__CONVERT_CONST_REFPTR_TO_P)
  150. _CONVERSION(`const Glib::RefPtr<Gio::InputStream>&',`GInputStream*',__CONVERT_CONST_REFPTR_TO_P)
  151. _CONVERSION(`GInputStream*',`Glib::RefPtr<InputStream>',`Glib::wrap($3)')
  152. # MenuAttributeIter
  153. _CONVERSION(`GMenuAttributeIter*',`Glib::RefPtr<MenuAttributeIter>',`Glib::wrap($3)')
  154. # MenuLinkIter
  155. _CONVERSION(`GMenuLinkIter*',`Glib::RefPtr<MenuLinkIter>',`Glib::wrap($3)')
  156. # MenuModel
  157. _CONVERSION(`GMenuModel*',`Glib::RefPtr<MenuModel>',`Glib::wrap($3)')
  158. _CONVERSION(`const Glib::RefPtr<MenuModel>&',`GMenuModel*',__CONVERT_CONST_REFPTR_TO_P)
  159. # MenuItem
  160. _CONVERSION(`GMenuItem*',`Glib::RefPtr<MenuItem>',`Glib::wrap($3)')
  161. _CONVERSION(`const Glib::RefPtr<MenuItem>&',`GMenuItem*',__CONVERT_CONST_REFPTR_TO_P)
  162. # Mount
  163. _CONVERSION(`GMount*',`Glib::RefPtr<Mount>',`Glib::wrap($3)')
  164. _CONVERSION(`const Glib::RefPtr<Mount>&',`GMount*',__CONVERT_CONST_REFPTR_TO_P)
  165. # MountOptions
  166. _CONVERSION(`GPasswordSave',`PasswordSave',`($2)$3')
  167. _CONVERSION(`PasswordSave',`GPasswordSave',`($2)$3')
  168. #MountOperation
  169. #_CONVERSION(`GAskPasswordFlags',`AskPasswordFlags',`($2)$3')
  170. # OutputStream
  171. _CONVERSION(`GOutputStream*',`Glib::RefPtr<OutputStream>',`Glib::wrap($3)')
  172. _CONVERSION(`const Glib::RefPtr<OutputStream>&',`GOutputStream*',__CONVERT_CONST_REFPTR_TO_P)
  173. _CONVERSION(`GProxyResolver*',`Glib::RefPtr<ProxyResolver>',`Glib::wrap($3)')
  174. _CONVERSION(`GProxy*',`Glib::RefPtr<Proxy>',`Glib::wrap($3)')
  175. _CONVERSION(`const Glib::RefPtr<const ProxyAddress>&',`GProxyAddress*',__CONVERT_CONST_REFPTR_TO_P)
  176. #Settings
  177. _CONVERSION(`GSettings*',`Glib::RefPtr<Settings>',`Glib::wrap($3)')
  178. _CONVERSION(`const Glib::StringArrayHandle&',`const gchar*-const*',`($3).data()')
  179. _CONVERSION(`const Glib::RefPtr<SettingsBackend>&',`GSettingsBackend*',__CONVERT_REFPTR_TO_P)
  180. #Socket
  181. _CONVERSION(`const Glib::RefPtr<Socket>&',`GSocket*',__CONVERT_CONST_REFPTR_TO_P)
  182. _CONVERSION(`GSocket*',`Glib::RefPtr<Socket>',`Glib::wrap($3)')
  183. #SocketAddress
  184. _CONVERSION(`GSocketAddress*',`Glib::RefPtr<SocketAddress>',`Glib::wrap($3)')
  185. _CONVERSION(`const Glib::RefPtr<SocketAddress>&',`GSocketAddress*',__CONVERT_CONST_REFPTR_TO_P)
  186. _CONVERSION(`Glib::RefPtr<SocketAddress>&',`GSocketAddress*',__CONVERT_CONST_REFPTR_TO_P)
  187. _CONVERSION(`GSocketAddressEnumerator*',`Glib::RefPtr<SocketAddressEnumerator>',`Glib::wrap($3)')
  188. #SocketConnectable
  189. _CONVERSION(`const Glib::RefPtr<SocketConnectable>&',`GSocketConnectable*',__CONVERT_CONST_REFPTR_TO_P)
  190. #SocketConnection
  191. _CONVERSION(`GSocketConnection*',`Glib::RefPtr<SocketConnection>',`Glib::wrap($3)')
  192. _CONVERSION(`const Glib::RefPtr<SocketConnection>&',`GSocketConnection*',__CONVERT_CONST_REFPTR_TO_P)
  193. #SocketControlMessage
  194. _CONVERSION(`GSocketControlMessage*',`Glib::RefPtr<SocketControlMessage>',`Glib::wrap($3)')
  195. #TimeZoneMonitor
  196. _CONVERSION(`GTimeZoneMonitor*',`Glib::RefPtr<TimeZoneMonitor>',`Glib::wrap($3)')
  197. #UnixFDList
  198. _CONVERSION(`GUnixFDList*',`Glib::RefPtr<UnixFDList>',`Glib::wrap($3)')
  199. _CONVERSION(`const Glib::RefPtr<UnixFDList>&',`GUnixFDList*',`Glib::unwrap($3)')
  200. #Variant
  201. _CONVERSION(`GVariant*',`Glib::VariantBase',`Glib::wrap($3, false)')
  202. _CONVERSION(`GVariant*',`Glib::VariantContainerBase',`Glib::VariantContainerBase($3, false)')
  203. _CONVERSION(`const Glib::VariantBase&',`GVariant*',`const_cast<GVariant*>(($3).gobj())')
  204. _CONVERSION(`const Glib::VariantContainerBase&',`GVariant*',`const_cast<GVariant*>(($3).gobj())')
  205. #VariantType
  206. _CONVERSION(`const GVariantType*',`Glib::VariantType',`Glib::wrap(const_cast<GVariantType*>($3), false)')
  207. #Volume
  208. _CONVERSION(`GVolume*',`Glib::RefPtr<Volume>',`Glib::wrap($3)')
  209. # VolumeMonitor
  210. _CONVERSION(`GVolumeMonitor*',`Glib::RefPtr<VolumeMonitor>',`Glib::wrap($3)')
  211. _CONVERSION(`const Glib::RefPtr<Drive>&',`GDrive*',__CONVERT_CONST_REFPTR_TO_P)
  212. _CONVERSION(`const Glib::RefPtr<Mount>&',`GMount*',__CONVERT_CONST_REFPTR_TO_P)
  213. _CONVERSION(`const Glib::RefPtr<Volume>&',`GVolume*',__CONVERT_CONST_REFPTR_TO_P)
  214. #Vfs
  215. _CONVERSION(`GVfs*', `Glib::RefPtr<Vfs>', `Glib::wrap($3)')