<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Ryan,</div><div class=""><br class=""></div><div class="">Apologies, I should have been more clear. In Xcode you can alt(?)-click on a type (e.g the 'MyType' in "let a : MyType = 123") in the IDE to pop up a little window that shows you the definition, including the type and some other information. If you're on a Linux box or not using an IDE you probably don't have that option.</div><div class=""><br class=""></div><div class="">The only methods I see exposed on the Swift imported type are initializers taking a integer raw value, and a 'rawValue' property for getting back out the raw value. Hope that helps.</div><div class=""><br class=""></div><div class="">Austin</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 10, 2016, at 1:18 PM, Ryan Lovelett &lt;<a href="mailto:swift-dev@ryan.lovelett.me" class="">swift-dev@ryan.lovelett.me</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">


<title class=""></title>

<div class=""><div class="">Austin,<br class=""></div>
<div class="">&nbsp;</div>
<div class="">I guess I should say that the `typedef` is coming from a <a href="http://lxr.free-electrons.com/source/include/linux/dvb/frontend.h?v=3.2" class="">Linux kernel header</a>. So I don't think I'm going to be able to add any macros to the definition.<br class=""></div>
<div class="">&nbsp;</div>
<div class="">What do you mean about alt-click? Alt click where?<br class=""></div>
<div class="">&nbsp;</div>
<div class="">On Sun, Jan 10, 2016, at 04:12 PM, Austin Zheng wrote:<br class=""></div>
<blockquote type="cite" class=""><div class="">fe_type is being imported as a struct (alt-click 'fe_type' in Swift). I think if you want it to be imported as an enum you need to use the NS_ENUM macro in the definition, which might not be possible in your case.<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div class="">Austin<br class=""></div>
<div class=""><div class="">&nbsp;</div>
<div class=""><blockquote type="cite" class=""><div class="">On Jan 10, 2016, at 1:06 PM, Ryan Lovelett via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:<br class=""></div>
<div class="">&nbsp;</div>
<div class=""><div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">typedef enum fe_type {</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">&nbsp;FE_QPSK,</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">&nbsp;FE_QAM,</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">&nbsp;FE_OFDM,</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">&nbsp;FE_ATSC</span></span><br class=""></div>
<div class=""><span class="font" style="font-family:Helvetica"><span class="size" style="font-size:12px">} fe_type_t;</span></span><br class=""></div>
</div>
</blockquote></div>
</div>
</div>
</blockquote><div class="">&nbsp;</div>
</div>

</div></blockquote></div><br class=""></body></html>