GdkPixbuf-2.0.gir 181 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831
  1. <?xml version="1.0"?>
  2. <!-- This file was automatically generated from C sources - DO NOT EDIT!
  3. To affect the contents of this file, edit the original C definitions,
  4. and/or use gtk-doc annotations. -->
  5. <repository version="1.2"
  6. xmlns="http://www.gtk.org/introspection/core/1.0"
  7. xmlns:c="http://www.gtk.org/introspection/c/1.0"
  8. xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  9. <include name="GModule" version="2.0"/>
  10. <include name="Gio" version="2.0"/>
  11. <package name="gdk-pixbuf-2.0"/>
  12. <c:include name="gdk-pixbuf/gdk-pixbuf.h"/>
  13. <namespace name="GdkPixbuf"
  14. version="2.0"
  15. shared-library="libgdk_pixbuf-2.0.so.0"
  16. c:identifier-prefixes="Gdk"
  17. c:symbol-prefixes="gdk">
  18. <enumeration name="Colorspace"
  19. glib:type-name="GdkColorspace"
  20. glib:get-type="gdk_colorspace_get_type"
  21. c:type="GdkColorspace">
  22. <doc xml:space="preserve">This enumeration defines the color spaces that are supported by
  23. the gdk-pixbuf library. Currently only RGB is supported.</doc>
  24. <member name="rgb"
  25. value="0"
  26. c:identifier="GDK_COLORSPACE_RGB"
  27. glib:nick="rgb">
  28. <doc xml:space="preserve">Indicates a red/green/blue additive color space.</doc>
  29. </member>
  30. </enumeration>
  31. <enumeration name="InterpType"
  32. glib:type-name="GdkInterpType"
  33. glib:get-type="gdk_interp_type_get_type"
  34. c:type="GdkInterpType">
  35. <doc xml:space="preserve">This enumeration describes the different interpolation modes that
  36. can be used with the scaling functions. @GDK_INTERP_NEAREST is
  37. the fastest scaling method, but has horrible quality when
  38. scaling down. @GDK_INTERP_BILINEAR is the best choice if you
  39. aren't sure what to choose, it has a good speed/quality balance.
  40. &lt;note&gt;
  41. Cubic filtering is missing from the list; hyperbolic
  42. interpolation is just as fast and results in higher quality.
  43. &lt;/note&gt;</doc>
  44. <member name="nearest"
  45. value="0"
  46. c:identifier="GDK_INTERP_NEAREST"
  47. glib:nick="nearest">
  48. <doc xml:space="preserve">Nearest neighbor sampling; this is the fastest
  49. and lowest quality mode. Quality is normally unacceptable when scaling
  50. down, but may be OK when scaling up.</doc>
  51. </member>
  52. <member name="tiles"
  53. value="1"
  54. c:identifier="GDK_INTERP_TILES"
  55. glib:nick="tiles">
  56. <doc xml:space="preserve">This is an accurate simulation of the PostScript
  57. image operator without any interpolation enabled. Each pixel is
  58. rendered as a tiny parallelogram of solid color, the edges of which
  59. are implemented with antialiasing. It resembles nearest neighbor for
  60. enlargement, and bilinear for reduction.</doc>
  61. </member>
  62. <member name="bilinear"
  63. value="2"
  64. c:identifier="GDK_INTERP_BILINEAR"
  65. glib:nick="bilinear">
  66. <doc xml:space="preserve">Best quality/speed balance; use this mode by
  67. default. Bilinear interpolation. For enlargement, it is
  68. equivalent to point-sampling the ideal bilinear-interpolated image.
  69. For reduction, it is equivalent to laying down small tiles and
  70. integrating over the coverage area.</doc>
  71. </member>
  72. <member name="hyper"
  73. value="3"
  74. c:identifier="GDK_INTERP_HYPER"
  75. glib:nick="hyper">
  76. <doc xml:space="preserve">This is the slowest and highest quality
  77. reconstruction function. It is derived from the hyperbolic filters in
  78. Wolberg's "Digital Image Warping", and is formally defined as the
  79. hyperbolic-filter sampling the ideal hyperbolic-filter interpolated
  80. image (the filter is designed to be idempotent for 1:1 pixel mapping).</doc>
  81. </member>
  82. </enumeration>
  83. <constant name="PIXBUF_FEATURES_H"
  84. value="1"
  85. c:type="GDK_PIXBUF_FEATURES_H">
  86. <type name="gint" c:type="gint"/>
  87. </constant>
  88. <constant name="PIXBUF_MAGIC_NUMBER"
  89. value="1197763408"
  90. c:type="GDK_PIXBUF_MAGIC_NUMBER">
  91. <doc xml:space="preserve">Magic number for #GdkPixdata structures.</doc>
  92. <type name="gint" c:type="gint"/>
  93. </constant>
  94. <constant name="PIXBUF_MAJOR" value="2" c:type="GDK_PIXBUF_MAJOR">
  95. <doc xml:space="preserve">Major version of gdk-pixbuf library, that is the "0" in
  96. "0.8.2" for example.</doc>
  97. <type name="gint" c:type="gint"/>
  98. </constant>
  99. <constant name="PIXBUF_MICRO" value="0" c:type="GDK_PIXBUF_MICRO">
  100. <doc xml:space="preserve">Micro version of gdk-pixbuf library, that is the "2" in
  101. "0.8.2" for example.</doc>
  102. <type name="gint" c:type="gint"/>
  103. </constant>
  104. <constant name="PIXBUF_MINOR" value="34" c:type="GDK_PIXBUF_MINOR">
  105. <doc xml:space="preserve">Minor version of gdk-pixbuf library, that is the "8" in
  106. "0.8.2" for example.</doc>
  107. <type name="gint" c:type="gint"/>
  108. </constant>
  109. <constant name="PIXBUF_VERSION" value="2.34.0" c:type="GDK_PIXBUF_VERSION">
  110. <doc xml:space="preserve">Contains the full version of the gdk-pixbuf header as a string.
  111. This is the version being compiled against; contrast with
  112. #gdk_pixbuf_version.</doc>
  113. <type name="utf8" c:type="gchar*"/>
  114. </constant>
  115. <constant name="PIXDATA_HEADER_LENGTH"
  116. value="24"
  117. c:type="GDK_PIXDATA_HEADER_LENGTH">
  118. <doc xml:space="preserve">The length of a #GdkPixdata structure without the @pixel_data pointer.</doc>
  119. <type name="gint" c:type="gint"/>
  120. </constant>
  121. <class name="Pixbuf"
  122. c:symbol-prefix="pixbuf"
  123. c:type="GdkPixbuf"
  124. parent="GObject.Object"
  125. glib:type-name="GdkPixbuf"
  126. glib:get-type="gdk_pixbuf_get_type">
  127. <doc xml:space="preserve">This is the main structure in the gdk-pixbuf library. It is
  128. used to represent images. It contains information about the
  129. image's pixel data, its color space, bits per sample, width and
  130. height, and the rowstride (the number of bytes between the start of
  131. one row and the start of the next).</doc>
  132. <implements name="Gio.Icon"/>
  133. <implements name="Gio.LoadableIcon"/>
  134. <constructor name="new" c:identifier="gdk_pixbuf_new">
  135. <doc xml:space="preserve">Creates a new #GdkPixbuf structure and allocates a buffer for it. The
  136. buffer has an optimal rowstride. Note that the buffer is not cleared;
  137. you will have to fill it completely yourself.</doc>
  138. <return-value transfer-ownership="full">
  139. <doc xml:space="preserve">A newly-created #GdkPixbuf with a reference count of 1, or
  140. %NULL if not enough memory could be allocated for the image buffer.</doc>
  141. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  142. </return-value>
  143. <parameters>
  144. <parameter name="colorspace" transfer-ownership="none">
  145. <doc xml:space="preserve">Color space for image</doc>
  146. <type name="Colorspace" c:type="GdkColorspace"/>
  147. </parameter>
  148. <parameter name="has_alpha" transfer-ownership="none">
  149. <doc xml:space="preserve">Whether the image should have transparency information</doc>
  150. <type name="gboolean" c:type="gboolean"/>
  151. </parameter>
  152. <parameter name="bits_per_sample" transfer-ownership="none">
  153. <doc xml:space="preserve">Number of bits per color sample</doc>
  154. <type name="gint" c:type="int"/>
  155. </parameter>
  156. <parameter name="width" transfer-ownership="none">
  157. <doc xml:space="preserve">Width of image in pixels, must be &gt; 0</doc>
  158. <type name="gint" c:type="int"/>
  159. </parameter>
  160. <parameter name="height" transfer-ownership="none">
  161. <doc xml:space="preserve">Height of image in pixels, must be &gt; 0</doc>
  162. <type name="gint" c:type="int"/>
  163. </parameter>
  164. </parameters>
  165. </constructor>
  166. <constructor name="new_from_bytes"
  167. c:identifier="gdk_pixbuf_new_from_bytes"
  168. version="2.32">
  169. <doc xml:space="preserve">Creates a new #GdkPixbuf out of in-memory readonly image data.
  170. Currently only RGB images with 8 bits per sample are supported.
  171. This is the #GBytes variant of gdk_pixbuf_new_from_data().</doc>
  172. <return-value transfer-ownership="full">
  173. <doc xml:space="preserve">A newly-created #GdkPixbuf structure with a reference count of 1.</doc>
  174. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  175. </return-value>
  176. <parameters>
  177. <parameter name="data" transfer-ownership="none">
  178. <doc xml:space="preserve">Image data in 8-bit/sample packed format inside a #GBytes</doc>
  179. <type name="GLib.Bytes" c:type="GBytes*"/>
  180. </parameter>
  181. <parameter name="colorspace" transfer-ownership="none">
  182. <doc xml:space="preserve">Colorspace for the image data</doc>
  183. <type name="Colorspace" c:type="GdkColorspace"/>
  184. </parameter>
  185. <parameter name="has_alpha" transfer-ownership="none">
  186. <doc xml:space="preserve">Whether the data has an opacity channel</doc>
  187. <type name="gboolean" c:type="gboolean"/>
  188. </parameter>
  189. <parameter name="bits_per_sample" transfer-ownership="none">
  190. <doc xml:space="preserve">Number of bits per sample</doc>
  191. <type name="gint" c:type="int"/>
  192. </parameter>
  193. <parameter name="width" transfer-ownership="none">
  194. <doc xml:space="preserve">Width of the image in pixels, must be &gt; 0</doc>
  195. <type name="gint" c:type="int"/>
  196. </parameter>
  197. <parameter name="height" transfer-ownership="none">
  198. <doc xml:space="preserve">Height of the image in pixels, must be &gt; 0</doc>
  199. <type name="gint" c:type="int"/>
  200. </parameter>
  201. <parameter name="rowstride" transfer-ownership="none">
  202. <doc xml:space="preserve">Distance in bytes between row starts</doc>
  203. <type name="gint" c:type="int"/>
  204. </parameter>
  205. </parameters>
  206. </constructor>
  207. <constructor name="new_from_data"
  208. c:identifier="gdk_pixbuf_new_from_data">
  209. <doc xml:space="preserve">Creates a new #GdkPixbuf out of in-memory image data. Currently only RGB
  210. images with 8 bits per sample are supported.
  211. Since you are providing a pre-allocated pixel buffer, you must also
  212. specify a way to free that data. This is done with a function of
  213. type #GdkPixbufDestroyNotify. When a pixbuf created with is
  214. finalized, your destroy notification function will be called, and
  215. it is its responsibility to free the pixel array.
  216. See also gdk_pixbuf_new_from_bytes().</doc>
  217. <return-value transfer-ownership="full">
  218. <doc xml:space="preserve">A newly-created #GdkPixbuf structure with a reference count of 1.</doc>
  219. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  220. </return-value>
  221. <parameters>
  222. <parameter name="data" transfer-ownership="none">
  223. <doc xml:space="preserve">Image data in 8-bit/sample packed format</doc>
  224. <array zero-terminated="0" c:type="guchar*">
  225. <type name="guint8" c:type="guchar"/>
  226. </array>
  227. </parameter>
  228. <parameter name="colorspace" transfer-ownership="none">
  229. <doc xml:space="preserve">Colorspace for the image data</doc>
  230. <type name="Colorspace" c:type="GdkColorspace"/>
  231. </parameter>
  232. <parameter name="has_alpha" transfer-ownership="none">
  233. <doc xml:space="preserve">Whether the data has an opacity channel</doc>
  234. <type name="gboolean" c:type="gboolean"/>
  235. </parameter>
  236. <parameter name="bits_per_sample" transfer-ownership="none">
  237. <doc xml:space="preserve">Number of bits per sample</doc>
  238. <type name="gint" c:type="int"/>
  239. </parameter>
  240. <parameter name="width" transfer-ownership="none">
  241. <doc xml:space="preserve">Width of the image in pixels, must be &gt; 0</doc>
  242. <type name="gint" c:type="int"/>
  243. </parameter>
  244. <parameter name="height" transfer-ownership="none">
  245. <doc xml:space="preserve">Height of the image in pixels, must be &gt; 0</doc>
  246. <type name="gint" c:type="int"/>
  247. </parameter>
  248. <parameter name="rowstride" transfer-ownership="none">
  249. <doc xml:space="preserve">Distance in bytes between row starts</doc>
  250. <type name="gint" c:type="int"/>
  251. </parameter>
  252. <parameter name="destroy_fn"
  253. transfer-ownership="none"
  254. nullable="1"
  255. allow-none="1"
  256. scope="async"
  257. closure="8">
  258. <doc xml:space="preserve">Function used to free the data when the pixbuf's reference count
  259. drops to zero, or %NULL if the data should not be freed</doc>
  260. <type name="PixbufDestroyNotify" c:type="GdkPixbufDestroyNotify"/>
  261. </parameter>
  262. <parameter name="destroy_fn_data"
  263. transfer-ownership="none"
  264. nullable="1"
  265. allow-none="1">
  266. <doc xml:space="preserve">Closure data to pass to the destroy notification function</doc>
  267. <type name="gpointer" c:type="gpointer"/>
  268. </parameter>
  269. </parameters>
  270. </constructor>
  271. <constructor name="new_from_file"
  272. c:identifier="gdk_pixbuf_new_from_file"
  273. throws="1">
  274. <doc xml:space="preserve">Creates a new pixbuf by loading an image from a file. The file format is
  275. detected automatically. If %NULL is returned, then @error will be set.
  276. Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.</doc>
  277. <return-value transfer-ownership="full">
  278. <doc xml:space="preserve">A newly-created pixbuf with a reference count of 1, or %NULL if
  279. any of several error conditions occurred: the file could not be opened,
  280. there was no loader for the file's format, there was not enough memory to
  281. allocate the image buffer, or the image file contained invalid data.</doc>
  282. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  283. </return-value>
  284. <parameters>
  285. <parameter name="filename" transfer-ownership="none">
  286. <doc xml:space="preserve">Name of file to load, in the GLib file name encoding</doc>
  287. <type name="utf8" c:type="const char*"/>
  288. </parameter>
  289. </parameters>
  290. </constructor>
  291. <constructor name="new_from_file_at_scale"
  292. c:identifier="gdk_pixbuf_new_from_file_at_scale"
  293. version="2.6"
  294. throws="1">
  295. <doc xml:space="preserve">Creates a new pixbuf by loading an image from a file. The file format is
  296. detected automatically. If %NULL is returned, then @error will be set.
  297. Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.
  298. The image will be scaled to fit in the requested size, optionally preserving
  299. the image's aspect ratio.
  300. When preserving the aspect ratio, a @width of -1 will cause the image
  301. to be scaled to the exact given height, and a @height of -1 will cause
  302. the image to be scaled to the exact given width. When not preserving
  303. aspect ratio, a @width or @height of -1 means to not scale the image
  304. at all in that dimension. Negative values for @width and @height are
  305. allowed since 2.8.</doc>
  306. <return-value transfer-ownership="full">
  307. <doc xml:space="preserve">A newly-created pixbuf with a reference count of 1, or %NULL
  308. if any of several error conditions occurred: the file could not be opened,
  309. there was no loader for the file's format, there was not enough memory to
  310. allocate the image buffer, or the image file contained invalid data.</doc>
  311. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  312. </return-value>
  313. <parameters>
  314. <parameter name="filename" transfer-ownership="none">
  315. <doc xml:space="preserve">Name of file to load, in the GLib file name encoding</doc>
  316. <type name="utf8" c:type="const char*"/>
  317. </parameter>
  318. <parameter name="width" transfer-ownership="none">
  319. <doc xml:space="preserve">The width the image should have or -1 to not constrain the width</doc>
  320. <type name="gint" c:type="int"/>
  321. </parameter>
  322. <parameter name="height" transfer-ownership="none">
  323. <doc xml:space="preserve">The height the image should have or -1 to not constrain the height</doc>
  324. <type name="gint" c:type="int"/>
  325. </parameter>
  326. <parameter name="preserve_aspect_ratio" transfer-ownership="none">
  327. <doc xml:space="preserve">%TRUE to preserve the image's aspect ratio</doc>
  328. <type name="gboolean" c:type="gboolean"/>
  329. </parameter>
  330. </parameters>
  331. </constructor>
  332. <constructor name="new_from_file_at_size"
  333. c:identifier="gdk_pixbuf_new_from_file_at_size"
  334. version="2.4"
  335. throws="1">
  336. <doc xml:space="preserve">Creates a new pixbuf by loading an image from a file.
  337. The file format is detected automatically. If %NULL is returned, then
  338. @error will be set. Possible errors are in the #GDK_PIXBUF_ERROR and
  339. #G_FILE_ERROR domains.
  340. The image will be scaled to fit in the requested size, preserving
  341. the image's aspect ratio. Note that the returned pixbuf may be smaller
  342. than @width x @height, if the aspect ratio requires it. To load
  343. and image at the requested size, regardless of aspect ratio, use
  344. gdk_pixbuf_new_from_file_at_scale().</doc>
  345. <return-value transfer-ownership="full">
  346. <doc xml:space="preserve">A newly-created pixbuf with a reference count of 1, or
  347. %NULL if any of several error conditions occurred: the file could not
  348. be opened, there was no loader for the file's format, there was not
  349. enough memory to allocate the image buffer, or the image file contained
  350. invalid data.</doc>
  351. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  352. </return-value>
  353. <parameters>
  354. <parameter name="filename" transfer-ownership="none">
  355. <doc xml:space="preserve">Name of file to load, in the GLib file name encoding</doc>
  356. <type name="utf8" c:type="const char*"/>
  357. </parameter>
  358. <parameter name="width" transfer-ownership="none">
  359. <doc xml:space="preserve">The width the image should have or -1 to not constrain the width</doc>
  360. <type name="gint" c:type="int"/>
  361. </parameter>
  362. <parameter name="height" transfer-ownership="none">
  363. <doc xml:space="preserve">The height the image should have or -1 to not constrain the height</doc>
  364. <type name="gint" c:type="int"/>
  365. </parameter>
  366. </parameters>
  367. </constructor>
  368. <constructor name="new_from_inline"
  369. c:identifier="gdk_pixbuf_new_from_inline"
  370. deprecated="1"
  371. deprecated-version="2.32"
  372. throws="1">
  373. <doc xml:space="preserve">Create a #GdkPixbuf from a flat representation that is suitable for
  374. storing as inline data in a program. This is useful if you want to
  375. ship a program with images, but don't want to depend on any
  376. external files.
  377. gdk-pixbuf ships with a program called [gdk-pixbuf-csource][gdk-pixbuf-csource],
  378. which allows for conversion of #GdkPixbufs into such a inline representation.
  379. In almost all cases, you should pass the `--raw` option to
  380. `gdk-pixbuf-csource`. A sample invocation would be:
  381. |[
  382. gdk-pixbuf-csource --raw --name=myimage_inline myimage.png
  383. ]|
  384. For the typical case where the inline pixbuf is read-only static data,
  385. you don't need to copy the pixel data unless you intend to write to
  386. it, so you can pass %FALSE for @copy_pixels. (If you pass `--rle` to
  387. `gdk-pixbuf-csource`, a copy will be made even if @copy_pixels is %FALSE,
  388. so using this option is generally a bad idea.)
  389. If you create a pixbuf from const inline data compiled into your
  390. program, it's probably safe to ignore errors and disable length checks,
  391. since things will always succeed:
  392. |[
  393. pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, FALSE, NULL);
  394. ]|
  395. For non-const inline data, you could get out of memory. For untrusted
  396. inline data located at runtime, you could have corrupt inline data in
  397. addition.</doc>
  398. <doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
  399. <return-value transfer-ownership="full">
  400. <doc xml:space="preserve">A newly-created #GdkPixbuf structure with a reference,
  401. count of 1, or %NULL if an error occurred.</doc>
  402. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  403. </return-value>
  404. <parameters>
  405. <parameter name="data_length" transfer-ownership="none">
  406. <doc xml:space="preserve">Length in bytes of the @data argument or -1 to
  407. disable length checks</doc>
  408. <type name="gint" c:type="gint"/>
  409. </parameter>
  410. <parameter name="data" transfer-ownership="none">
  411. <doc xml:space="preserve">Byte data containing a
  412. serialized #GdkPixdata structure</doc>
  413. <array length="0" zero-terminated="0" c:type="guint8*">
  414. <type name="guint8" c:type="guint8"/>
  415. </array>
  416. </parameter>
  417. <parameter name="copy_pixels" transfer-ownership="none">
  418. <doc xml:space="preserve">Whether to copy the pixel data, or use direct pointers
  419. @data for the resulting pixbuf</doc>
  420. <type name="gboolean" c:type="gboolean"/>
  421. </parameter>
  422. </parameters>
  423. </constructor>
  424. <constructor name="new_from_resource"
  425. c:identifier="gdk_pixbuf_new_from_resource"
  426. version="2.26"
  427. throws="1">
  428. <doc xml:space="preserve">Creates a new pixbuf by loading an image from an resource.
  429. The file format is detected automatically. If %NULL is returned, then
  430. @error will be set.</doc>
  431. <return-value transfer-ownership="full">
  432. <doc xml:space="preserve">A newly-created pixbuf, or %NULL if any of several error
  433. conditions occurred: the file could not be opened, the image format is
  434. not supported, there was not enough memory to allocate the image buffer,
  435. the stream contained invalid data, or the operation was cancelled.</doc>
  436. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  437. </return-value>
  438. <parameters>
  439. <parameter name="resource_path" transfer-ownership="none">
  440. <doc xml:space="preserve">the path of the resource file</doc>
  441. <type name="utf8" c:type="const char*"/>
  442. </parameter>
  443. </parameters>
  444. </constructor>
  445. <constructor name="new_from_resource_at_scale"
  446. c:identifier="gdk_pixbuf_new_from_resource_at_scale"
  447. version="2.26"
  448. throws="1">
  449. <doc xml:space="preserve">Creates a new pixbuf by loading an image from an resource.
  450. The file format is detected automatically. If %NULL is returned, then
  451. @error will be set.
  452. The image will be scaled to fit in the requested size, optionally
  453. preserving the image's aspect ratio. When preserving the aspect ratio,
  454. a @width of -1 will cause the image to be scaled to the exact given
  455. height, and a @height of -1 will cause the image to be scaled to the
  456. exact given width. When not preserving aspect ratio, a @width or
  457. @height of -1 means to not scale the image at all in that dimension.
  458. The stream is not closed.</doc>
  459. <return-value transfer-ownership="full">
  460. <doc xml:space="preserve">A newly-created pixbuf, or %NULL if any of several error
  461. conditions occurred: the file could not be opened, the image format is
  462. not supported, there was not enough memory to allocate the image buffer,
  463. the stream contained invalid data, or the operation was cancelled.</doc>
  464. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  465. </return-value>
  466. <parameters>
  467. <parameter name="resource_path" transfer-ownership="none">
  468. <doc xml:space="preserve">the path of the resource file</doc>
  469. <type name="utf8" c:type="const char*"/>
  470. </parameter>
  471. <parameter name="width" transfer-ownership="none">
  472. <doc xml:space="preserve">The width the image should have or -1 to not constrain the width</doc>
  473. <type name="gint" c:type="int"/>
  474. </parameter>
  475. <parameter name="height" transfer-ownership="none">
  476. <doc xml:space="preserve">The height the image should have or -1 to not constrain the height</doc>
  477. <type name="gint" c:type="int"/>
  478. </parameter>
  479. <parameter name="preserve_aspect_ratio" transfer-ownership="none">
  480. <doc xml:space="preserve">%TRUE to preserve the image's aspect ratio</doc>
  481. <type name="gboolean" c:type="gboolean"/>
  482. </parameter>
  483. </parameters>
  484. </constructor>
  485. <constructor name="new_from_stream"
  486. c:identifier="gdk_pixbuf_new_from_stream"
  487. version="2.14"
  488. throws="1">
  489. <doc xml:space="preserve">Creates a new pixbuf by loading an image from an input stream.
  490. The file format is detected automatically. If %NULL is returned, then
  491. @error will be set. The @cancellable can be used to abort the operation
  492. from another thread. If the operation was cancelled, the error
  493. %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in
  494. the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains.
  495. The stream is not closed.</doc>
  496. <return-value transfer-ownership="full">
  497. <doc xml:space="preserve">A newly-created pixbuf, or %NULL if any of several error
  498. conditions occurred: the file could not be opened, the image format is
  499. not supported, there was not enough memory to allocate the image buffer,
  500. the stream contained invalid data, or the operation was cancelled.</doc>
  501. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  502. </return-value>
  503. <parameters>
  504. <parameter name="stream" transfer-ownership="none">
  505. <doc xml:space="preserve">a #GInputStream to load the pixbuf from</doc>
  506. <type name="Gio.InputStream" c:type="GInputStream*"/>
  507. </parameter>
  508. <parameter name="cancellable"
  509. transfer-ownership="none"
  510. nullable="1"
  511. allow-none="1">
  512. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  513. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  514. </parameter>
  515. </parameters>
  516. </constructor>
  517. <constructor name="new_from_stream_at_scale"
  518. c:identifier="gdk_pixbuf_new_from_stream_at_scale"
  519. version="2.14"
  520. throws="1">
  521. <doc xml:space="preserve">Creates a new pixbuf by loading an image from an input stream.
  522. The file format is detected automatically. If %NULL is returned, then
  523. @error will be set. The @cancellable can be used to abort the operation
  524. from another thread. If the operation was cancelled, the error
  525. %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in
  526. the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains.
  527. The image will be scaled to fit in the requested size, optionally
  528. preserving the image's aspect ratio.
  529. When preserving the aspect ratio, a @width of -1 will cause the image to be
  530. scaled to the exact given height, and a @height of -1 will cause the image
  531. to be scaled to the exact given width. If both @width and @height are
  532. given, this function will behave as if the smaller of the two values
  533. is passed as -1.
  534. When not preserving aspect ratio, a @width or @height of -1 means to not
  535. scale the image at all in that dimension.
  536. The stream is not closed.</doc>
  537. <return-value transfer-ownership="full">
  538. <doc xml:space="preserve">A newly-created pixbuf, or %NULL if any of several error
  539. conditions occurred: the file could not be opened, the image format is
  540. not supported, there was not enough memory to allocate the image buffer,
  541. the stream contained invalid data, or the operation was cancelled.</doc>
  542. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  543. </return-value>
  544. <parameters>
  545. <parameter name="stream" transfer-ownership="none">
  546. <doc xml:space="preserve">a #GInputStream to load the pixbuf from</doc>
  547. <type name="Gio.InputStream" c:type="GInputStream*"/>
  548. </parameter>
  549. <parameter name="width" transfer-ownership="none">
  550. <doc xml:space="preserve">The width the image should have or -1 to not constrain the width</doc>
  551. <type name="gint" c:type="gint"/>
  552. </parameter>
  553. <parameter name="height" transfer-ownership="none">
  554. <doc xml:space="preserve">The height the image should have or -1 to not constrain the height</doc>
  555. <type name="gint" c:type="gint"/>
  556. </parameter>
  557. <parameter name="preserve_aspect_ratio" transfer-ownership="none">
  558. <doc xml:space="preserve">%TRUE to preserve the image's aspect ratio</doc>
  559. <type name="gboolean" c:type="gboolean"/>
  560. </parameter>
  561. <parameter name="cancellable"
  562. transfer-ownership="none"
  563. nullable="1"
  564. allow-none="1">
  565. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  566. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  567. </parameter>
  568. </parameters>
  569. </constructor>
  570. <constructor name="new_from_stream_finish"
  571. c:identifier="gdk_pixbuf_new_from_stream_finish"
  572. version="2.24"
  573. throws="1">
  574. <doc xml:space="preserve">Finishes an asynchronous pixbuf creation operation started with
  575. gdk_pixbuf_new_from_stream_async().</doc>
  576. <return-value transfer-ownership="full">
  577. <doc xml:space="preserve">a #GdkPixbuf or %NULL on error. Free the returned
  578. object with g_object_unref().</doc>
  579. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  580. </return-value>
  581. <parameters>
  582. <parameter name="async_result" transfer-ownership="none">
  583. <doc xml:space="preserve">a #GAsyncResult</doc>
  584. <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
  585. </parameter>
  586. </parameters>
  587. </constructor>
  588. <constructor name="new_from_xpm_data"
  589. c:identifier="gdk_pixbuf_new_from_xpm_data">
  590. <doc xml:space="preserve">Creates a new pixbuf by parsing XPM data in memory. This data is commonly
  591. the result of including an XPM file into a program's C source.</doc>
  592. <return-value transfer-ownership="full">
  593. <doc xml:space="preserve">A newly-created pixbuf with a reference count of 1.</doc>
  594. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  595. </return-value>
  596. <parameters>
  597. <parameter name="data" transfer-ownership="none">
  598. <doc xml:space="preserve">Pointer to inline XPM data.</doc>
  599. <array c:type="char**">
  600. <type name="utf8" c:type="char*"/>
  601. </array>
  602. </parameter>
  603. </parameters>
  604. </constructor>
  605. <function name="from_pixdata"
  606. c:identifier="gdk_pixbuf_from_pixdata"
  607. deprecated="1"
  608. deprecated-version="2.32"
  609. throws="1">
  610. <doc xml:space="preserve">Converts a #GdkPixdata to a #GdkPixbuf. If @copy_pixels is %TRUE or
  611. if the pixel data is run-length-encoded, the pixel data is copied into
  612. newly-allocated memory; otherwise it is reused.</doc>
  613. <doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
  614. <return-value transfer-ownership="full">
  615. <doc xml:space="preserve">a new #GdkPixbuf.</doc>
  616. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  617. </return-value>
  618. <parameters>
  619. <parameter name="pixdata" transfer-ownership="none">
  620. <doc xml:space="preserve">a #GdkPixdata to convert into a #GdkPixbuf.</doc>
  621. <type name="Pixdata" c:type="const GdkPixdata*"/>
  622. </parameter>
  623. <parameter name="copy_pixels" transfer-ownership="none">
  624. <doc xml:space="preserve">whether to copy raw pixel data; run-length encoded
  625. pixel data is always copied.</doc>
  626. <type name="gboolean" c:type="gboolean"/>
  627. </parameter>
  628. </parameters>
  629. </function>
  630. <function name="get_file_info"
  631. c:identifier="gdk_pixbuf_get_file_info"
  632. version="2.4">
  633. <doc xml:space="preserve">Parses an image file far enough to determine its format and size.</doc>
  634. <return-value transfer-ownership="none" nullable="1">
  635. <doc xml:space="preserve">A #GdkPixbufFormat describing
  636. the image format of the file or %NULL if the image format wasn't
  637. recognized. The return value is owned by #GdkPixbuf and should
  638. not be freed.</doc>
  639. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  640. </return-value>
  641. <parameters>
  642. <parameter name="filename" transfer-ownership="none">
  643. <doc xml:space="preserve">The name of the file to identify.</doc>
  644. <type name="utf8" c:type="const gchar*"/>
  645. </parameter>
  646. <parameter name="width"
  647. direction="out"
  648. caller-allocates="0"
  649. transfer-ownership="full"
  650. optional="1"
  651. allow-none="1">
  652. <doc xml:space="preserve">Return location for the width of the
  653. image, or %NULL</doc>
  654. <type name="gint" c:type="gint*"/>
  655. </parameter>
  656. <parameter name="height"
  657. direction="out"
  658. caller-allocates="0"
  659. transfer-ownership="full"
  660. optional="1"
  661. allow-none="1">
  662. <doc xml:space="preserve">Return location for the height of the
  663. image, or %NULL</doc>
  664. <type name="gint" c:type="gint*"/>
  665. </parameter>
  666. </parameters>
  667. </function>
  668. <function name="get_file_info_async"
  669. c:identifier="gdk_pixbuf_get_file_info_async"
  670. version="2.32">
  671. <doc xml:space="preserve">Asynchronously parses an image file far enough to determine its
  672. format and size.
  673. For more details see gdk_pixbuf_get_file_info(), which is the synchronous
  674. version of this function.
  675. When the operation is finished, @callback will be called in the
  676. main thread. You can then call gdk_pixbuf_get_file_info_finish() to
  677. get the result of the operation.</doc>
  678. <return-value transfer-ownership="none">
  679. <type name="none" c:type="void"/>
  680. </return-value>
  681. <parameters>
  682. <parameter name="filename" transfer-ownership="none">
  683. <doc xml:space="preserve">The name of the file to identify</doc>
  684. <type name="utf8" c:type="const gchar*"/>
  685. </parameter>
  686. <parameter name="cancellable"
  687. transfer-ownership="none"
  688. nullable="1"
  689. allow-none="1">
  690. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  691. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  692. </parameter>
  693. <parameter name="callback"
  694. transfer-ownership="none"
  695. nullable="1"
  696. allow-none="1"
  697. scope="async"
  698. closure="3">
  699. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the the pixbuf is loaded</doc>
  700. <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  701. </parameter>
  702. <parameter name="user_data"
  703. transfer-ownership="none"
  704. nullable="1"
  705. allow-none="1">
  706. <doc xml:space="preserve">the data to pass to the callback function</doc>
  707. <type name="gpointer" c:type="gpointer"/>
  708. </parameter>
  709. </parameters>
  710. </function>
  711. <function name="get_file_info_finish"
  712. c:identifier="gdk_pixbuf_get_file_info_finish"
  713. version="2.32"
  714. throws="1">
  715. <doc xml:space="preserve">Finishes an asynchronous pixbuf parsing operation started with
  716. gdk_pixbuf_get_file_info_async().</doc>
  717. <return-value transfer-ownership="none">
  718. <doc xml:space="preserve">A #GdkPixbufFormat describing the image
  719. format of the file or %NULL if the image format wasn't
  720. recognized. The return value is owned by GdkPixbuf and should
  721. not be freed.</doc>
  722. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  723. </return-value>
  724. <parameters>
  725. <parameter name="async_result" transfer-ownership="none">
  726. <doc xml:space="preserve">a #GAsyncResult</doc>
  727. <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
  728. </parameter>
  729. <parameter name="width"
  730. direction="out"
  731. caller-allocates="0"
  732. transfer-ownership="full">
  733. <doc xml:space="preserve">Return location for the width of the image, or %NULL</doc>
  734. <type name="gint" c:type="gint*"/>
  735. </parameter>
  736. <parameter name="height"
  737. direction="out"
  738. caller-allocates="0"
  739. transfer-ownership="full">
  740. <doc xml:space="preserve">Return location for the height of the image, or %NULL</doc>
  741. <type name="gint" c:type="gint*"/>
  742. </parameter>
  743. </parameters>
  744. </function>
  745. <function name="get_formats"
  746. c:identifier="gdk_pixbuf_get_formats"
  747. version="2.2">
  748. <doc xml:space="preserve">Obtains the available information about the image formats supported
  749. by GdkPixbuf.</doc>
  750. <return-value transfer-ownership="container">
  751. <doc xml:space="preserve">A list of
  752. #GdkPixbufFormats describing the supported image formats. The list should
  753. be freed when it is no longer needed, but the structures themselves are
  754. owned by #GdkPixbuf and should not be freed.</doc>
  755. <type name="GLib.SList" c:type="GSList*">
  756. <type name="PixbufFormat"/>
  757. </type>
  758. </return-value>
  759. </function>
  760. <function name="new_from_stream_async"
  761. c:identifier="gdk_pixbuf_new_from_stream_async"
  762. version="2.24">
  763. <doc xml:space="preserve">Creates a new pixbuf by asynchronously loading an image from an input stream.
  764. For more details see gdk_pixbuf_new_from_stream(), which is the synchronous
  765. version of this function.
  766. When the operation is finished, @callback will be called in the main thread.
  767. You can then call gdk_pixbuf_new_from_stream_finish() to get the result of the operation.</doc>
  768. <return-value transfer-ownership="none">
  769. <type name="none" c:type="void"/>
  770. </return-value>
  771. <parameters>
  772. <parameter name="stream" transfer-ownership="none">
  773. <doc xml:space="preserve">a #GInputStream from which to load the pixbuf</doc>
  774. <type name="Gio.InputStream" c:type="GInputStream*"/>
  775. </parameter>
  776. <parameter name="cancellable"
  777. transfer-ownership="none"
  778. nullable="1"
  779. allow-none="1">
  780. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  781. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  782. </parameter>
  783. <parameter name="callback"
  784. transfer-ownership="none"
  785. nullable="1"
  786. allow-none="1"
  787. scope="async"
  788. closure="3">
  789. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the the pixbuf is loaded</doc>
  790. <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  791. </parameter>
  792. <parameter name="user_data"
  793. transfer-ownership="none"
  794. nullable="1"
  795. allow-none="1">
  796. <doc xml:space="preserve">the data to pass to the callback function</doc>
  797. <type name="gpointer" c:type="gpointer"/>
  798. </parameter>
  799. </parameters>
  800. </function>
  801. <function name="new_from_stream_at_scale_async"
  802. c:identifier="gdk_pixbuf_new_from_stream_at_scale_async"
  803. version="2.24">
  804. <doc xml:space="preserve">Creates a new pixbuf by asynchronously loading an image from an input stream.
  805. For more details see gdk_pixbuf_new_from_stream_at_scale(), which is the synchronous
  806. version of this function.
  807. When the operation is finished, @callback will be called in the main thread.
  808. You can then call gdk_pixbuf_new_from_stream_finish() to get the result of the operation.</doc>
  809. <return-value transfer-ownership="none">
  810. <type name="none" c:type="void"/>
  811. </return-value>
  812. <parameters>
  813. <parameter name="stream" transfer-ownership="none">
  814. <doc xml:space="preserve">a #GInputStream from which to load the pixbuf</doc>
  815. <type name="Gio.InputStream" c:type="GInputStream*"/>
  816. </parameter>
  817. <parameter name="width" transfer-ownership="none">
  818. <doc xml:space="preserve">the width the image should have or -1 to not constrain the width</doc>
  819. <type name="gint" c:type="gint"/>
  820. </parameter>
  821. <parameter name="height" transfer-ownership="none">
  822. <doc xml:space="preserve">the height the image should have or -1 to not constrain the height</doc>
  823. <type name="gint" c:type="gint"/>
  824. </parameter>
  825. <parameter name="preserve_aspect_ratio" transfer-ownership="none">
  826. <doc xml:space="preserve">%TRUE to preserve the image's aspect ratio</doc>
  827. <type name="gboolean" c:type="gboolean"/>
  828. </parameter>
  829. <parameter name="cancellable"
  830. transfer-ownership="none"
  831. nullable="1"
  832. allow-none="1">
  833. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  834. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  835. </parameter>
  836. <parameter name="callback"
  837. transfer-ownership="none"
  838. nullable="1"
  839. allow-none="1"
  840. scope="async"
  841. closure="6">
  842. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the the pixbuf is loaded</doc>
  843. <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  844. </parameter>
  845. <parameter name="user_data"
  846. transfer-ownership="none"
  847. nullable="1"
  848. allow-none="1">
  849. <doc xml:space="preserve">the data to pass to the callback function</doc>
  850. <type name="gpointer" c:type="gpointer"/>
  851. </parameter>
  852. </parameters>
  853. </function>
  854. <function name="save_to_stream_finish"
  855. c:identifier="gdk_pixbuf_save_to_stream_finish"
  856. version="2.24"
  857. throws="1">
  858. <doc xml:space="preserve">Finishes an asynchronous pixbuf save operation started with
  859. gdk_pixbuf_save_to_stream_async().</doc>
  860. <return-value transfer-ownership="none">
  861. <doc xml:space="preserve">%TRUE if the pixbuf was saved successfully, %FALSE if an error was set.</doc>
  862. <type name="gboolean" c:type="gboolean"/>
  863. </return-value>
  864. <parameters>
  865. <parameter name="async_result" transfer-ownership="none">
  866. <doc xml:space="preserve">a #GAsyncResult</doc>
  867. <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
  868. </parameter>
  869. </parameters>
  870. </function>
  871. <method name="add_alpha" c:identifier="gdk_pixbuf_add_alpha">
  872. <doc xml:space="preserve">Takes an existing pixbuf and adds an alpha channel to it.
  873. If the existing pixbuf already had an alpha channel, the channel
  874. values are copied from the original; otherwise, the alpha channel
  875. is initialized to 255 (full opacity).
  876. If @substitute_color is %TRUE, then the color specified by (@r, @g, @b) will be
  877. assigned zero opacity. That is, if you pass (255, 255, 255) for the
  878. substitute color, all white pixels will become fully transparent.</doc>
  879. <return-value transfer-ownership="full">
  880. <doc xml:space="preserve">A newly-created pixbuf with a reference count of 1.</doc>
  881. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  882. </return-value>
  883. <parameters>
  884. <instance-parameter name="pixbuf" transfer-ownership="none">
  885. <doc xml:space="preserve">A #GdkPixbuf.</doc>
  886. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  887. </instance-parameter>
  888. <parameter name="substitute_color" transfer-ownership="none">
  889. <doc xml:space="preserve">Whether to set a color to zero opacity. If this
  890. is %FALSE, then the (@r, @g, @b) arguments will be ignored.</doc>
  891. <type name="gboolean" c:type="gboolean"/>
  892. </parameter>
  893. <parameter name="r" transfer-ownership="none">
  894. <doc xml:space="preserve">Red value to substitute.</doc>
  895. <type name="guint8" c:type="guchar"/>
  896. </parameter>
  897. <parameter name="g" transfer-ownership="none">
  898. <doc xml:space="preserve">Green value to substitute.</doc>
  899. <type name="guint8" c:type="guchar"/>
  900. </parameter>
  901. <parameter name="b" transfer-ownership="none">
  902. <doc xml:space="preserve">Blue value to substitute.</doc>
  903. <type name="guint8" c:type="guchar"/>
  904. </parameter>
  905. </parameters>
  906. </method>
  907. <method name="apply_embedded_orientation"
  908. c:identifier="gdk_pixbuf_apply_embedded_orientation"
  909. version="2.12">
  910. <doc xml:space="preserve">Takes an existing pixbuf and checks for the presence of an
  911. associated "orientation" option, which may be provided by the
  912. jpeg loader (which reads the exif orientation tag) or the
  913. tiff loader (which reads the tiff orientation tag, and
  914. compensates it for the partial transforms performed by
  915. libtiff). If an orientation option/tag is present, the
  916. appropriate transform will be performed so that the pixbuf
  917. is oriented correctly.</doc>
  918. <return-value transfer-ownership="full">
  919. <doc xml:space="preserve">A newly-created pixbuf, or a reference to the
  920. input pixbuf (with an increased reference count).</doc>
  921. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  922. </return-value>
  923. <parameters>
  924. <instance-parameter name="src" transfer-ownership="none">
  925. <doc xml:space="preserve">A #GdkPixbuf.</doc>
  926. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  927. </instance-parameter>
  928. </parameters>
  929. </method>
  930. <method name="composite" c:identifier="gdk_pixbuf_composite">
  931. <doc xml:space="preserve">Creates a transformation of the source image @src by scaling by
  932. @scale_x and @scale_y then translating by @offset_x and @offset_y.
  933. This gives an image in the coordinates of the destination pixbuf.
  934. The rectangle (@dest_x, @dest_y, @dest_width, @dest_height)
  935. is then composited onto the corresponding rectangle of the
  936. original destination image.
  937. When the destination rectangle contains parts not in the source
  938. image, the data at the edges of the source image is replicated
  939. to infinity.
  940. ![](composite.png)</doc>
  941. <return-value transfer-ownership="none">
  942. <type name="none" c:type="void"/>
  943. </return-value>
  944. <parameters>
  945. <instance-parameter name="src" transfer-ownership="none">
  946. <doc xml:space="preserve">a #GdkPixbuf</doc>
  947. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  948. </instance-parameter>
  949. <parameter name="dest" transfer-ownership="none">
  950. <doc xml:space="preserve">the #GdkPixbuf into which to render the results</doc>
  951. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  952. </parameter>
  953. <parameter name="dest_x" transfer-ownership="none">
  954. <doc xml:space="preserve">the left coordinate for region to render</doc>
  955. <type name="gint" c:type="int"/>
  956. </parameter>
  957. <parameter name="dest_y" transfer-ownership="none">
  958. <doc xml:space="preserve">the top coordinate for region to render</doc>
  959. <type name="gint" c:type="int"/>
  960. </parameter>
  961. <parameter name="dest_width" transfer-ownership="none">
  962. <doc xml:space="preserve">the width of the region to render</doc>
  963. <type name="gint" c:type="int"/>
  964. </parameter>
  965. <parameter name="dest_height" transfer-ownership="none">
  966. <doc xml:space="preserve">the height of the region to render</doc>
  967. <type name="gint" c:type="int"/>
  968. </parameter>
  969. <parameter name="offset_x" transfer-ownership="none">
  970. <doc xml:space="preserve">the offset in the X direction (currently rounded to an integer)</doc>
  971. <type name="gdouble" c:type="double"/>
  972. </parameter>
  973. <parameter name="offset_y" transfer-ownership="none">
  974. <doc xml:space="preserve">the offset in the Y direction (currently rounded to an integer)</doc>
  975. <type name="gdouble" c:type="double"/>
  976. </parameter>
  977. <parameter name="scale_x" transfer-ownership="none">
  978. <doc xml:space="preserve">the scale factor in the X direction</doc>
  979. <type name="gdouble" c:type="double"/>
  980. </parameter>
  981. <parameter name="scale_y" transfer-ownership="none">
  982. <doc xml:space="preserve">the scale factor in the Y direction</doc>
  983. <type name="gdouble" c:type="double"/>
  984. </parameter>
  985. <parameter name="interp_type" transfer-ownership="none">
  986. <doc xml:space="preserve">the interpolation type for the transformation.</doc>
  987. <type name="InterpType" c:type="GdkInterpType"/>
  988. </parameter>
  989. <parameter name="overall_alpha" transfer-ownership="none">
  990. <doc xml:space="preserve">overall alpha for source image (0..255)</doc>
  991. <type name="gint" c:type="int"/>
  992. </parameter>
  993. </parameters>
  994. </method>
  995. <method name="composite_color" c:identifier="gdk_pixbuf_composite_color">
  996. <doc xml:space="preserve">Creates a transformation of the source image @src by scaling by
  997. @scale_x and @scale_y then translating by @offset_x and @offset_y,
  998. then composites the rectangle (@dest_x ,@dest_y, @dest_width,
  999. @dest_height) of the resulting image with a checkboard of the
  1000. colors @color1 and @color2 and renders it onto the destination
  1001. image.
  1002. See gdk_pixbuf_composite_color_simple() for a simpler variant of this
  1003. function suitable for many tasks.</doc>
  1004. <return-value transfer-ownership="none">
  1005. <type name="none" c:type="void"/>
  1006. </return-value>
  1007. <parameters>
  1008. <instance-parameter name="src" transfer-ownership="none">
  1009. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1010. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1011. </instance-parameter>
  1012. <parameter name="dest" transfer-ownership="none">
  1013. <doc xml:space="preserve">the #GdkPixbuf into which to render the results</doc>
  1014. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1015. </parameter>
  1016. <parameter name="dest_x" transfer-ownership="none">
  1017. <doc xml:space="preserve">the left coordinate for region to render</doc>
  1018. <type name="gint" c:type="int"/>
  1019. </parameter>
  1020. <parameter name="dest_y" transfer-ownership="none">
  1021. <doc xml:space="preserve">the top coordinate for region to render</doc>
  1022. <type name="gint" c:type="int"/>
  1023. </parameter>
  1024. <parameter name="dest_width" transfer-ownership="none">
  1025. <doc xml:space="preserve">the width of the region to render</doc>
  1026. <type name="gint" c:type="int"/>
  1027. </parameter>
  1028. <parameter name="dest_height" transfer-ownership="none">
  1029. <doc xml:space="preserve">the height of the region to render</doc>
  1030. <type name="gint" c:type="int"/>
  1031. </parameter>
  1032. <parameter name="offset_x" transfer-ownership="none">
  1033. <doc xml:space="preserve">the offset in the X direction (currently rounded to an integer)</doc>
  1034. <type name="gdouble" c:type="double"/>
  1035. </parameter>
  1036. <parameter name="offset_y" transfer-ownership="none">
  1037. <doc xml:space="preserve">the offset in the Y direction (currently rounded to an integer)</doc>
  1038. <type name="gdouble" c:type="double"/>
  1039. </parameter>
  1040. <parameter name="scale_x" transfer-ownership="none">
  1041. <doc xml:space="preserve">the scale factor in the X direction</doc>
  1042. <type name="gdouble" c:type="double"/>
  1043. </parameter>
  1044. <parameter name="scale_y" transfer-ownership="none">
  1045. <doc xml:space="preserve">the scale factor in the Y direction</doc>
  1046. <type name="gdouble" c:type="double"/>
  1047. </parameter>
  1048. <parameter name="interp_type" transfer-ownership="none">
  1049. <doc xml:space="preserve">the interpolation type for the transformation.</doc>
  1050. <type name="InterpType" c:type="GdkInterpType"/>
  1051. </parameter>
  1052. <parameter name="overall_alpha" transfer-ownership="none">
  1053. <doc xml:space="preserve">overall alpha for source image (0..255)</doc>
  1054. <type name="gint" c:type="int"/>
  1055. </parameter>
  1056. <parameter name="check_x" transfer-ownership="none">
  1057. <doc xml:space="preserve">the X offset for the checkboard (origin of checkboard is at -@check_x, -@check_y)</doc>
  1058. <type name="gint" c:type="int"/>
  1059. </parameter>
  1060. <parameter name="check_y" transfer-ownership="none">
  1061. <doc xml:space="preserve">the Y offset for the checkboard</doc>
  1062. <type name="gint" c:type="int"/>
  1063. </parameter>
  1064. <parameter name="check_size" transfer-ownership="none">
  1065. <doc xml:space="preserve">the size of checks in the checkboard (must be a power of two)</doc>
  1066. <type name="gint" c:type="int"/>
  1067. </parameter>
  1068. <parameter name="color1" transfer-ownership="none">
  1069. <doc xml:space="preserve">the color of check at upper left</doc>
  1070. <type name="guint32" c:type="guint32"/>
  1071. </parameter>
  1072. <parameter name="color2" transfer-ownership="none">
  1073. <doc xml:space="preserve">the color of the other check</doc>
  1074. <type name="guint32" c:type="guint32"/>
  1075. </parameter>
  1076. </parameters>
  1077. </method>
  1078. <method name="composite_color_simple"
  1079. c:identifier="gdk_pixbuf_composite_color_simple">
  1080. <doc xml:space="preserve">Creates a new #GdkPixbuf by scaling @src to @dest_width x
  1081. @dest_height and compositing the result with a checkboard of colors
  1082. @color1 and @color2.</doc>
  1083. <return-value transfer-ownership="full">
  1084. <doc xml:space="preserve">the new #GdkPixbuf, or %NULL if not enough memory could be
  1085. allocated for it.</doc>
  1086. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1087. </return-value>
  1088. <parameters>
  1089. <instance-parameter name="src" transfer-ownership="none">
  1090. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1091. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1092. </instance-parameter>
  1093. <parameter name="dest_width" transfer-ownership="none">
  1094. <doc xml:space="preserve">the width of destination image</doc>
  1095. <type name="gint" c:type="int"/>
  1096. </parameter>
  1097. <parameter name="dest_height" transfer-ownership="none">
  1098. <doc xml:space="preserve">the height of destination image</doc>
  1099. <type name="gint" c:type="int"/>
  1100. </parameter>
  1101. <parameter name="interp_type" transfer-ownership="none">
  1102. <doc xml:space="preserve">the interpolation type for the transformation.</doc>
  1103. <type name="InterpType" c:type="GdkInterpType"/>
  1104. </parameter>
  1105. <parameter name="overall_alpha" transfer-ownership="none">
  1106. <doc xml:space="preserve">overall alpha for source image (0..255)</doc>
  1107. <type name="gint" c:type="int"/>
  1108. </parameter>
  1109. <parameter name="check_size" transfer-ownership="none">
  1110. <doc xml:space="preserve">the size of checks in the checkboard (must be a power of two)</doc>
  1111. <type name="gint" c:type="int"/>
  1112. </parameter>
  1113. <parameter name="color1" transfer-ownership="none">
  1114. <doc xml:space="preserve">the color of check at upper left</doc>
  1115. <type name="guint32" c:type="guint32"/>
  1116. </parameter>
  1117. <parameter name="color2" transfer-ownership="none">
  1118. <doc xml:space="preserve">the color of the other check</doc>
  1119. <type name="guint32" c:type="guint32"/>
  1120. </parameter>
  1121. </parameters>
  1122. </method>
  1123. <method name="copy" c:identifier="gdk_pixbuf_copy">
  1124. <doc xml:space="preserve">Creates a new #GdkPixbuf with a copy of the information in the specified
  1125. @pixbuf.</doc>
  1126. <return-value transfer-ownership="full">
  1127. <doc xml:space="preserve">A newly-created pixbuf with a reference count of 1, or %NULL if
  1128. not enough memory could be allocated.</doc>
  1129. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1130. </return-value>
  1131. <parameters>
  1132. <instance-parameter name="pixbuf" transfer-ownership="none">
  1133. <doc xml:space="preserve">A pixbuf.</doc>
  1134. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1135. </instance-parameter>
  1136. </parameters>
  1137. </method>
  1138. <method name="copy_area" c:identifier="gdk_pixbuf_copy_area">
  1139. <doc xml:space="preserve">Copies a rectangular area from @src_pixbuf to @dest_pixbuf. Conversion of
  1140. pixbuf formats is done automatically.
  1141. If the source rectangle overlaps the destination rectangle on the
  1142. same pixbuf, it will be overwritten during the copy operation.
  1143. Therefore, you can not use this function to scroll a pixbuf.</doc>
  1144. <return-value transfer-ownership="none">
  1145. <type name="none" c:type="void"/>
  1146. </return-value>
  1147. <parameters>
  1148. <instance-parameter name="src_pixbuf" transfer-ownership="none">
  1149. <doc xml:space="preserve">Source pixbuf.</doc>
  1150. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1151. </instance-parameter>
  1152. <parameter name="src_x" transfer-ownership="none">
  1153. <doc xml:space="preserve">Source X coordinate within @src_pixbuf.</doc>
  1154. <type name="gint" c:type="int"/>
  1155. </parameter>
  1156. <parameter name="src_y" transfer-ownership="none">
  1157. <doc xml:space="preserve">Source Y coordinate within @src_pixbuf.</doc>
  1158. <type name="gint" c:type="int"/>
  1159. </parameter>
  1160. <parameter name="width" transfer-ownership="none">
  1161. <doc xml:space="preserve">Width of the area to copy.</doc>
  1162. <type name="gint" c:type="int"/>
  1163. </parameter>
  1164. <parameter name="height" transfer-ownership="none">
  1165. <doc xml:space="preserve">Height of the area to copy.</doc>
  1166. <type name="gint" c:type="int"/>
  1167. </parameter>
  1168. <parameter name="dest_pixbuf" transfer-ownership="none">
  1169. <doc xml:space="preserve">Destination pixbuf.</doc>
  1170. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1171. </parameter>
  1172. <parameter name="dest_x" transfer-ownership="none">
  1173. <doc xml:space="preserve">X coordinate within @dest_pixbuf.</doc>
  1174. <type name="gint" c:type="int"/>
  1175. </parameter>
  1176. <parameter name="dest_y" transfer-ownership="none">
  1177. <doc xml:space="preserve">Y coordinate within @dest_pixbuf.</doc>
  1178. <type name="gint" c:type="int"/>
  1179. </parameter>
  1180. </parameters>
  1181. </method>
  1182. <method name="fill" c:identifier="gdk_pixbuf_fill">
  1183. <doc xml:space="preserve">Clears a pixbuf to the given RGBA value, converting the RGBA value into
  1184. the pixbuf's pixel format. The alpha will be ignored if the pixbuf
  1185. doesn't have an alpha channel.</doc>
  1186. <return-value transfer-ownership="none">
  1187. <type name="none" c:type="void"/>
  1188. </return-value>
  1189. <parameters>
  1190. <instance-parameter name="pixbuf" transfer-ownership="none">
  1191. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1192. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1193. </instance-parameter>
  1194. <parameter name="pixel" transfer-ownership="none">
  1195. <doc xml:space="preserve">RGBA pixel to clear to
  1196. (0xffffffff is opaque white, 0x00000000 transparent black)</doc>
  1197. <type name="guint32" c:type="guint32"/>
  1198. </parameter>
  1199. </parameters>
  1200. </method>
  1201. <method name="flip" c:identifier="gdk_pixbuf_flip" version="2.6">
  1202. <doc xml:space="preserve">Flips a pixbuf horizontally or vertically and returns the
  1203. result in a new pixbuf.</doc>
  1204. <return-value transfer-ownership="full" nullable="1">
  1205. <doc xml:space="preserve">the new #GdkPixbuf, or %NULL
  1206. if not enough memory could be allocated for it.</doc>
  1207. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1208. </return-value>
  1209. <parameters>
  1210. <instance-parameter name="src" transfer-ownership="none">
  1211. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1212. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1213. </instance-parameter>
  1214. <parameter name="horizontal" transfer-ownership="none">
  1215. <doc xml:space="preserve">%TRUE to flip horizontally, %FALSE to flip vertically</doc>
  1216. <type name="gboolean" c:type="gboolean"/>
  1217. </parameter>
  1218. </parameters>
  1219. </method>
  1220. <method name="get_bits_per_sample"
  1221. c:identifier="gdk_pixbuf_get_bits_per_sample">
  1222. <doc xml:space="preserve">Queries the number of bits per color sample in a pixbuf.</doc>
  1223. <return-value transfer-ownership="none">
  1224. <doc xml:space="preserve">Number of bits per color sample.</doc>
  1225. <type name="gint" c:type="int"/>
  1226. </return-value>
  1227. <parameters>
  1228. <instance-parameter name="pixbuf" transfer-ownership="none">
  1229. <doc xml:space="preserve">A pixbuf.</doc>
  1230. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1231. </instance-parameter>
  1232. </parameters>
  1233. </method>
  1234. <method name="get_byte_length"
  1235. c:identifier="gdk_pixbuf_get_byte_length"
  1236. version="2.26">
  1237. <doc xml:space="preserve">Returns the length of the pixel data, in bytes.</doc>
  1238. <return-value transfer-ownership="none">
  1239. <doc xml:space="preserve">The length of the pixel data.</doc>
  1240. <type name="gsize" c:type="gsize"/>
  1241. </return-value>
  1242. <parameters>
  1243. <instance-parameter name="pixbuf" transfer-ownership="none">
  1244. <doc xml:space="preserve">A pixbuf</doc>
  1245. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1246. </instance-parameter>
  1247. </parameters>
  1248. </method>
  1249. <method name="get_colorspace" c:identifier="gdk_pixbuf_get_colorspace">
  1250. <doc xml:space="preserve">Queries the color space of a pixbuf.</doc>
  1251. <return-value transfer-ownership="none">
  1252. <doc xml:space="preserve">Color space.</doc>
  1253. <type name="Colorspace" c:type="GdkColorspace"/>
  1254. </return-value>
  1255. <parameters>
  1256. <instance-parameter name="pixbuf" transfer-ownership="none">
  1257. <doc xml:space="preserve">A pixbuf.</doc>
  1258. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1259. </instance-parameter>
  1260. </parameters>
  1261. </method>
  1262. <method name="get_has_alpha" c:identifier="gdk_pixbuf_get_has_alpha">
  1263. <doc xml:space="preserve">Queries whether a pixbuf has an alpha channel (opacity information).</doc>
  1264. <return-value transfer-ownership="none">
  1265. <doc xml:space="preserve">%TRUE if it has an alpha channel, %FALSE otherwise.</doc>
  1266. <type name="gboolean" c:type="gboolean"/>
  1267. </return-value>
  1268. <parameters>
  1269. <instance-parameter name="pixbuf" transfer-ownership="none">
  1270. <doc xml:space="preserve">A pixbuf.</doc>
  1271. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1272. </instance-parameter>
  1273. </parameters>
  1274. </method>
  1275. <method name="get_height" c:identifier="gdk_pixbuf_get_height">
  1276. <doc xml:space="preserve">Queries the height of a pixbuf.</doc>
  1277. <return-value transfer-ownership="none">
  1278. <doc xml:space="preserve">Height in pixels.</doc>
  1279. <type name="gint" c:type="int"/>
  1280. </return-value>
  1281. <parameters>
  1282. <instance-parameter name="pixbuf" transfer-ownership="none">
  1283. <doc xml:space="preserve">A pixbuf.</doc>
  1284. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1285. </instance-parameter>
  1286. </parameters>
  1287. </method>
  1288. <method name="get_n_channels" c:identifier="gdk_pixbuf_get_n_channels">
  1289. <doc xml:space="preserve">Queries the number of channels of a pixbuf.</doc>
  1290. <return-value transfer-ownership="none">
  1291. <doc xml:space="preserve">Number of channels.</doc>
  1292. <type name="gint" c:type="int"/>
  1293. </return-value>
  1294. <parameters>
  1295. <instance-parameter name="pixbuf" transfer-ownership="none">
  1296. <doc xml:space="preserve">A pixbuf.</doc>
  1297. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1298. </instance-parameter>
  1299. </parameters>
  1300. </method>
  1301. <method name="get_option" c:identifier="gdk_pixbuf_get_option">
  1302. <doc xml:space="preserve">Looks up @key in the list of options that may have been attached to the
  1303. @pixbuf when it was loaded, or that may have been attached by another
  1304. function using gdk_pixbuf_set_option().
  1305. For instance, the ANI loader provides "Title" and "Artist" options.
  1306. The ICO, XBM, and XPM loaders provide "x_hot" and "y_hot" hot-spot
  1307. options for cursor definitions. The PNG loader provides the tEXt ancillary
  1308. chunk key/value pairs as options. Since 2.12, the TIFF and JPEG loaders
  1309. return an "orientation" option string that corresponds to the embedded
  1310. TIFF/Exif orientation tag (if present). Since 2.32, the TIFF loader sets
  1311. the "multipage" option string to "yes" when a multi-page TIFF is loaded.
  1312. Since 2.32 the JPEG and PNG loaders set "x-dpi" and "y-dpi" if the file
  1313. contains image density information in dots per inch.</doc>
  1314. <return-value transfer-ownership="none">
  1315. <doc xml:space="preserve">the value associated with @key. This is a nul-terminated
  1316. string that should not be freed or %NULL if @key was not found.</doc>
  1317. <type name="utf8" c:type="const gchar*"/>
  1318. </return-value>
  1319. <parameters>
  1320. <instance-parameter name="pixbuf" transfer-ownership="none">
  1321. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1322. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1323. </instance-parameter>
  1324. <parameter name="key" transfer-ownership="none">
  1325. <doc xml:space="preserve">a nul-terminated string.</doc>
  1326. <type name="utf8" c:type="const gchar*"/>
  1327. </parameter>
  1328. </parameters>
  1329. </method>
  1330. <method name="get_options"
  1331. c:identifier="gdk_pixbuf_get_options"
  1332. version="2.32">
  1333. <doc xml:space="preserve">Returns a #GHashTable with a list of all the options that may have been
  1334. attached to the @pixbuf when it was loaded, or that may have been
  1335. attached by another function using gdk_pixbuf_set_option().
  1336. See gdk_pixbuf_get_option() for more details.</doc>
  1337. <return-value transfer-ownership="container">
  1338. <doc xml:space="preserve">a #GHashTable of key/values</doc>
  1339. <type name="GLib.HashTable" c:type="GHashTable*">
  1340. <type name="utf8"/>
  1341. <type name="utf8"/>
  1342. </type>
  1343. </return-value>
  1344. <parameters>
  1345. <instance-parameter name="pixbuf" transfer-ownership="none">
  1346. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1347. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1348. </instance-parameter>
  1349. </parameters>
  1350. </method>
  1351. <method name="get_pixels"
  1352. c:identifier="gdk_pixbuf_get_pixels"
  1353. shadowed-by="get_pixels_with_length">
  1354. <doc xml:space="preserve">Queries a pointer to the pixel data of a pixbuf.</doc>
  1355. <return-value transfer-ownership="none">
  1356. <doc xml:space="preserve">A pointer to the pixbuf's pixel data.
  1357. Please see the section on [image data](image-data) for information
  1358. about how the pixel data is stored in memory.
  1359. This function will cause an implicit copy of the pixbuf data if the
  1360. pixbuf was created from read-only data.</doc>
  1361. <array zero-terminated="0" c:type="guchar*">
  1362. <type name="guint8" c:type="guchar"/>
  1363. </array>
  1364. </return-value>
  1365. <parameters>
  1366. <instance-parameter name="pixbuf" transfer-ownership="none">
  1367. <doc xml:space="preserve">A pixbuf.</doc>
  1368. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1369. </instance-parameter>
  1370. </parameters>
  1371. </method>
  1372. <method name="get_pixels_with_length"
  1373. c:identifier="gdk_pixbuf_get_pixels_with_length"
  1374. shadows="get_pixels"
  1375. version="2.26">
  1376. <doc xml:space="preserve">Queries a pointer to the pixel data of a pixbuf.</doc>
  1377. <return-value transfer-ownership="none">
  1378. <doc xml:space="preserve">A pointer to the pixbuf's
  1379. pixel data. Please see the section on [image data](image-data)
  1380. for information about how the pixel data is stored in memory.
  1381. This function will cause an implicit copy of the pixbuf data if the
  1382. pixbuf was created from read-only data.</doc>
  1383. <array length="0" zero-terminated="0" c:type="guchar*">
  1384. <type name="guint8" c:type="guchar"/>
  1385. </array>
  1386. </return-value>
  1387. <parameters>
  1388. <instance-parameter name="pixbuf" transfer-ownership="none">
  1389. <doc xml:space="preserve">A pixbuf.</doc>
  1390. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1391. </instance-parameter>
  1392. <parameter name="length"
  1393. direction="out"
  1394. caller-allocates="0"
  1395. transfer-ownership="full">
  1396. <doc xml:space="preserve">The length of the binary data.</doc>
  1397. <type name="guint" c:type="guint*"/>
  1398. </parameter>
  1399. </parameters>
  1400. </method>
  1401. <method name="get_rowstride" c:identifier="gdk_pixbuf_get_rowstride">
  1402. <doc xml:space="preserve">Queries the rowstride of a pixbuf, which is the number of bytes between
  1403. the start of a row and the start of the next row.</doc>
  1404. <return-value transfer-ownership="none">
  1405. <doc xml:space="preserve">Distance between row starts.</doc>
  1406. <type name="gint" c:type="int"/>
  1407. </return-value>
  1408. <parameters>
  1409. <instance-parameter name="pixbuf" transfer-ownership="none">
  1410. <doc xml:space="preserve">A pixbuf.</doc>
  1411. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1412. </instance-parameter>
  1413. </parameters>
  1414. </method>
  1415. <method name="get_width" c:identifier="gdk_pixbuf_get_width">
  1416. <doc xml:space="preserve">Queries the width of a pixbuf.</doc>
  1417. <return-value transfer-ownership="none">
  1418. <doc xml:space="preserve">Width in pixels.</doc>
  1419. <type name="gint" c:type="int"/>
  1420. </return-value>
  1421. <parameters>
  1422. <instance-parameter name="pixbuf" transfer-ownership="none">
  1423. <doc xml:space="preserve">A pixbuf.</doc>
  1424. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1425. </instance-parameter>
  1426. </parameters>
  1427. </method>
  1428. <method name="new_subpixbuf" c:identifier="gdk_pixbuf_new_subpixbuf">
  1429. <doc xml:space="preserve">Creates a new pixbuf which represents a sub-region of @src_pixbuf.
  1430. The new pixbuf shares its pixels with the original pixbuf, so
  1431. writing to one affects both. The new pixbuf holds a reference to
  1432. @src_pixbuf, so @src_pixbuf will not be finalized until the new
  1433. pixbuf is finalized.
  1434. Note that if @src_pixbuf is read-only, this function will force it
  1435. to be mutable.</doc>
  1436. <return-value transfer-ownership="full">
  1437. <doc xml:space="preserve">a new pixbuf</doc>
  1438. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1439. </return-value>
  1440. <parameters>
  1441. <instance-parameter name="src_pixbuf" transfer-ownership="none">
  1442. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1443. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1444. </instance-parameter>
  1445. <parameter name="src_x" transfer-ownership="none">
  1446. <doc xml:space="preserve">X coord in @src_pixbuf</doc>
  1447. <type name="gint" c:type="int"/>
  1448. </parameter>
  1449. <parameter name="src_y" transfer-ownership="none">
  1450. <doc xml:space="preserve">Y coord in @src_pixbuf</doc>
  1451. <type name="gint" c:type="int"/>
  1452. </parameter>
  1453. <parameter name="width" transfer-ownership="none">
  1454. <doc xml:space="preserve">width of region in @src_pixbuf</doc>
  1455. <type name="gint" c:type="int"/>
  1456. </parameter>
  1457. <parameter name="height" transfer-ownership="none">
  1458. <doc xml:space="preserve">height of region in @src_pixbuf</doc>
  1459. <type name="gint" c:type="int"/>
  1460. </parameter>
  1461. </parameters>
  1462. </method>
  1463. <method name="read_pixel_bytes"
  1464. c:identifier="gdk_pixbuf_read_pixel_bytes"
  1465. version="2.32">
  1466. <return-value transfer-ownership="full">
  1467. <doc xml:space="preserve">A new reference to a read-only copy of
  1468. the pixel data. Note that for mutable pixbufs, this function will
  1469. incur a one-time copy of the pixel data for conversion into the
  1470. returned #GBytes.</doc>
  1471. <type name="GLib.Bytes" c:type="GBytes*"/>
  1472. </return-value>
  1473. <parameters>
  1474. <instance-parameter name="pixbuf" transfer-ownership="none">
  1475. <doc xml:space="preserve">A pixbuf</doc>
  1476. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1477. </instance-parameter>
  1478. </parameters>
  1479. </method>
  1480. <method name="read_pixels"
  1481. c:identifier="gdk_pixbuf_read_pixels"
  1482. version="2.32">
  1483. <doc xml:space="preserve">Returns a read-only pointer to the raw pixel data; must not be
  1484. modified. This function allows skipping the implicit copy that
  1485. must be made if gdk_pixbuf_get_pixels() is called on a read-only
  1486. pixbuf.</doc>
  1487. <return-value transfer-ownership="none">
  1488. <type name="guint8" c:type="const guint8*"/>
  1489. </return-value>
  1490. <parameters>
  1491. <instance-parameter name="pixbuf" transfer-ownership="none">
  1492. <doc xml:space="preserve">A pixbuf</doc>
  1493. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1494. </instance-parameter>
  1495. </parameters>
  1496. </method>
  1497. <method name="ref"
  1498. c:identifier="gdk_pixbuf_ref"
  1499. introspectable="0"
  1500. deprecated="1"
  1501. deprecated-version="2.0">
  1502. <doc xml:space="preserve">Adds a reference to a pixbuf.</doc>
  1503. <doc-deprecated xml:space="preserve">Use g_object_ref().</doc-deprecated>
  1504. <return-value>
  1505. <doc xml:space="preserve">The same as the @pixbuf argument.</doc>
  1506. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1507. </return-value>
  1508. <parameters>
  1509. <instance-parameter name="pixbuf" transfer-ownership="none">
  1510. <doc xml:space="preserve">A pixbuf.</doc>
  1511. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1512. </instance-parameter>
  1513. </parameters>
  1514. </method>
  1515. <method name="rotate_simple"
  1516. c:identifier="gdk_pixbuf_rotate_simple"
  1517. version="2.6">
  1518. <doc xml:space="preserve">Rotates a pixbuf by a multiple of 90 degrees, and returns the
  1519. result in a new pixbuf.</doc>
  1520. <return-value transfer-ownership="full" nullable="1">
  1521. <doc xml:space="preserve">the new #GdkPixbuf, or %NULL
  1522. if not enough memory could be allocated for it.</doc>
  1523. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1524. </return-value>
  1525. <parameters>
  1526. <instance-parameter name="src" transfer-ownership="none">
  1527. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1528. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1529. </instance-parameter>
  1530. <parameter name="angle" transfer-ownership="none">
  1531. <doc xml:space="preserve">the angle to rotate by</doc>
  1532. <type name="PixbufRotation" c:type="GdkPixbufRotation"/>
  1533. </parameter>
  1534. </parameters>
  1535. </method>
  1536. <method name="saturate_and_pixelate"
  1537. c:identifier="gdk_pixbuf_saturate_and_pixelate">
  1538. <doc xml:space="preserve">Modifies saturation and optionally pixelates @src, placing the result in
  1539. @dest. @src and @dest may be the same pixbuf with no ill effects. If
  1540. @saturation is 1.0 then saturation is not changed. If it's less than 1.0,
  1541. saturation is reduced (the image turns toward grayscale); if greater than
  1542. 1.0, saturation is increased (the image gets more vivid colors). If @pixelate
  1543. is %TRUE, then pixels are faded in a checkerboard pattern to create a
  1544. pixelated image. @src and @dest must have the same image format, size, and
  1545. rowstride.</doc>
  1546. <return-value transfer-ownership="none">
  1547. <type name="none" c:type="void"/>
  1548. </return-value>
  1549. <parameters>
  1550. <instance-parameter name="src" transfer-ownership="none">
  1551. <doc xml:space="preserve">source image</doc>
  1552. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  1553. </instance-parameter>
  1554. <parameter name="dest" transfer-ownership="none">
  1555. <doc xml:space="preserve">place to write modified version of @src</doc>
  1556. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1557. </parameter>
  1558. <parameter name="saturation" transfer-ownership="none">
  1559. <doc xml:space="preserve">saturation factor</doc>
  1560. <type name="gfloat" c:type="gfloat"/>
  1561. </parameter>
  1562. <parameter name="pixelate" transfer-ownership="none">
  1563. <doc xml:space="preserve">whether to pixelate</doc>
  1564. <type name="gboolean" c:type="gboolean"/>
  1565. </parameter>
  1566. </parameters>
  1567. </method>
  1568. <method name="save" c:identifier="gdk_pixbuf_save" introspectable="0">
  1569. <doc xml:space="preserve">Saves pixbuf to a file in format @type. By default, "jpeg", "png", "ico"
  1570. and "bmp" are possible file formats to save in, but more formats may be
  1571. installed. The list of all writable formats can be determined in the
  1572. following way:
  1573. |[
  1574. void add_if_writable (GdkPixbufFormat *data, GSList **list)
  1575. {
  1576. if (gdk_pixbuf_format_is_writable (data))
  1577. *list = g_slist_prepend (*list, data);
  1578. }
  1579. GSList *formats = gdk_pixbuf_get_formats ();
  1580. GSList *writable_formats = NULL;
  1581. g_slist_foreach (formats, add_if_writable, &amp;writable_formats);
  1582. g_slist_free (formats);
  1583. ]|
  1584. If @error is set, %FALSE will be returned. Possible errors include
  1585. those in the #GDK_PIXBUF_ERROR domain and those in the #G_FILE_ERROR domain.
  1586. The variable argument list should be %NULL-terminated; if not empty,
  1587. it should contain pairs of strings that modify the save
  1588. parameters. For example:
  1589. |[
  1590. gdk_pixbuf_save (pixbuf, handle, "jpeg", &amp;error, "quality", "100", NULL);
  1591. ]|
  1592. Currently only few parameters exist. JPEG images can be saved with a
  1593. "quality" parameter; its value should be in the range [0,100]. JPEG
  1594. and PNG density can be set by setting the "x-dpi" and "y-dpi" parameters
  1595. to the appropriate values in dots per inch.
  1596. Text chunks can be attached to PNG images by specifying parameters of
  1597. the form "tEXt::key", where key is an ASCII string of length 1-79.
  1598. The values are UTF-8 encoded strings. The PNG compression level can
  1599. be specified using the "compression" parameter; it's value is in an
  1600. integer in the range of [0,9].
  1601. ICC color profiles can also be embedded into PNG, JPEG and TIFF images.
  1602. The "icc-profile" value should be the complete ICC profile encoded
  1603. into base64.
  1604. |[
  1605. gchar *contents;
  1606. gchar *contents_encode;
  1607. gsize length;
  1608. g_file_get_contents ("/home/hughsie/.color/icc/L225W.icm", &amp;contents, &amp;length, NULL);
  1609. contents_encode = g_base64_encode ((const guchar *) contents, length);
  1610. gdk_pixbuf_save (pixbuf, handle, "png", &amp;error, "icc-profile", contents_encode, NULL);
  1611. ]|
  1612. TIFF images recognize: (1) a "bits-per-sample" option (integer) which
  1613. can be either 1 for saving bi-level CCITTFAX4 images, or 8 for saving
  1614. 8-bits per sample; (2) a "compression" option (integer) which can be
  1615. 1 for no compression, 2 for Huffman, 5 for LZW, 7 for JPEG and 8 for
  1616. DEFLATE (see the libtiff documentation and tiff.h for all supported
  1617. codec values); (3) an "icc-profile" option (zero-terminated string)
  1618. containing a base64 encoded ICC color profile.
  1619. ICO images can be saved in depth 16, 24, or 32, by using the "depth"
  1620. parameter. When the ICO saver is given "x_hot" and "y_hot" parameters,
  1621. it produces a CUR instead of an ICO.</doc>
  1622. <return-value transfer-ownership="none">
  1623. <doc xml:space="preserve">whether an error was set</doc>
  1624. <type name="gboolean" c:type="gboolean"/>
  1625. </return-value>
  1626. <parameters>
  1627. <instance-parameter name="pixbuf" transfer-ownership="none">
  1628. <doc xml:space="preserve">a #GdkPixbuf.</doc>
  1629. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1630. </instance-parameter>
  1631. <parameter name="filename" transfer-ownership="none">
  1632. <doc xml:space="preserve">name of file to save.</doc>
  1633. <type name="utf8" c:type="const char*"/>
  1634. </parameter>
  1635. <parameter name="type" transfer-ownership="none">
  1636. <doc xml:space="preserve">name of file format.</doc>
  1637. <type name="utf8" c:type="const char*"/>
  1638. </parameter>
  1639. <parameter name="error"
  1640. transfer-ownership="none"
  1641. nullable="1"
  1642. allow-none="1">
  1643. <doc xml:space="preserve">return location for error, or %NULL</doc>
  1644. <type name="GLib.Error" c:type="GError**"/>
  1645. </parameter>
  1646. <parameter name="..." transfer-ownership="none">
  1647. <doc xml:space="preserve">list of key-value save options, followed by %NULL</doc>
  1648. <varargs/>
  1649. </parameter>
  1650. </parameters>
  1651. </method>
  1652. <method name="save_to_buffer"
  1653. c:identifier="gdk_pixbuf_save_to_buffer"
  1654. version="2.4"
  1655. introspectable="0">
  1656. <doc xml:space="preserve">Saves pixbuf to a new buffer in format @type, which is currently "jpeg",
  1657. "png", "tiff", "ico" or "bmp". This is a convenience function that uses
  1658. gdk_pixbuf_save_to_callback() to do the real work. Note that the buffer
  1659. is not nul-terminated and may contain embedded nuls.
  1660. If @error is set, %FALSE will be returned and @buffer will be set to
  1661. %NULL. Possible errors include those in the #GDK_PIXBUF_ERROR
  1662. domain.
  1663. See gdk_pixbuf_save() for more details.</doc>
  1664. <return-value transfer-ownership="none">
  1665. <doc xml:space="preserve">whether an error was set</doc>
  1666. <type name="gboolean" c:type="gboolean"/>
  1667. </return-value>
  1668. <parameters>
  1669. <instance-parameter name="pixbuf" transfer-ownership="none">
  1670. <doc xml:space="preserve">a #GdkPixbuf.</doc>
  1671. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1672. </instance-parameter>
  1673. <parameter name="buffer"
  1674. direction="out"
  1675. caller-allocates="0"
  1676. transfer-ownership="full">
  1677. <doc xml:space="preserve">location to receive a pointer
  1678. to the new buffer.</doc>
  1679. <array length="1" zero-terminated="0" c:type="gchar**">
  1680. <type name="guint8"/>
  1681. </array>
  1682. </parameter>
  1683. <parameter name="buffer_size"
  1684. direction="out"
  1685. caller-allocates="0"
  1686. transfer-ownership="full">
  1687. <doc xml:space="preserve">location to receive the size of the new buffer.</doc>
  1688. <type name="gsize" c:type="gsize*"/>
  1689. </parameter>
  1690. <parameter name="type" transfer-ownership="none">
  1691. <doc xml:space="preserve">name of file format.</doc>
  1692. <type name="utf8" c:type="const char*"/>
  1693. </parameter>
  1694. <parameter name="error"
  1695. transfer-ownership="none"
  1696. nullable="1"
  1697. allow-none="1">
  1698. <doc xml:space="preserve">return location for error, or %NULL</doc>
  1699. <type name="GLib.Error" c:type="GError**"/>
  1700. </parameter>
  1701. <parameter name="..." transfer-ownership="none">
  1702. <doc xml:space="preserve">list of key-value save options</doc>
  1703. <varargs/>
  1704. </parameter>
  1705. </parameters>
  1706. </method>
  1707. <method name="save_to_bufferv"
  1708. c:identifier="gdk_pixbuf_save_to_bufferv"
  1709. version="2.4"
  1710. throws="1">
  1711. <doc xml:space="preserve">Saves pixbuf to a new buffer in format @type, which is currently "jpeg",
  1712. "tiff", "png", "ico" or "bmp". See gdk_pixbuf_save_to_buffer()
  1713. for more details.</doc>
  1714. <return-value transfer-ownership="none">
  1715. <doc xml:space="preserve">whether an error was set</doc>
  1716. <type name="gboolean" c:type="gboolean"/>
  1717. </return-value>
  1718. <parameters>
  1719. <instance-parameter name="pixbuf" transfer-ownership="none">
  1720. <doc xml:space="preserve">a #GdkPixbuf.</doc>
  1721. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1722. </instance-parameter>
  1723. <parameter name="buffer"
  1724. direction="out"
  1725. caller-allocates="0"
  1726. transfer-ownership="full">
  1727. <doc xml:space="preserve">
  1728. location to receive a pointer to the new buffer.</doc>
  1729. <array length="1" zero-terminated="0" c:type="gchar**">
  1730. <type name="guint8"/>
  1731. </array>
  1732. </parameter>
  1733. <parameter name="buffer_size"
  1734. direction="out"
  1735. caller-allocates="0"
  1736. transfer-ownership="full">
  1737. <doc xml:space="preserve">location to receive the size of the new buffer.</doc>
  1738. <type name="gsize" c:type="gsize*"/>
  1739. </parameter>
  1740. <parameter name="type" transfer-ownership="none">
  1741. <doc xml:space="preserve">name of file format.</doc>
  1742. <type name="utf8" c:type="const char*"/>
  1743. </parameter>
  1744. <parameter name="option_keys" transfer-ownership="none">
  1745. <doc xml:space="preserve">name of options to set, %NULL-terminated</doc>
  1746. <array c:type="char**">
  1747. <type name="utf8" c:type="char*"/>
  1748. </array>
  1749. </parameter>
  1750. <parameter name="option_values" transfer-ownership="none">
  1751. <doc xml:space="preserve">values for named options</doc>
  1752. <array c:type="char**">
  1753. <type name="utf8" c:type="char*"/>
  1754. </array>
  1755. </parameter>
  1756. </parameters>
  1757. </method>
  1758. <method name="save_to_callback"
  1759. c:identifier="gdk_pixbuf_save_to_callback"
  1760. version="2.4"
  1761. introspectable="0">
  1762. <doc xml:space="preserve">Saves pixbuf in format @type by feeding the produced data to a
  1763. callback. Can be used when you want to store the image to something
  1764. other than a file, such as an in-memory buffer or a socket.
  1765. If @error is set, %FALSE will be returned. Possible errors
  1766. include those in the #GDK_PIXBUF_ERROR domain and whatever the save
  1767. function generates.
  1768. See gdk_pixbuf_save() for more details.</doc>
  1769. <return-value transfer-ownership="none">
  1770. <doc xml:space="preserve">whether an error was set</doc>
  1771. <type name="gboolean" c:type="gboolean"/>
  1772. </return-value>
  1773. <parameters>
  1774. <instance-parameter name="pixbuf" transfer-ownership="none">
  1775. <doc xml:space="preserve">a #GdkPixbuf.</doc>
  1776. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1777. </instance-parameter>
  1778. <parameter name="save_func"
  1779. transfer-ownership="none"
  1780. scope="call"
  1781. closure="1">
  1782. <doc xml:space="preserve">a function that is called to save each block of data that
  1783. the save routine generates.</doc>
  1784. <type name="PixbufSaveFunc" c:type="GdkPixbufSaveFunc"/>
  1785. </parameter>
  1786. <parameter name="user_data"
  1787. transfer-ownership="none"
  1788. nullable="1"
  1789. allow-none="1">
  1790. <doc xml:space="preserve">user data to pass to the save function.</doc>
  1791. <type name="gpointer" c:type="gpointer"/>
  1792. </parameter>
  1793. <parameter name="type" transfer-ownership="none">
  1794. <doc xml:space="preserve">name of file format.</doc>
  1795. <type name="utf8" c:type="const char*"/>
  1796. </parameter>
  1797. <parameter name="error"
  1798. transfer-ownership="none"
  1799. nullable="1"
  1800. allow-none="1">
  1801. <doc xml:space="preserve">return location for error, or %NULL</doc>
  1802. <type name="GLib.Error" c:type="GError**"/>
  1803. </parameter>
  1804. <parameter name="..." transfer-ownership="none">
  1805. <doc xml:space="preserve">list of key-value save options</doc>
  1806. <varargs/>
  1807. </parameter>
  1808. </parameters>
  1809. </method>
  1810. <method name="save_to_callbackv"
  1811. c:identifier="gdk_pixbuf_save_to_callbackv"
  1812. version="2.4"
  1813. throws="1">
  1814. <doc xml:space="preserve">Saves pixbuf to a callback in format @type, which is currently "jpeg",
  1815. "png", "tiff", "ico" or "bmp". If @error is set, %FALSE will be returned. See
  1816. gdk_pixbuf_save_to_callback () for more details.</doc>
  1817. <return-value transfer-ownership="none">
  1818. <doc xml:space="preserve">whether an error was set</doc>
  1819. <type name="gboolean" c:type="gboolean"/>
  1820. </return-value>
  1821. <parameters>
  1822. <instance-parameter name="pixbuf" transfer-ownership="none">
  1823. <doc xml:space="preserve">a #GdkPixbuf.</doc>
  1824. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1825. </instance-parameter>
  1826. <parameter name="save_func"
  1827. transfer-ownership="none"
  1828. scope="call"
  1829. closure="1">
  1830. <doc xml:space="preserve">a function that is called to save each block of data that
  1831. the save routine generates.</doc>
  1832. <type name="PixbufSaveFunc" c:type="GdkPixbufSaveFunc"/>
  1833. </parameter>
  1834. <parameter name="user_data"
  1835. transfer-ownership="none"
  1836. nullable="1"
  1837. allow-none="1">
  1838. <doc xml:space="preserve">user data to pass to the save function.</doc>
  1839. <type name="gpointer" c:type="gpointer"/>
  1840. </parameter>
  1841. <parameter name="type" transfer-ownership="none">
  1842. <doc xml:space="preserve">name of file format.</doc>
  1843. <type name="utf8" c:type="const char*"/>
  1844. </parameter>
  1845. <parameter name="option_keys" transfer-ownership="none">
  1846. <doc xml:space="preserve">name of options to set, %NULL-terminated</doc>
  1847. <array c:type="char**">
  1848. <type name="utf8"/>
  1849. </array>
  1850. </parameter>
  1851. <parameter name="option_values" transfer-ownership="none">
  1852. <doc xml:space="preserve">values for named options</doc>
  1853. <array c:type="char**">
  1854. <type name="utf8"/>
  1855. </array>
  1856. </parameter>
  1857. </parameters>
  1858. </method>
  1859. <method name="save_to_stream"
  1860. c:identifier="gdk_pixbuf_save_to_stream"
  1861. version="2.14"
  1862. introspectable="0">
  1863. <doc xml:space="preserve">Saves @pixbuf to an output stream.
  1864. Supported file formats are currently "jpeg", "tiff", "png", "ico" or
  1865. "bmp". See gdk_pixbuf_save_to_buffer() for more details.
  1866. The @cancellable can be used to abort the operation from another
  1867. thread. If the operation was cancelled, the error %G_IO_ERROR_CANCELLED
  1868. will be returned. Other possible errors are in the #GDK_PIXBUF_ERROR
  1869. and %G_IO_ERROR domains.
  1870. The stream is not closed.</doc>
  1871. <return-value transfer-ownership="none">
  1872. <doc xml:space="preserve">%TRUE if the pixbuf was saved successfully, %FALSE if an
  1873. error was set.</doc>
  1874. <type name="gboolean" c:type="gboolean"/>
  1875. </return-value>
  1876. <parameters>
  1877. <instance-parameter name="pixbuf" transfer-ownership="none">
  1878. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1879. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1880. </instance-parameter>
  1881. <parameter name="stream" transfer-ownership="none">
  1882. <doc xml:space="preserve">a #GOutputStream to save the pixbuf to</doc>
  1883. <type name="Gio.OutputStream" c:type="GOutputStream*"/>
  1884. </parameter>
  1885. <parameter name="type" transfer-ownership="none">
  1886. <doc xml:space="preserve">name of file format</doc>
  1887. <type name="utf8" c:type="const char*"/>
  1888. </parameter>
  1889. <parameter name="cancellable"
  1890. transfer-ownership="none"
  1891. nullable="1"
  1892. allow-none="1">
  1893. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  1894. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  1895. </parameter>
  1896. <parameter name="error"
  1897. transfer-ownership="none"
  1898. nullable="1"
  1899. allow-none="1">
  1900. <doc xml:space="preserve">return location for error, or %NULL</doc>
  1901. <type name="GLib.Error" c:type="GError**"/>
  1902. </parameter>
  1903. <parameter name="..." transfer-ownership="none">
  1904. <doc xml:space="preserve">list of key-value save options</doc>
  1905. <varargs/>
  1906. </parameter>
  1907. </parameters>
  1908. </method>
  1909. <method name="save_to_stream_async"
  1910. c:identifier="gdk_pixbuf_save_to_stream_async"
  1911. version="2.24"
  1912. introspectable="0">
  1913. <doc xml:space="preserve">Saves @pixbuf to an output stream asynchronously.
  1914. For more details see gdk_pixbuf_save_to_stream(), which is the synchronous
  1915. version of this function.
  1916. When the operation is finished, @callback will be called in the main thread.
  1917. You can then call gdk_pixbuf_save_to_stream_finish() to get the result of the operation.</doc>
  1918. <return-value transfer-ownership="none">
  1919. <type name="none" c:type="void"/>
  1920. </return-value>
  1921. <parameters>
  1922. <instance-parameter name="pixbuf" transfer-ownership="none">
  1923. <doc xml:space="preserve">a #GdkPixbuf</doc>
  1924. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1925. </instance-parameter>
  1926. <parameter name="stream" transfer-ownership="none">
  1927. <doc xml:space="preserve">a #GOutputStream to which to save the pixbuf</doc>
  1928. <type name="Gio.OutputStream" c:type="GOutputStream*"/>
  1929. </parameter>
  1930. <parameter name="type" transfer-ownership="none">
  1931. <doc xml:space="preserve">name of file format</doc>
  1932. <type name="utf8" c:type="const gchar*"/>
  1933. </parameter>
  1934. <parameter name="cancellable"
  1935. transfer-ownership="none"
  1936. nullable="1"
  1937. allow-none="1">
  1938. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  1939. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  1940. </parameter>
  1941. <parameter name="callback"
  1942. transfer-ownership="none"
  1943. nullable="1"
  1944. allow-none="1"
  1945. scope="async"
  1946. closure="4">
  1947. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the the pixbuf is loaded</doc>
  1948. <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  1949. </parameter>
  1950. <parameter name="user_data"
  1951. transfer-ownership="none"
  1952. nullable="1"
  1953. allow-none="1">
  1954. <doc xml:space="preserve">the data to pass to the callback function</doc>
  1955. <type name="gpointer" c:type="gpointer"/>
  1956. </parameter>
  1957. <parameter name="..." transfer-ownership="none">
  1958. <doc xml:space="preserve">list of key-value save options</doc>
  1959. <varargs/>
  1960. </parameter>
  1961. </parameters>
  1962. </method>
  1963. <method name="savev" c:identifier="gdk_pixbuf_savev" throws="1">
  1964. <doc xml:space="preserve">Saves pixbuf to a file in @type, which is currently "jpeg", "png", "tiff", "ico" or "bmp".
  1965. If @error is set, %FALSE will be returned.
  1966. See gdk_pixbuf_save () for more details.</doc>
  1967. <return-value transfer-ownership="none">
  1968. <doc xml:space="preserve">whether an error was set</doc>
  1969. <type name="gboolean" c:type="gboolean"/>
  1970. </return-value>
  1971. <parameters>
  1972. <instance-parameter name="pixbuf" transfer-ownership="none">
  1973. <doc xml:space="preserve">a #GdkPixbuf.</doc>
  1974. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  1975. </instance-parameter>
  1976. <parameter name="filename" transfer-ownership="none">
  1977. <doc xml:space="preserve">name of file to save.</doc>
  1978. <type name="utf8" c:type="const char*"/>
  1979. </parameter>
  1980. <parameter name="type" transfer-ownership="none">
  1981. <doc xml:space="preserve">name of file format.</doc>
  1982. <type name="utf8" c:type="const char*"/>
  1983. </parameter>
  1984. <parameter name="option_keys" transfer-ownership="none">
  1985. <doc xml:space="preserve">name of options to set, %NULL-terminated</doc>
  1986. <array c:type="char**">
  1987. <type name="utf8" c:type="char*"/>
  1988. </array>
  1989. </parameter>
  1990. <parameter name="option_values" transfer-ownership="none">
  1991. <doc xml:space="preserve">values for named options</doc>
  1992. <array c:type="char**">
  1993. <type name="utf8" c:type="char*"/>
  1994. </array>
  1995. </parameter>
  1996. </parameters>
  1997. </method>
  1998. <method name="scale" c:identifier="gdk_pixbuf_scale">
  1999. <doc xml:space="preserve">Creates a transformation of the source image @src by scaling by
  2000. @scale_x and @scale_y then translating by @offset_x and @offset_y,
  2001. then renders the rectangle (@dest_x, @dest_y, @dest_width,
  2002. @dest_height) of the resulting image onto the destination image
  2003. replacing the previous contents.
  2004. Try to use gdk_pixbuf_scale_simple() first, this function is
  2005. the industrial-strength power tool you can fall back to if
  2006. gdk_pixbuf_scale_simple() isn't powerful enough.
  2007. If the source rectangle overlaps the destination rectangle on the
  2008. same pixbuf, it will be overwritten during the scaling which
  2009. results in rendering artifacts.</doc>
  2010. <return-value transfer-ownership="none">
  2011. <type name="none" c:type="void"/>
  2012. </return-value>
  2013. <parameters>
  2014. <instance-parameter name="src" transfer-ownership="none">
  2015. <doc xml:space="preserve">a #GdkPixbuf</doc>
  2016. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  2017. </instance-parameter>
  2018. <parameter name="dest" transfer-ownership="none">
  2019. <doc xml:space="preserve">the #GdkPixbuf into which to render the results</doc>
  2020. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  2021. </parameter>
  2022. <parameter name="dest_x" transfer-ownership="none">
  2023. <doc xml:space="preserve">the left coordinate for region to render</doc>
  2024. <type name="gint" c:type="int"/>
  2025. </parameter>
  2026. <parameter name="dest_y" transfer-ownership="none">
  2027. <doc xml:space="preserve">the top coordinate for region to render</doc>
  2028. <type name="gint" c:type="int"/>
  2029. </parameter>
  2030. <parameter name="dest_width" transfer-ownership="none">
  2031. <doc xml:space="preserve">the width of the region to render</doc>
  2032. <type name="gint" c:type="int"/>
  2033. </parameter>
  2034. <parameter name="dest_height" transfer-ownership="none">
  2035. <doc xml:space="preserve">the height of the region to render</doc>
  2036. <type name="gint" c:type="int"/>
  2037. </parameter>
  2038. <parameter name="offset_x" transfer-ownership="none">
  2039. <doc xml:space="preserve">the offset in the X direction (currently rounded to an integer)</doc>
  2040. <type name="gdouble" c:type="double"/>
  2041. </parameter>
  2042. <parameter name="offset_y" transfer-ownership="none">
  2043. <doc xml:space="preserve">the offset in the Y direction (currently rounded to an integer)</doc>
  2044. <type name="gdouble" c:type="double"/>
  2045. </parameter>
  2046. <parameter name="scale_x" transfer-ownership="none">
  2047. <doc xml:space="preserve">the scale factor in the X direction</doc>
  2048. <type name="gdouble" c:type="double"/>
  2049. </parameter>
  2050. <parameter name="scale_y" transfer-ownership="none">
  2051. <doc xml:space="preserve">the scale factor in the Y direction</doc>
  2052. <type name="gdouble" c:type="double"/>
  2053. </parameter>
  2054. <parameter name="interp_type" transfer-ownership="none">
  2055. <doc xml:space="preserve">the interpolation type for the transformation.</doc>
  2056. <type name="InterpType" c:type="GdkInterpType"/>
  2057. </parameter>
  2058. </parameters>
  2059. </method>
  2060. <method name="scale_simple" c:identifier="gdk_pixbuf_scale_simple">
  2061. <doc xml:space="preserve">Create a new #GdkPixbuf containing a copy of @src scaled to
  2062. @dest_width x @dest_height. Leaves @src unaffected. @interp_type
  2063. should be #GDK_INTERP_NEAREST if you want maximum speed (but when
  2064. scaling down #GDK_INTERP_NEAREST is usually unusably ugly). The
  2065. default @interp_type should be #GDK_INTERP_BILINEAR which offers
  2066. reasonable quality and speed.
  2067. You can scale a sub-portion of @src by creating a sub-pixbuf
  2068. pointing into @src; see gdk_pixbuf_new_subpixbuf().
  2069. For more complicated scaling/compositing see gdk_pixbuf_scale()
  2070. and gdk_pixbuf_composite().</doc>
  2071. <return-value transfer-ownership="full">
  2072. <doc xml:space="preserve">the new #GdkPixbuf, or %NULL if not enough memory could be
  2073. allocated for it.</doc>
  2074. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  2075. </return-value>
  2076. <parameters>
  2077. <instance-parameter name="src" transfer-ownership="none">
  2078. <doc xml:space="preserve">a #GdkPixbuf</doc>
  2079. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  2080. </instance-parameter>
  2081. <parameter name="dest_width" transfer-ownership="none">
  2082. <doc xml:space="preserve">the width of destination image</doc>
  2083. <type name="gint" c:type="int"/>
  2084. </parameter>
  2085. <parameter name="dest_height" transfer-ownership="none">
  2086. <doc xml:space="preserve">the height of destination image</doc>
  2087. <type name="gint" c:type="int"/>
  2088. </parameter>
  2089. <parameter name="interp_type" transfer-ownership="none">
  2090. <doc xml:space="preserve">the interpolation type for the transformation.</doc>
  2091. <type name="InterpType" c:type="GdkInterpType"/>
  2092. </parameter>
  2093. </parameters>
  2094. </method>
  2095. <method name="unref"
  2096. c:identifier="gdk_pixbuf_unref"
  2097. introspectable="0"
  2098. deprecated="1"
  2099. deprecated-version="2.0">
  2100. <doc xml:space="preserve">Removes a reference from a pixbuf.</doc>
  2101. <doc-deprecated xml:space="preserve">Use g_object_unref().</doc-deprecated>
  2102. <return-value transfer-ownership="none">
  2103. <type name="none" c:type="void"/>
  2104. </return-value>
  2105. <parameters>
  2106. <instance-parameter name="pixbuf" transfer-ownership="none">
  2107. <doc xml:space="preserve">A pixbuf.</doc>
  2108. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  2109. </instance-parameter>
  2110. </parameters>
  2111. </method>
  2112. <property name="bits-per-sample"
  2113. writable="1"
  2114. construct-only="1"
  2115. transfer-ownership="none">
  2116. <doc xml:space="preserve">The number of bits per sample.
  2117. Currently only 8 bit per sample are supported.</doc>
  2118. <type name="gint" c:type="gint"/>
  2119. </property>
  2120. <property name="colorspace"
  2121. writable="1"
  2122. construct-only="1"
  2123. transfer-ownership="none">
  2124. <type name="Colorspace"/>
  2125. </property>
  2126. <property name="has-alpha"
  2127. writable="1"
  2128. construct-only="1"
  2129. transfer-ownership="none">
  2130. <type name="gboolean" c:type="gboolean"/>
  2131. </property>
  2132. <property name="height"
  2133. writable="1"
  2134. construct-only="1"
  2135. transfer-ownership="none">
  2136. <type name="gint" c:type="gint"/>
  2137. </property>
  2138. <property name="n-channels"
  2139. writable="1"
  2140. construct-only="1"
  2141. transfer-ownership="none">
  2142. <doc xml:space="preserve">The number of samples per pixel.
  2143. Currently, only 3 or 4 samples per pixel are supported.</doc>
  2144. <type name="gint" c:type="gint"/>
  2145. </property>
  2146. <property name="pixel-bytes"
  2147. writable="1"
  2148. construct-only="1"
  2149. transfer-ownership="none">
  2150. <type name="GLib.Bytes"/>
  2151. </property>
  2152. <property name="pixels"
  2153. writable="1"
  2154. construct-only="1"
  2155. transfer-ownership="none">
  2156. <type name="gpointer" c:type="gpointer"/>
  2157. </property>
  2158. <property name="rowstride"
  2159. writable="1"
  2160. construct-only="1"
  2161. transfer-ownership="none">
  2162. <doc xml:space="preserve">The number of bytes between the start of a row and
  2163. the start of the next row. This number must (obviously)
  2164. be at least as large as the width of the pixbuf.</doc>
  2165. <type name="gint" c:type="gint"/>
  2166. </property>
  2167. <property name="width"
  2168. writable="1"
  2169. construct-only="1"
  2170. transfer-ownership="none">
  2171. <type name="gint" c:type="gint"/>
  2172. </property>
  2173. </class>
  2174. <enumeration name="PixbufAlphaMode"
  2175. glib:type-name="GdkPixbufAlphaMode"
  2176. glib:get-type="gdk_pixbuf_alpha_mode_get_type"
  2177. c:type="GdkPixbufAlphaMode">
  2178. <doc xml:space="preserve">These values can be passed to
  2179. gdk_pixbuf_render_to_drawable_alpha() to control how the alpha
  2180. channel of an image should be handled. This function can create a
  2181. bilevel clipping mask (black and white) and use it while painting
  2182. the image. In the future, when the X Window System gets an alpha
  2183. channel extension, it will be possible to do full alpha
  2184. compositing onto arbitrary drawables. For now both cases fall
  2185. back to a bilevel clipping mask.</doc>
  2186. <member name="bilevel"
  2187. value="0"
  2188. c:identifier="GDK_PIXBUF_ALPHA_BILEVEL"
  2189. glib:nick="bilevel">
  2190. <doc xml:space="preserve">A bilevel clipping mask (black and white)
  2191. will be created and used to draw the image. Pixels below 0.5 opacity
  2192. will be considered fully transparent, and all others will be
  2193. considered fully opaque.</doc>
  2194. </member>
  2195. <member name="full"
  2196. value="1"
  2197. c:identifier="GDK_PIXBUF_ALPHA_FULL"
  2198. glib:nick="full">
  2199. <doc xml:space="preserve">For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL.
  2200. In the future it will do full alpha compositing.</doc>
  2201. </member>
  2202. </enumeration>
  2203. <class name="PixbufAnimation"
  2204. c:symbol-prefix="pixbuf_animation"
  2205. c:type="GdkPixbufAnimation"
  2206. parent="GObject.Object"
  2207. glib:type-name="GdkPixbufAnimation"
  2208. glib:get-type="gdk_pixbuf_animation_get_type">
  2209. <doc xml:space="preserve">An opaque struct representing an animation.</doc>
  2210. <constructor name="new_from_file"
  2211. c:identifier="gdk_pixbuf_animation_new_from_file"
  2212. throws="1">
  2213. <doc xml:space="preserve">Creates a new animation by loading it from a file. The file format is
  2214. detected automatically. If the file's format does not support multi-frame
  2215. images, then an animation with a single frame will be created. Possible errors
  2216. are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains.</doc>
  2217. <return-value transfer-ownership="full">
  2218. <doc xml:space="preserve">A newly-created animation with a reference count of 1, or %NULL
  2219. if any of several error conditions ocurred: the file could not be opened,
  2220. there was no loader for the file's format, there was not enough memory to
  2221. allocate the image buffer, or the image file contained invalid data.</doc>
  2222. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2223. </return-value>
  2224. <parameters>
  2225. <parameter name="filename" transfer-ownership="none">
  2226. <doc xml:space="preserve">Name of file to load, in the GLib file name encoding</doc>
  2227. <type name="utf8" c:type="const char*"/>
  2228. </parameter>
  2229. </parameters>
  2230. </constructor>
  2231. <constructor name="new_from_resource"
  2232. c:identifier="gdk_pixbuf_animation_new_from_resource"
  2233. version="2.28"
  2234. throws="1">
  2235. <doc xml:space="preserve">Creates a new pixbuf animation by loading an image from an resource.
  2236. The file format is detected automatically. If %NULL is returned, then
  2237. @error will be set.</doc>
  2238. <return-value transfer-ownership="full">
  2239. <doc xml:space="preserve">A newly-created animation, or %NULL if any of several error
  2240. conditions occurred: the file could not be opened, the image format is
  2241. not supported, there was not enough memory to allocate the image buffer,
  2242. the stream contained invalid data, or the operation was cancelled.</doc>
  2243. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2244. </return-value>
  2245. <parameters>
  2246. <parameter name="resource_path" transfer-ownership="none">
  2247. <doc xml:space="preserve">the path of the resource file</doc>
  2248. <type name="utf8" c:type="const char*"/>
  2249. </parameter>
  2250. </parameters>
  2251. </constructor>
  2252. <constructor name="new_from_stream"
  2253. c:identifier="gdk_pixbuf_animation_new_from_stream"
  2254. version="2.28"
  2255. throws="1">
  2256. <doc xml:space="preserve">Creates a new animation by loading it from an input stream.
  2257. The file format is detected automatically. If %NULL is returned, then
  2258. @error will be set. The @cancellable can be used to abort the operation
  2259. from another thread. If the operation was cancelled, the error
  2260. %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in
  2261. the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains.
  2262. The stream is not closed.</doc>
  2263. <return-value transfer-ownership="full">
  2264. <doc xml:space="preserve">A newly-created pixbuf, or %NULL if any of several error
  2265. conditions occurred: the file could not be opened, the image format is
  2266. not supported, there was not enough memory to allocate the image buffer,
  2267. the stream contained invalid data, or the operation was cancelled.</doc>
  2268. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2269. </return-value>
  2270. <parameters>
  2271. <parameter name="stream" transfer-ownership="none">
  2272. <doc xml:space="preserve">a #GInputStream to load the pixbuf from</doc>
  2273. <type name="Gio.InputStream" c:type="GInputStream*"/>
  2274. </parameter>
  2275. <parameter name="cancellable"
  2276. transfer-ownership="none"
  2277. nullable="1"
  2278. allow-none="1">
  2279. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  2280. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  2281. </parameter>
  2282. </parameters>
  2283. </constructor>
  2284. <constructor name="new_from_stream_finish"
  2285. c:identifier="gdk_pixbuf_animation_new_from_stream_finish"
  2286. version="2.28"
  2287. throws="1">
  2288. <doc xml:space="preserve">Finishes an asynchronous pixbuf animation creation operation started with
  2289. gdk_pixbuf_animation_new_from_stream_async().</doc>
  2290. <return-value transfer-ownership="full">
  2291. <doc xml:space="preserve">a #GdkPixbufAnimation or %NULL on error. Free the returned
  2292. object with g_object_unref().</doc>
  2293. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2294. </return-value>
  2295. <parameters>
  2296. <parameter name="async_result" transfer-ownership="none">
  2297. <doc xml:space="preserve">a #GAsyncResult</doc>
  2298. <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
  2299. </parameter>
  2300. </parameters>
  2301. </constructor>
  2302. <function name="new_from_stream_async"
  2303. c:identifier="gdk_pixbuf_animation_new_from_stream_async"
  2304. version="2.28">
  2305. <doc xml:space="preserve">Creates a new animation by asynchronously loading an image from an input stream.
  2306. For more details see gdk_pixbuf_new_from_stream(), which is the synchronous
  2307. version of this function.
  2308. When the operation is finished, @callback will be called in the main thread.
  2309. You can then call gdk_pixbuf_animation_new_from_stream_finish() to get the
  2310. result of the operation.</doc>
  2311. <return-value transfer-ownership="none">
  2312. <type name="none" c:type="void"/>
  2313. </return-value>
  2314. <parameters>
  2315. <parameter name="stream" transfer-ownership="none">
  2316. <doc xml:space="preserve">a #GInputStream from which to load the animation</doc>
  2317. <type name="Gio.InputStream" c:type="GInputStream*"/>
  2318. </parameter>
  2319. <parameter name="cancellable"
  2320. transfer-ownership="none"
  2321. nullable="1"
  2322. allow-none="1">
  2323. <doc xml:space="preserve">optional #GCancellable object, %NULL to ignore</doc>
  2324. <type name="Gio.Cancellable" c:type="GCancellable*"/>
  2325. </parameter>
  2326. <parameter name="callback"
  2327. transfer-ownership="none"
  2328. nullable="1"
  2329. allow-none="1"
  2330. scope="async"
  2331. closure="3">
  2332. <doc xml:space="preserve">a #GAsyncReadyCallback to call when the the pixbuf is loaded</doc>
  2333. <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
  2334. </parameter>
  2335. <parameter name="user_data"
  2336. transfer-ownership="none"
  2337. nullable="1"
  2338. allow-none="1">
  2339. <doc xml:space="preserve">the data to pass to the callback function</doc>
  2340. <type name="gpointer" c:type="gpointer"/>
  2341. </parameter>
  2342. </parameters>
  2343. </function>
  2344. <method name="get_height" c:identifier="gdk_pixbuf_animation_get_height">
  2345. <doc xml:space="preserve">Queries the height of the bounding box of a pixbuf animation.</doc>
  2346. <return-value transfer-ownership="none">
  2347. <doc xml:space="preserve">Height of the bounding box of the animation.</doc>
  2348. <type name="gint" c:type="int"/>
  2349. </return-value>
  2350. <parameters>
  2351. <instance-parameter name="animation" transfer-ownership="none">
  2352. <doc xml:space="preserve">An animation.</doc>
  2353. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2354. </instance-parameter>
  2355. </parameters>
  2356. </method>
  2357. <method name="get_iter" c:identifier="gdk_pixbuf_animation_get_iter">
  2358. <doc xml:space="preserve">Get an iterator for displaying an animation. The iterator provides
  2359. the frames that should be displayed at a given time. It should be
  2360. freed after use with g_object_unref().
  2361. @start_time would normally come from g_get_current_time(), and marks
  2362. the beginning of animation playback. After creating an iterator, you
  2363. should immediately display the pixbuf returned by
  2364. gdk_pixbuf_animation_iter_get_pixbuf(). Then, you should install
  2365. a timeout (with g_timeout_add()) or by some other mechanism ensure
  2366. that you'll update the image after
  2367. gdk_pixbuf_animation_iter_get_delay_time() milliseconds. Each time
  2368. the image is updated, you should reinstall the timeout with the new,
  2369. possibly-changed delay time.
  2370. As a shortcut, if @start_time is %NULL, the result of
  2371. g_get_current_time() will be used automatically.
  2372. To update the image (i.e. possibly change the result of
  2373. gdk_pixbuf_animation_iter_get_pixbuf() to a new frame of the animation),
  2374. call gdk_pixbuf_animation_iter_advance().
  2375. If you're using #GdkPixbufLoader, in addition to updating the image
  2376. after the delay time, you should also update it whenever you
  2377. receive the area_updated signal and
  2378. gdk_pixbuf_animation_iter_on_currently_loading_frame() returns
  2379. %TRUE. In this case, the frame currently being fed into the loader
  2380. has received new data, so needs to be refreshed. The delay time for
  2381. a frame may also be modified after an area_updated signal, for
  2382. example if the delay time for a frame is encoded in the data after
  2383. the frame itself. So your timeout should be reinstalled after any
  2384. area_updated signal.
  2385. A delay time of -1 is possible, indicating "infinite."</doc>
  2386. <return-value transfer-ownership="full">
  2387. <doc xml:space="preserve">an iterator to move over the animation</doc>
  2388. <type name="PixbufAnimationIter" c:type="GdkPixbufAnimationIter*"/>
  2389. </return-value>
  2390. <parameters>
  2391. <instance-parameter name="animation" transfer-ownership="none">
  2392. <doc xml:space="preserve">a #GdkPixbufAnimation</doc>
  2393. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2394. </instance-parameter>
  2395. <parameter name="start_time"
  2396. transfer-ownership="none"
  2397. nullable="1"
  2398. allow-none="1">
  2399. <doc xml:space="preserve">time when the animation starts playing</doc>
  2400. <type name="GLib.TimeVal" c:type="const GTimeVal*"/>
  2401. </parameter>
  2402. </parameters>
  2403. </method>
  2404. <method name="get_static_image"
  2405. c:identifier="gdk_pixbuf_animation_get_static_image">
  2406. <doc xml:space="preserve">If an animation is really just a plain image (has only one frame),
  2407. this function returns that image. If the animation is an animation,
  2408. this function returns a reasonable thing to display as a static
  2409. unanimated image, which might be the first frame, or something more
  2410. sophisticated. If an animation hasn't loaded any frames yet, this
  2411. function will return %NULL.</doc>
  2412. <return-value transfer-ownership="none">
  2413. <doc xml:space="preserve">unanimated image representing the animation</doc>
  2414. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  2415. </return-value>
  2416. <parameters>
  2417. <instance-parameter name="animation" transfer-ownership="none">
  2418. <doc xml:space="preserve">a #GdkPixbufAnimation</doc>
  2419. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2420. </instance-parameter>
  2421. </parameters>
  2422. </method>
  2423. <method name="get_width" c:identifier="gdk_pixbuf_animation_get_width">
  2424. <doc xml:space="preserve">Queries the width of the bounding box of a pixbuf animation.</doc>
  2425. <return-value transfer-ownership="none">
  2426. <doc xml:space="preserve">Width of the bounding box of the animation.</doc>
  2427. <type name="gint" c:type="int"/>
  2428. </return-value>
  2429. <parameters>
  2430. <instance-parameter name="animation" transfer-ownership="none">
  2431. <doc xml:space="preserve">An animation.</doc>
  2432. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2433. </instance-parameter>
  2434. </parameters>
  2435. </method>
  2436. <method name="is_static_image"
  2437. c:identifier="gdk_pixbuf_animation_is_static_image">
  2438. <doc xml:space="preserve">If you load a file with gdk_pixbuf_animation_new_from_file() and it
  2439. turns out to be a plain, unanimated image, then this function will
  2440. return %TRUE. Use gdk_pixbuf_animation_get_static_image() to retrieve
  2441. the image.</doc>
  2442. <return-value transfer-ownership="none">
  2443. <doc xml:space="preserve">%TRUE if the "animation" was really just an image</doc>
  2444. <type name="gboolean" c:type="gboolean"/>
  2445. </return-value>
  2446. <parameters>
  2447. <instance-parameter name="animation" transfer-ownership="none">
  2448. <doc xml:space="preserve">a #GdkPixbufAnimation</doc>
  2449. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2450. </instance-parameter>
  2451. </parameters>
  2452. </method>
  2453. <method name="ref"
  2454. c:identifier="gdk_pixbuf_animation_ref"
  2455. introspectable="0"
  2456. deprecated="1"
  2457. deprecated-version="2.0">
  2458. <doc xml:space="preserve">Adds a reference to an animation.</doc>
  2459. <doc-deprecated xml:space="preserve">Use g_object_ref().</doc-deprecated>
  2460. <return-value>
  2461. <doc xml:space="preserve">The same as the @animation argument.</doc>
  2462. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2463. </return-value>
  2464. <parameters>
  2465. <instance-parameter name="animation" transfer-ownership="none">
  2466. <doc xml:space="preserve">An animation.</doc>
  2467. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2468. </instance-parameter>
  2469. </parameters>
  2470. </method>
  2471. <method name="unref"
  2472. c:identifier="gdk_pixbuf_animation_unref"
  2473. introspectable="0"
  2474. deprecated="1"
  2475. deprecated-version="2.0">
  2476. <doc xml:space="preserve">Removes a reference from an animation.</doc>
  2477. <doc-deprecated xml:space="preserve">Use g_object_unref().</doc-deprecated>
  2478. <return-value transfer-ownership="none">
  2479. <type name="none" c:type="void"/>
  2480. </return-value>
  2481. <parameters>
  2482. <instance-parameter name="animation" transfer-ownership="none">
  2483. <doc xml:space="preserve">An animation.</doc>
  2484. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  2485. </instance-parameter>
  2486. </parameters>
  2487. </method>
  2488. </class>
  2489. <class name="PixbufAnimationIter"
  2490. c:symbol-prefix="pixbuf_animation_iter"
  2491. c:type="GdkPixbufAnimationIter"
  2492. parent="GObject.Object"
  2493. glib:type-name="GdkPixbufAnimationIter"
  2494. glib:get-type="gdk_pixbuf_animation_iter_get_type">
  2495. <doc xml:space="preserve">An opaque struct representing an iterator which points to a
  2496. certain position in an animation.</doc>
  2497. <method name="advance" c:identifier="gdk_pixbuf_animation_iter_advance">
  2498. <doc xml:space="preserve">Possibly advances an animation to a new frame. Chooses the frame based
  2499. on the start time passed to gdk_pixbuf_animation_get_iter().
  2500. @current_time would normally come from g_get_current_time(), and
  2501. must be greater than or equal to the time passed to
  2502. gdk_pixbuf_animation_get_iter(), and must increase or remain
  2503. unchanged each time gdk_pixbuf_animation_iter_get_pixbuf() is
  2504. called. That is, you can't go backward in time; animations only
  2505. play forward.
  2506. As a shortcut, pass %NULL for the current time and g_get_current_time()
  2507. will be invoked on your behalf. So you only need to explicitly pass
  2508. @current_time if you're doing something odd like playing the animation
  2509. at double speed.
  2510. If this function returns %FALSE, there's no need to update the animation
  2511. display, assuming the display had been rendered prior to advancing;
  2512. if %TRUE, you need to call gdk_pixbuf_animation_iter_get_pixbuf()
  2513. and update the display with the new pixbuf.</doc>
  2514. <return-value transfer-ownership="none">
  2515. <doc xml:space="preserve">%TRUE if the image may need updating</doc>
  2516. <type name="gboolean" c:type="gboolean"/>
  2517. </return-value>
  2518. <parameters>
  2519. <instance-parameter name="iter" transfer-ownership="none">
  2520. <doc xml:space="preserve">a #GdkPixbufAnimationIter</doc>
  2521. <type name="PixbufAnimationIter" c:type="GdkPixbufAnimationIter*"/>
  2522. </instance-parameter>
  2523. <parameter name="current_time"
  2524. transfer-ownership="none"
  2525. nullable="1"
  2526. allow-none="1">
  2527. <doc xml:space="preserve">current time</doc>
  2528. <type name="GLib.TimeVal" c:type="const GTimeVal*"/>
  2529. </parameter>
  2530. </parameters>
  2531. </method>
  2532. <method name="get_delay_time"
  2533. c:identifier="gdk_pixbuf_animation_iter_get_delay_time">
  2534. <doc xml:space="preserve">Gets the number of milliseconds the current pixbuf should be displayed,
  2535. or -1 if the current pixbuf should be displayed forever. g_timeout_add()
  2536. conveniently takes a timeout in milliseconds, so you can use a timeout
  2537. to schedule the next update.
  2538. Note that some formats, like GIF, might clamp the timeout values in the
  2539. image file to avoid updates that are just too quick. The minimum timeout
  2540. for GIF images is currently 20 milliseconds.</doc>
  2541. <return-value transfer-ownership="none">
  2542. <doc xml:space="preserve">delay time in milliseconds (thousandths of a second)</doc>
  2543. <type name="gint" c:type="int"/>
  2544. </return-value>
  2545. <parameters>
  2546. <instance-parameter name="iter" transfer-ownership="none">
  2547. <doc xml:space="preserve">an animation iterator</doc>
  2548. <type name="PixbufAnimationIter" c:type="GdkPixbufAnimationIter*"/>
  2549. </instance-parameter>
  2550. </parameters>
  2551. </method>
  2552. <method name="get_pixbuf"
  2553. c:identifier="gdk_pixbuf_animation_iter_get_pixbuf">
  2554. <doc xml:space="preserve">Gets the current pixbuf which should be displayed; the pixbuf might not
  2555. be the same size as the animation itself
  2556. (gdk_pixbuf_animation_get_width(), gdk_pixbuf_animation_get_height()).
  2557. This pixbuf should be displayed for
  2558. gdk_pixbuf_animation_iter_get_delay_time() milliseconds. The caller
  2559. of this function does not own a reference to the returned pixbuf;
  2560. the returned pixbuf will become invalid when the iterator advances
  2561. to the next frame, which may happen anytime you call
  2562. gdk_pixbuf_animation_iter_advance(). Copy the pixbuf to keep it
  2563. (don't just add a reference), as it may get recycled as you advance
  2564. the iterator.</doc>
  2565. <return-value transfer-ownership="none">
  2566. <doc xml:space="preserve">the pixbuf to be displayed</doc>
  2567. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  2568. </return-value>
  2569. <parameters>
  2570. <instance-parameter name="iter" transfer-ownership="none">
  2571. <doc xml:space="preserve">an animation iterator</doc>
  2572. <type name="PixbufAnimationIter" c:type="GdkPixbufAnimationIter*"/>
  2573. </instance-parameter>
  2574. </parameters>
  2575. </method>
  2576. <method name="on_currently_loading_frame"
  2577. c:identifier="gdk_pixbuf_animation_iter_on_currently_loading_frame">
  2578. <doc xml:space="preserve">Used to determine how to respond to the area_updated signal on
  2579. #GdkPixbufLoader when loading an animation. area_updated is emitted
  2580. for an area of the frame currently streaming in to the loader. So if
  2581. you're on the currently loading frame, you need to redraw the screen for
  2582. the updated area.</doc>
  2583. <return-value transfer-ownership="none">
  2584. <doc xml:space="preserve">%TRUE if the frame we're on is partially loaded, or the last frame</doc>
  2585. <type name="gboolean" c:type="gboolean"/>
  2586. </return-value>
  2587. <parameters>
  2588. <instance-parameter name="iter" transfer-ownership="none">
  2589. <doc xml:space="preserve">a #GdkPixbufAnimationIter</doc>
  2590. <type name="PixbufAnimationIter" c:type="GdkPixbufAnimationIter*"/>
  2591. </instance-parameter>
  2592. </parameters>
  2593. </method>
  2594. </class>
  2595. <callback name="PixbufDestroyNotify" c:type="GdkPixbufDestroyNotify">
  2596. <doc xml:space="preserve">A function of this type is responsible for freeing the pixel array
  2597. of a pixbuf. The gdk_pixbuf_new_from_data() function lets you
  2598. pass in a pre-allocated pixel array so that a pixbuf can be
  2599. created from it; in this case you will need to pass in a function
  2600. of #GdkPixbufDestroyNotify so that the pixel data can be freed
  2601. when the pixbuf is finalized.</doc>
  2602. <return-value transfer-ownership="none">
  2603. <type name="none" c:type="void"/>
  2604. </return-value>
  2605. <parameters>
  2606. <parameter name="pixels" transfer-ownership="none">
  2607. <doc xml:space="preserve">The pixel array of the pixbuf
  2608. that is being finalized.</doc>
  2609. <array zero-terminated="0" c:type="guchar*">
  2610. <type name="guint8"/>
  2611. </array>
  2612. </parameter>
  2613. <parameter name="data"
  2614. transfer-ownership="none"
  2615. nullable="1"
  2616. allow-none="1"
  2617. closure="1">
  2618. <doc xml:space="preserve">User closure data.</doc>
  2619. <type name="gpointer" c:type="gpointer"/>
  2620. </parameter>
  2621. </parameters>
  2622. </callback>
  2623. <enumeration name="PixbufError"
  2624. glib:type-name="GdkPixbufError"
  2625. glib:get-type="gdk_pixbuf_error_get_type"
  2626. c:type="GdkPixbufError"
  2627. glib:error-domain="gdk-pixbuf-error-quark">
  2628. <doc xml:space="preserve">An error code in the #GDK_PIXBUF_ERROR domain. Many gdk-pixbuf
  2629. operations can cause errors in this domain, or in the #G_FILE_ERROR
  2630. domain.</doc>
  2631. <member name="corrupt_image"
  2632. value="0"
  2633. c:identifier="GDK_PIXBUF_ERROR_CORRUPT_IMAGE"
  2634. glib:nick="corrupt-image">
  2635. <doc xml:space="preserve">An image file was broken somehow.</doc>
  2636. </member>
  2637. <member name="insufficient_memory"
  2638. value="1"
  2639. c:identifier="GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY"
  2640. glib:nick="insufficient-memory">
  2641. <doc xml:space="preserve">Not enough memory.</doc>
  2642. </member>
  2643. <member name="bad_option"
  2644. value="2"
  2645. c:identifier="GDK_PIXBUF_ERROR_BAD_OPTION"
  2646. glib:nick="bad-option">
  2647. <doc xml:space="preserve">A bad option was passed to a pixbuf save module.</doc>
  2648. </member>
  2649. <member name="unknown_type"
  2650. value="3"
  2651. c:identifier="GDK_PIXBUF_ERROR_UNKNOWN_TYPE"
  2652. glib:nick="unknown-type">
  2653. <doc xml:space="preserve">Unknown image type.</doc>
  2654. </member>
  2655. <member name="unsupported_operation"
  2656. value="4"
  2657. c:identifier="GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION"
  2658. glib:nick="unsupported-operation">
  2659. <doc xml:space="preserve">Don't know how to perform the
  2660. given operation on the type of image at hand.</doc>
  2661. </member>
  2662. <member name="failed"
  2663. value="5"
  2664. c:identifier="GDK_PIXBUF_ERROR_FAILED"
  2665. glib:nick="failed">
  2666. <doc xml:space="preserve">Generic failure code, something went wrong.</doc>
  2667. </member>
  2668. <member name="incomplete_animation"
  2669. value="6"
  2670. c:identifier="GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION"
  2671. glib:nick="incomplete-animation">
  2672. <doc xml:space="preserve">Only part of the animation was loaded.</doc>
  2673. </member>
  2674. <function name="quark" c:identifier="gdk_pixbuf_error_quark">
  2675. <return-value transfer-ownership="none">
  2676. <type name="GLib.Quark" c:type="GQuark"/>
  2677. </return-value>
  2678. </function>
  2679. </enumeration>
  2680. <record name="PixbufFormat"
  2681. c:type="GdkPixbufFormat"
  2682. glib:type-name="GdkPixbufFormat"
  2683. glib:get-type="gdk_pixbuf_format_get_type"
  2684. c:symbol-prefix="pixbuf_format">
  2685. <method name="copy" c:identifier="gdk_pixbuf_format_copy" version="2.22">
  2686. <doc xml:space="preserve">Creates a copy of @format</doc>
  2687. <return-value transfer-ownership="full">
  2688. <doc xml:space="preserve">the newly allocated copy of a #GdkPixbufFormat. Use
  2689. gdk_pixbuf_format_free() to free the resources when done</doc>
  2690. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2691. </return-value>
  2692. <parameters>
  2693. <instance-parameter name="format" transfer-ownership="none">
  2694. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2695. <type name="PixbufFormat" c:type="const GdkPixbufFormat*"/>
  2696. </instance-parameter>
  2697. </parameters>
  2698. </method>
  2699. <method name="free" c:identifier="gdk_pixbuf_format_free" version="2.22">
  2700. <doc xml:space="preserve">Frees the resources allocated when copying a #GdkPixbufFormat
  2701. using gdk_pixbuf_format_copy()</doc>
  2702. <return-value transfer-ownership="none">
  2703. <type name="none" c:type="void"/>
  2704. </return-value>
  2705. <parameters>
  2706. <instance-parameter name="format" transfer-ownership="none">
  2707. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2708. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2709. </instance-parameter>
  2710. </parameters>
  2711. </method>
  2712. <method name="get_description"
  2713. c:identifier="gdk_pixbuf_format_get_description"
  2714. version="2.2">
  2715. <doc xml:space="preserve">Returns a description of the format.</doc>
  2716. <return-value transfer-ownership="full">
  2717. <doc xml:space="preserve">a description of the format.</doc>
  2718. <type name="utf8" c:type="gchar*"/>
  2719. </return-value>
  2720. <parameters>
  2721. <instance-parameter name="format" transfer-ownership="none">
  2722. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2723. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2724. </instance-parameter>
  2725. </parameters>
  2726. </method>
  2727. <method name="get_extensions"
  2728. c:identifier="gdk_pixbuf_format_get_extensions"
  2729. version="2.2">
  2730. <doc xml:space="preserve">Returns the filename extensions typically used for files in the
  2731. given format.</doc>
  2732. <return-value transfer-ownership="full">
  2733. <doc xml:space="preserve">a %NULL-terminated array of filename extensions which must be
  2734. freed with g_strfreev() when it is no longer needed.</doc>
  2735. <array c:type="gchar**">
  2736. <type name="utf8"/>
  2737. </array>
  2738. </return-value>
  2739. <parameters>
  2740. <instance-parameter name="format" transfer-ownership="none">
  2741. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2742. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2743. </instance-parameter>
  2744. </parameters>
  2745. </method>
  2746. <method name="get_license"
  2747. c:identifier="gdk_pixbuf_format_get_license"
  2748. version="2.6">
  2749. <doc xml:space="preserve">Returns information about the license of the image loader for the format. The
  2750. returned string should be a shorthand for a wellknown license, e.g. "LGPL",
  2751. "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license. This
  2752. string should be freed with g_free() when it's no longer needed.</doc>
  2753. <return-value transfer-ownership="full">
  2754. <doc xml:space="preserve">a string describing the license of @format.</doc>
  2755. <type name="utf8" c:type="gchar*"/>
  2756. </return-value>
  2757. <parameters>
  2758. <instance-parameter name="format" transfer-ownership="none">
  2759. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2760. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2761. </instance-parameter>
  2762. </parameters>
  2763. </method>
  2764. <method name="get_mime_types"
  2765. c:identifier="gdk_pixbuf_format_get_mime_types"
  2766. version="2.2">
  2767. <doc xml:space="preserve">Returns the mime types supported by the format.</doc>
  2768. <return-value transfer-ownership="full">
  2769. <doc xml:space="preserve">a %NULL-terminated array of mime types which must be freed with
  2770. g_strfreev() when it is no longer needed.</doc>
  2771. <array c:type="gchar**">
  2772. <type name="utf8"/>
  2773. </array>
  2774. </return-value>
  2775. <parameters>
  2776. <instance-parameter name="format" transfer-ownership="none">
  2777. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2778. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2779. </instance-parameter>
  2780. </parameters>
  2781. </method>
  2782. <method name="get_name"
  2783. c:identifier="gdk_pixbuf_format_get_name"
  2784. version="2.2">
  2785. <doc xml:space="preserve">Returns the name of the format.</doc>
  2786. <return-value transfer-ownership="full">
  2787. <doc xml:space="preserve">the name of the format.</doc>
  2788. <type name="utf8" c:type="gchar*"/>
  2789. </return-value>
  2790. <parameters>
  2791. <instance-parameter name="format" transfer-ownership="none">
  2792. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2793. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2794. </instance-parameter>
  2795. </parameters>
  2796. </method>
  2797. <method name="is_disabled"
  2798. c:identifier="gdk_pixbuf_format_is_disabled"
  2799. version="2.6">
  2800. <doc xml:space="preserve">Returns whether this image format is disabled. See
  2801. gdk_pixbuf_format_set_disabled().</doc>
  2802. <return-value transfer-ownership="none">
  2803. <doc xml:space="preserve">whether this image format is disabled.</doc>
  2804. <type name="gboolean" c:type="gboolean"/>
  2805. </return-value>
  2806. <parameters>
  2807. <instance-parameter name="format" transfer-ownership="none">
  2808. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2809. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2810. </instance-parameter>
  2811. </parameters>
  2812. </method>
  2813. <method name="is_scalable"
  2814. c:identifier="gdk_pixbuf_format_is_scalable"
  2815. version="2.6">
  2816. <doc xml:space="preserve">Returns whether this image format is scalable. If a file is in a
  2817. scalable format, it is preferable to load it at the desired size,
  2818. rather than loading it at the default size and scaling the
  2819. resulting pixbuf to the desired size.</doc>
  2820. <return-value transfer-ownership="none">
  2821. <doc xml:space="preserve">whether this image format is scalable.</doc>
  2822. <type name="gboolean" c:type="gboolean"/>
  2823. </return-value>
  2824. <parameters>
  2825. <instance-parameter name="format" transfer-ownership="none">
  2826. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2827. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2828. </instance-parameter>
  2829. </parameters>
  2830. </method>
  2831. <method name="is_writable"
  2832. c:identifier="gdk_pixbuf_format_is_writable"
  2833. version="2.2">
  2834. <doc xml:space="preserve">Returns whether pixbufs can be saved in the given format.</doc>
  2835. <return-value transfer-ownership="none">
  2836. <doc xml:space="preserve">whether pixbufs can be saved in the given format.</doc>
  2837. <type name="gboolean" c:type="gboolean"/>
  2838. </return-value>
  2839. <parameters>
  2840. <instance-parameter name="format" transfer-ownership="none">
  2841. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2842. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2843. </instance-parameter>
  2844. </parameters>
  2845. </method>
  2846. <method name="set_disabled"
  2847. c:identifier="gdk_pixbuf_format_set_disabled"
  2848. version="2.6">
  2849. <doc xml:space="preserve">Disables or enables an image format. If a format is disabled,
  2850. gdk-pixbuf won't use the image loader for this format to load
  2851. images. Applications can use this to avoid using image loaders
  2852. with an inappropriate license, see gdk_pixbuf_format_get_license().</doc>
  2853. <return-value transfer-ownership="none">
  2854. <type name="none" c:type="void"/>
  2855. </return-value>
  2856. <parameters>
  2857. <instance-parameter name="format" transfer-ownership="none">
  2858. <doc xml:space="preserve">a #GdkPixbufFormat</doc>
  2859. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  2860. </instance-parameter>
  2861. <parameter name="disabled" transfer-ownership="none">
  2862. <doc xml:space="preserve">%TRUE to disable the format @format</doc>
  2863. <type name="gboolean" c:type="gboolean"/>
  2864. </parameter>
  2865. </parameters>
  2866. </method>
  2867. </record>
  2868. <class name="PixbufLoader"
  2869. c:symbol-prefix="pixbuf_loader"
  2870. c:type="GdkPixbufLoader"
  2871. parent="GObject.Object"
  2872. glib:type-name="GdkPixbufLoader"
  2873. glib:get-type="gdk_pixbuf_loader_get_type"
  2874. glib:type-struct="PixbufLoaderClass">
  2875. <doc xml:space="preserve">The GdkPixbufLoader struct contains only private
  2876. fields.</doc>
  2877. <constructor name="new" c:identifier="gdk_pixbuf_loader_new">
  2878. <doc xml:space="preserve">Creates a new pixbuf loader object.</doc>
  2879. <return-value transfer-ownership="full">
  2880. <doc xml:space="preserve">A newly-created pixbuf loader.</doc>
  2881. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2882. </return-value>
  2883. </constructor>
  2884. <constructor name="new_with_mime_type"
  2885. c:identifier="gdk_pixbuf_loader_new_with_mime_type"
  2886. version="2.4"
  2887. throws="1">
  2888. <doc xml:space="preserve">Creates a new pixbuf loader object that always attempts to parse
  2889. image data as if it were an image of mime type @mime_type, instead of
  2890. identifying the type automatically. Useful if you want an error if
  2891. the image isn't the expected mime type, for loading image formats
  2892. that can't be reliably identified by looking at the data, or if
  2893. the user manually forces a specific mime type.
  2894. The list of supported mime types depends on what image loaders
  2895. are installed, but typically "image/png", "image/jpeg", "image/gif",
  2896. "image/tiff" and "image/x-xpixmap" are among the supported mime types.
  2897. To obtain the full list of supported mime types, call
  2898. gdk_pixbuf_format_get_mime_types() on each of the #GdkPixbufFormat
  2899. structs returned by gdk_pixbuf_get_formats().</doc>
  2900. <return-value transfer-ownership="full">
  2901. <doc xml:space="preserve">A newly-created pixbuf loader.</doc>
  2902. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2903. </return-value>
  2904. <parameters>
  2905. <parameter name="mime_type" transfer-ownership="none">
  2906. <doc xml:space="preserve">the mime type to be loaded</doc>
  2907. <type name="utf8" c:type="const char*"/>
  2908. </parameter>
  2909. </parameters>
  2910. </constructor>
  2911. <constructor name="new_with_type"
  2912. c:identifier="gdk_pixbuf_loader_new_with_type"
  2913. throws="1">
  2914. <doc xml:space="preserve">Creates a new pixbuf loader object that always attempts to parse
  2915. image data as if it were an image of type @image_type, instead of
  2916. identifying the type automatically. Useful if you want an error if
  2917. the image isn't the expected type, for loading image formats
  2918. that can't be reliably identified by looking at the data, or if
  2919. the user manually forces a specific type.
  2920. The list of supported image formats depends on what image loaders
  2921. are installed, but typically "png", "jpeg", "gif", "tiff" and
  2922. "xpm" are among the supported formats. To obtain the full list of
  2923. supported image formats, call gdk_pixbuf_format_get_name() on each
  2924. of the #GdkPixbufFormat structs returned by gdk_pixbuf_get_formats().</doc>
  2925. <return-value transfer-ownership="full">
  2926. <doc xml:space="preserve">A newly-created pixbuf loader.</doc>
  2927. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2928. </return-value>
  2929. <parameters>
  2930. <parameter name="image_type" transfer-ownership="none">
  2931. <doc xml:space="preserve">name of the image format to be loaded with the image</doc>
  2932. <type name="utf8" c:type="const char*"/>
  2933. </parameter>
  2934. </parameters>
  2935. </constructor>
  2936. <virtual-method name="area_prepared">
  2937. <return-value transfer-ownership="none">
  2938. <type name="none" c:type="void"/>
  2939. </return-value>
  2940. <parameters>
  2941. <instance-parameter name="loader" transfer-ownership="none">
  2942. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2943. </instance-parameter>
  2944. </parameters>
  2945. </virtual-method>
  2946. <virtual-method name="area_updated">
  2947. <return-value transfer-ownership="none">
  2948. <type name="none" c:type="void"/>
  2949. </return-value>
  2950. <parameters>
  2951. <instance-parameter name="loader" transfer-ownership="none">
  2952. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2953. </instance-parameter>
  2954. <parameter name="x" transfer-ownership="none">
  2955. <type name="gint" c:type="int"/>
  2956. </parameter>
  2957. <parameter name="y" transfer-ownership="none">
  2958. <type name="gint" c:type="int"/>
  2959. </parameter>
  2960. <parameter name="width" transfer-ownership="none">
  2961. <type name="gint" c:type="int"/>
  2962. </parameter>
  2963. <parameter name="height" transfer-ownership="none">
  2964. <type name="gint" c:type="int"/>
  2965. </parameter>
  2966. </parameters>
  2967. </virtual-method>
  2968. <virtual-method name="closed">
  2969. <return-value transfer-ownership="none">
  2970. <type name="none" c:type="void"/>
  2971. </return-value>
  2972. <parameters>
  2973. <instance-parameter name="loader" transfer-ownership="none">
  2974. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2975. </instance-parameter>
  2976. </parameters>
  2977. </virtual-method>
  2978. <virtual-method name="size_prepared">
  2979. <return-value transfer-ownership="none">
  2980. <type name="none" c:type="void"/>
  2981. </return-value>
  2982. <parameters>
  2983. <instance-parameter name="loader" transfer-ownership="none">
  2984. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  2985. </instance-parameter>
  2986. <parameter name="width" transfer-ownership="none">
  2987. <type name="gint" c:type="int"/>
  2988. </parameter>
  2989. <parameter name="height" transfer-ownership="none">
  2990. <type name="gint" c:type="int"/>
  2991. </parameter>
  2992. </parameters>
  2993. </virtual-method>
  2994. <method name="close" c:identifier="gdk_pixbuf_loader_close" throws="1">
  2995. <doc xml:space="preserve">Informs a pixbuf loader that no further writes with
  2996. gdk_pixbuf_loader_write() will occur, so that it can free its
  2997. internal loading structures. Also, tries to parse any data that
  2998. hasn't yet been parsed; if the remaining data is partial or
  2999. corrupt, an error will be returned. If %FALSE is returned, @error
  3000. will be set to an error from the #GDK_PIXBUF_ERROR or #G_FILE_ERROR
  3001. domains. If you're just cancelling a load rather than expecting it
  3002. to be finished, passing %NULL for @error to ignore it is
  3003. reasonable.
  3004. Remember that this does not unref the loader, so if you plan not to
  3005. use it anymore, please g_object_unref() it.</doc>
  3006. <return-value transfer-ownership="none">
  3007. <doc xml:space="preserve">%TRUE if all image data written so far was successfully
  3008. passed out via the update_area signal</doc>
  3009. <type name="gboolean" c:type="gboolean"/>
  3010. </return-value>
  3011. <parameters>
  3012. <instance-parameter name="loader" transfer-ownership="none">
  3013. <doc xml:space="preserve">A pixbuf loader.</doc>
  3014. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3015. </instance-parameter>
  3016. </parameters>
  3017. </method>
  3018. <method name="get_animation"
  3019. c:identifier="gdk_pixbuf_loader_get_animation">
  3020. <doc xml:space="preserve">Queries the #GdkPixbufAnimation that a pixbuf loader is currently creating.
  3021. In general it only makes sense to call this function after the "area-prepared"
  3022. signal has been emitted by the loader. If the loader doesn't have enough
  3023. bytes yet (hasn't emitted the "area-prepared" signal) this function will
  3024. return %NULL.</doc>
  3025. <return-value transfer-ownership="none">
  3026. <doc xml:space="preserve">The #GdkPixbufAnimation that the loader is loading, or %NULL if
  3027. not enough data has been read to determine the information.</doc>
  3028. <type name="PixbufAnimation" c:type="GdkPixbufAnimation*"/>
  3029. </return-value>
  3030. <parameters>
  3031. <instance-parameter name="loader" transfer-ownership="none">
  3032. <doc xml:space="preserve">A pixbuf loader</doc>
  3033. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3034. </instance-parameter>
  3035. </parameters>
  3036. </method>
  3037. <method name="get_format"
  3038. c:identifier="gdk_pixbuf_loader_get_format"
  3039. version="2.2">
  3040. <doc xml:space="preserve">Obtains the available information about the format of the
  3041. currently loading image file.</doc>
  3042. <return-value transfer-ownership="none" nullable="1">
  3043. <doc xml:space="preserve">A #GdkPixbufFormat or
  3044. %NULL. The return value is owned by GdkPixbuf and should not be
  3045. freed.</doc>
  3046. <type name="PixbufFormat" c:type="GdkPixbufFormat*"/>
  3047. </return-value>
  3048. <parameters>
  3049. <instance-parameter name="loader" transfer-ownership="none">
  3050. <doc xml:space="preserve">A pixbuf loader.</doc>
  3051. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3052. </instance-parameter>
  3053. </parameters>
  3054. </method>
  3055. <method name="get_pixbuf" c:identifier="gdk_pixbuf_loader_get_pixbuf">
  3056. <doc xml:space="preserve">Queries the #GdkPixbuf that a pixbuf loader is currently creating.
  3057. In general it only makes sense to call this function after the
  3058. "area-prepared" signal has been emitted by the loader; this means
  3059. that enough data has been read to know the size of the image that
  3060. will be allocated. If the loader has not received enough data via
  3061. gdk_pixbuf_loader_write(), then this function returns %NULL. The
  3062. returned pixbuf will be the same in all future calls to the loader,
  3063. so simply calling g_object_ref() should be sufficient to continue
  3064. using it. Additionally, if the loader is an animation, it will
  3065. return the "static image" of the animation
  3066. (see gdk_pixbuf_animation_get_static_image()).</doc>
  3067. <return-value transfer-ownership="none">
  3068. <doc xml:space="preserve">The #GdkPixbuf that the loader is creating, or %NULL if not
  3069. enough data has been read to determine how to create the image buffer.</doc>
  3070. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  3071. </return-value>
  3072. <parameters>
  3073. <instance-parameter name="loader" transfer-ownership="none">
  3074. <doc xml:space="preserve">A pixbuf loader.</doc>
  3075. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3076. </instance-parameter>
  3077. </parameters>
  3078. </method>
  3079. <method name="set_size"
  3080. c:identifier="gdk_pixbuf_loader_set_size"
  3081. version="2.2">
  3082. <doc xml:space="preserve">Causes the image to be scaled while it is loaded. The desired
  3083. image size can be determined relative to the original size of
  3084. the image by calling gdk_pixbuf_loader_set_size() from a
  3085. signal handler for the ::size-prepared signal.
  3086. Attempts to set the desired image size are ignored after the
  3087. emission of the ::size-prepared signal.</doc>
  3088. <return-value transfer-ownership="none">
  3089. <type name="none" c:type="void"/>
  3090. </return-value>
  3091. <parameters>
  3092. <instance-parameter name="loader" transfer-ownership="none">
  3093. <doc xml:space="preserve">A pixbuf loader.</doc>
  3094. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3095. </instance-parameter>
  3096. <parameter name="width" transfer-ownership="none">
  3097. <doc xml:space="preserve">The desired width of the image being loaded.</doc>
  3098. <type name="gint" c:type="int"/>
  3099. </parameter>
  3100. <parameter name="height" transfer-ownership="none">
  3101. <doc xml:space="preserve">The desired height of the image being loaded.</doc>
  3102. <type name="gint" c:type="int"/>
  3103. </parameter>
  3104. </parameters>
  3105. </method>
  3106. <method name="write" c:identifier="gdk_pixbuf_loader_write" throws="1">
  3107. <doc xml:space="preserve">This will cause a pixbuf loader to parse the next @count bytes of
  3108. an image. It will return %TRUE if the data was loaded successfully,
  3109. and %FALSE if an error occurred. In the latter case, the loader
  3110. will be closed, and will not accept further writes. If %FALSE is
  3111. returned, @error will be set to an error from the #GDK_PIXBUF_ERROR
  3112. or #G_FILE_ERROR domains.</doc>
  3113. <return-value transfer-ownership="none">
  3114. <doc xml:space="preserve">%TRUE if the write was successful, or %FALSE if the loader
  3115. cannot parse the buffer.</doc>
  3116. <type name="gboolean" c:type="gboolean"/>
  3117. </return-value>
  3118. <parameters>
  3119. <instance-parameter name="loader" transfer-ownership="none">
  3120. <doc xml:space="preserve">A pixbuf loader.</doc>
  3121. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3122. </instance-parameter>
  3123. <parameter name="buf" transfer-ownership="none">
  3124. <doc xml:space="preserve">Pointer to image data.</doc>
  3125. <array length="1" zero-terminated="0" c:type="guchar*">
  3126. <type name="guint8" c:type="guchar"/>
  3127. </array>
  3128. </parameter>
  3129. <parameter name="count" transfer-ownership="none">
  3130. <doc xml:space="preserve">Length of the @buf buffer in bytes.</doc>
  3131. <type name="gsize" c:type="gsize"/>
  3132. </parameter>
  3133. </parameters>
  3134. </method>
  3135. <method name="write_bytes"
  3136. c:identifier="gdk_pixbuf_loader_write_bytes"
  3137. version="2.30"
  3138. throws="1">
  3139. <doc xml:space="preserve">This will cause a pixbuf loader to parse a buffer inside a #GBytes
  3140. for an image. It will return %TRUE if the data was loaded successfully,
  3141. and %FALSE if an error occurred. In the latter case, the loader
  3142. will be closed, and will not accept further writes. If %FALSE is
  3143. returned, @error will be set to an error from the #GDK_PIXBUF_ERROR
  3144. or #G_FILE_ERROR domains.
  3145. See also: gdk_pixbuf_loader_write()</doc>
  3146. <return-value transfer-ownership="none">
  3147. <doc xml:space="preserve">%TRUE if the write was successful, or %FALSE if the loader
  3148. cannot parse the buffer.</doc>
  3149. <type name="gboolean" c:type="gboolean"/>
  3150. </return-value>
  3151. <parameters>
  3152. <instance-parameter name="loader" transfer-ownership="none">
  3153. <doc xml:space="preserve">A pixbuf loader.</doc>
  3154. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3155. </instance-parameter>
  3156. <parameter name="buffer" transfer-ownership="none">
  3157. <doc xml:space="preserve">The image data as a #GBytes</doc>
  3158. <type name="GLib.Bytes" c:type="GBytes*"/>
  3159. </parameter>
  3160. </parameters>
  3161. </method>
  3162. <field name="parent_instance">
  3163. <type name="GObject.Object" c:type="GObject"/>
  3164. </field>
  3165. <field name="priv" readable="0" private="1">
  3166. <type name="gpointer" c:type="gpointer"/>
  3167. </field>
  3168. <glib:signal name="area-prepared" when="last">
  3169. <doc xml:space="preserve">This signal is emitted when the pixbuf loader has allocated the
  3170. pixbuf in the desired size. After this signal is emitted,
  3171. applications can call gdk_pixbuf_loader_get_pixbuf() to fetch
  3172. the partially-loaded pixbuf.</doc>
  3173. <return-value transfer-ownership="none">
  3174. <type name="none" c:type="void"/>
  3175. </return-value>
  3176. </glib:signal>
  3177. <glib:signal name="area-updated" when="last">
  3178. <doc xml:space="preserve">This signal is emitted when a significant area of the image being
  3179. loaded has been updated. Normally it means that a complete
  3180. scanline has been read in, but it could be a different area as
  3181. well. Applications can use this signal to know when to repaint
  3182. areas of an image that is being loaded.</doc>
  3183. <return-value transfer-ownership="none">
  3184. <type name="none" c:type="void"/>
  3185. </return-value>
  3186. <parameters>
  3187. <parameter name="x" transfer-ownership="none">
  3188. <doc xml:space="preserve">X offset of upper-left corner of the updated area.</doc>
  3189. <type name="gint" c:type="gint"/>
  3190. </parameter>
  3191. <parameter name="y" transfer-ownership="none">
  3192. <doc xml:space="preserve">Y offset of upper-left corner of the updated area.</doc>
  3193. <type name="gint" c:type="gint"/>
  3194. </parameter>
  3195. <parameter name="width" transfer-ownership="none">
  3196. <doc xml:space="preserve">Width of updated area.</doc>
  3197. <type name="gint" c:type="gint"/>
  3198. </parameter>
  3199. <parameter name="height" transfer-ownership="none">
  3200. <doc xml:space="preserve">Height of updated area.</doc>
  3201. <type name="gint" c:type="gint"/>
  3202. </parameter>
  3203. </parameters>
  3204. </glib:signal>
  3205. <glib:signal name="closed" when="last">
  3206. <doc xml:space="preserve">This signal is emitted when gdk_pixbuf_loader_close() is called.
  3207. It can be used by different parts of an application to receive
  3208. notification when an image loader is closed by the code that
  3209. drives it.</doc>
  3210. <return-value transfer-ownership="none">
  3211. <type name="none" c:type="void"/>
  3212. </return-value>
  3213. </glib:signal>
  3214. <glib:signal name="size-prepared" when="last">
  3215. <doc xml:space="preserve">This signal is emitted when the pixbuf loader has been fed the
  3216. initial amount of data that is required to figure out the size
  3217. of the image that it will create. Applications can call
  3218. gdk_pixbuf_loader_set_size() in response to this signal to set
  3219. the desired size to which the image should be scaled.</doc>
  3220. <return-value transfer-ownership="none">
  3221. <type name="none" c:type="void"/>
  3222. </return-value>
  3223. <parameters>
  3224. <parameter name="width" transfer-ownership="none">
  3225. <doc xml:space="preserve">the original width of the image</doc>
  3226. <type name="gint" c:type="gint"/>
  3227. </parameter>
  3228. <parameter name="height" transfer-ownership="none">
  3229. <doc xml:space="preserve">the original height of the image</doc>
  3230. <type name="gint" c:type="gint"/>
  3231. </parameter>
  3232. </parameters>
  3233. </glib:signal>
  3234. </class>
  3235. <record name="PixbufLoaderClass"
  3236. c:type="GdkPixbufLoaderClass"
  3237. glib:is-gtype-struct-for="PixbufLoader">
  3238. <field name="parent_class">
  3239. <type name="GObject.ObjectClass" c:type="GObjectClass"/>
  3240. </field>
  3241. <field name="size_prepared">
  3242. <callback name="size_prepared">
  3243. <return-value transfer-ownership="none">
  3244. <type name="none" c:type="void"/>
  3245. </return-value>
  3246. <parameters>
  3247. <parameter name="loader" transfer-ownership="none">
  3248. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3249. </parameter>
  3250. <parameter name="width" transfer-ownership="none">
  3251. <type name="gint" c:type="int"/>
  3252. </parameter>
  3253. <parameter name="height" transfer-ownership="none">
  3254. <type name="gint" c:type="int"/>
  3255. </parameter>
  3256. </parameters>
  3257. </callback>
  3258. </field>
  3259. <field name="area_prepared">
  3260. <callback name="area_prepared">
  3261. <return-value transfer-ownership="none">
  3262. <type name="none" c:type="void"/>
  3263. </return-value>
  3264. <parameters>
  3265. <parameter name="loader" transfer-ownership="none">
  3266. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3267. </parameter>
  3268. </parameters>
  3269. </callback>
  3270. </field>
  3271. <field name="area_updated">
  3272. <callback name="area_updated">
  3273. <return-value transfer-ownership="none">
  3274. <type name="none" c:type="void"/>
  3275. </return-value>
  3276. <parameters>
  3277. <parameter name="loader" transfer-ownership="none">
  3278. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3279. </parameter>
  3280. <parameter name="x" transfer-ownership="none">
  3281. <type name="gint" c:type="int"/>
  3282. </parameter>
  3283. <parameter name="y" transfer-ownership="none">
  3284. <type name="gint" c:type="int"/>
  3285. </parameter>
  3286. <parameter name="width" transfer-ownership="none">
  3287. <type name="gint" c:type="int"/>
  3288. </parameter>
  3289. <parameter name="height" transfer-ownership="none">
  3290. <type name="gint" c:type="int"/>
  3291. </parameter>
  3292. </parameters>
  3293. </callback>
  3294. </field>
  3295. <field name="closed">
  3296. <callback name="closed">
  3297. <return-value transfer-ownership="none">
  3298. <type name="none" c:type="void"/>
  3299. </return-value>
  3300. <parameters>
  3301. <parameter name="loader" transfer-ownership="none">
  3302. <type name="PixbufLoader" c:type="GdkPixbufLoader*"/>
  3303. </parameter>
  3304. </parameters>
  3305. </callback>
  3306. </field>
  3307. </record>
  3308. <enumeration name="PixbufRotation"
  3309. glib:type-name="GdkPixbufRotation"
  3310. glib:get-type="gdk_pixbuf_rotation_get_type"
  3311. c:type="GdkPixbufRotation">
  3312. <doc xml:space="preserve">The possible rotations which can be passed to gdk_pixbuf_rotate_simple().
  3313. To make them easier to use, their numerical values are the actual degrees.</doc>
  3314. <member name="none"
  3315. value="0"
  3316. c:identifier="GDK_PIXBUF_ROTATE_NONE"
  3317. glib:nick="none">
  3318. <doc xml:space="preserve">No rotation.</doc>
  3319. </member>
  3320. <member name="counterclockwise"
  3321. value="90"
  3322. c:identifier="GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE"
  3323. glib:nick="counterclockwise">
  3324. <doc xml:space="preserve">Rotate by 90 degrees.</doc>
  3325. </member>
  3326. <member name="upsidedown"
  3327. value="180"
  3328. c:identifier="GDK_PIXBUF_ROTATE_UPSIDEDOWN"
  3329. glib:nick="upsidedown">
  3330. <doc xml:space="preserve">Rotate by 180 degrees.</doc>
  3331. </member>
  3332. <member name="clockwise"
  3333. value="270"
  3334. c:identifier="GDK_PIXBUF_ROTATE_CLOCKWISE"
  3335. glib:nick="clockwise">
  3336. <doc xml:space="preserve">Rotate by 270 degrees.</doc>
  3337. </member>
  3338. </enumeration>
  3339. <callback name="PixbufSaveFunc" c:type="GdkPixbufSaveFunc" version="2.4">
  3340. <doc xml:space="preserve">Specifies the type of the function passed to
  3341. gdk_pixbuf_save_to_callback(). It is called once for each block of
  3342. bytes that is "written" by gdk_pixbuf_save_to_callback(). If
  3343. successful it should return %TRUE. If an error occurs it should set
  3344. @error and return %FALSE, in which case gdk_pixbuf_save_to_callback()
  3345. will fail with the same error.</doc>
  3346. <return-value transfer-ownership="none">
  3347. <doc xml:space="preserve">%TRUE if successful, %FALSE (with @error set) if failed.</doc>
  3348. <type name="gboolean" c:type="gboolean"/>
  3349. </return-value>
  3350. <parameters>
  3351. <parameter name="buf" transfer-ownership="none">
  3352. <doc xml:space="preserve">bytes to be written.</doc>
  3353. <array length="1" zero-terminated="0" c:type="gchar*">
  3354. <type name="guint8"/>
  3355. </array>
  3356. </parameter>
  3357. <parameter name="count" transfer-ownership="none">
  3358. <doc xml:space="preserve">number of bytes in @buf.</doc>
  3359. <type name="gsize" c:type="gsize"/>
  3360. </parameter>
  3361. <parameter name="error"
  3362. direction="out"
  3363. caller-allocates="0"
  3364. transfer-ownership="full">
  3365. <doc xml:space="preserve">A location to return an error.</doc>
  3366. <type name="GLib.Error" c:type="GError**"/>
  3367. </parameter>
  3368. <parameter name="data"
  3369. transfer-ownership="none"
  3370. nullable="1"
  3371. allow-none="1"
  3372. closure="3">
  3373. <doc xml:space="preserve">user data passed to gdk_pixbuf_save_to_callback().</doc>
  3374. <type name="gpointer" c:type="gpointer"/>
  3375. </parameter>
  3376. </parameters>
  3377. </callback>
  3378. <class name="PixbufSimpleAnim"
  3379. c:symbol-prefix="pixbuf_simple_anim"
  3380. c:type="GdkPixbufSimpleAnim"
  3381. parent="PixbufAnimation"
  3382. glib:type-name="GdkPixbufSimpleAnim"
  3383. glib:get-type="gdk_pixbuf_simple_anim_get_type"
  3384. glib:type-struct="PixbufSimpleAnimClass">
  3385. <doc xml:space="preserve">An opaque struct representing a simple animation.</doc>
  3386. <constructor name="new"
  3387. c:identifier="gdk_pixbuf_simple_anim_new"
  3388. version="2.8">
  3389. <doc xml:space="preserve">Creates a new, empty animation.</doc>
  3390. <return-value transfer-ownership="full">
  3391. <doc xml:space="preserve">a newly allocated #GdkPixbufSimpleAnim</doc>
  3392. <type name="PixbufSimpleAnim" c:type="GdkPixbufSimpleAnim*"/>
  3393. </return-value>
  3394. <parameters>
  3395. <parameter name="width" transfer-ownership="none">
  3396. <doc xml:space="preserve">the width of the animation</doc>
  3397. <type name="gint" c:type="gint"/>
  3398. </parameter>
  3399. <parameter name="height" transfer-ownership="none">
  3400. <doc xml:space="preserve">the height of the animation</doc>
  3401. <type name="gint" c:type="gint"/>
  3402. </parameter>
  3403. <parameter name="rate" transfer-ownership="none">
  3404. <doc xml:space="preserve">the speed of the animation, in frames per second</doc>
  3405. <type name="gfloat" c:type="gfloat"/>
  3406. </parameter>
  3407. </parameters>
  3408. </constructor>
  3409. <method name="add_frame"
  3410. c:identifier="gdk_pixbuf_simple_anim_add_frame"
  3411. version="2.8">
  3412. <doc xml:space="preserve">Adds a new frame to @animation. The @pixbuf must
  3413. have the dimensions specified when the animation
  3414. was constructed.</doc>
  3415. <return-value transfer-ownership="none">
  3416. <type name="none" c:type="void"/>
  3417. </return-value>
  3418. <parameters>
  3419. <instance-parameter name="animation" transfer-ownership="none">
  3420. <doc xml:space="preserve">a #GdkPixbufSimpleAnim</doc>
  3421. <type name="PixbufSimpleAnim" c:type="GdkPixbufSimpleAnim*"/>
  3422. </instance-parameter>
  3423. <parameter name="pixbuf" transfer-ownership="none">
  3424. <doc xml:space="preserve">the pixbuf to add</doc>
  3425. <type name="Pixbuf" c:type="GdkPixbuf*"/>
  3426. </parameter>
  3427. </parameters>
  3428. </method>
  3429. <method name="get_loop"
  3430. c:identifier="gdk_pixbuf_simple_anim_get_loop"
  3431. version="2.18">
  3432. <doc xml:space="preserve">Gets whether @animation should loop indefinitely when it reaches the end.</doc>
  3433. <return-value transfer-ownership="none">
  3434. <doc xml:space="preserve">%TRUE if the animation loops forever, %FALSE otherwise</doc>
  3435. <type name="gboolean" c:type="gboolean"/>
  3436. </return-value>
  3437. <parameters>
  3438. <instance-parameter name="animation" transfer-ownership="none">
  3439. <doc xml:space="preserve">a #GdkPixbufSimpleAnim</doc>
  3440. <type name="PixbufSimpleAnim" c:type="GdkPixbufSimpleAnim*"/>
  3441. </instance-parameter>
  3442. </parameters>
  3443. </method>
  3444. <method name="set_loop"
  3445. c:identifier="gdk_pixbuf_simple_anim_set_loop"
  3446. version="2.18">
  3447. <doc xml:space="preserve">Sets whether @animation should loop indefinitely when it reaches the end.</doc>
  3448. <return-value transfer-ownership="none">
  3449. <type name="none" c:type="void"/>
  3450. </return-value>
  3451. <parameters>
  3452. <instance-parameter name="animation" transfer-ownership="none">
  3453. <doc xml:space="preserve">a #GdkPixbufSimpleAnim</doc>
  3454. <type name="PixbufSimpleAnim" c:type="GdkPixbufSimpleAnim*"/>
  3455. </instance-parameter>
  3456. <parameter name="loop" transfer-ownership="none">
  3457. <doc xml:space="preserve">whether to loop the animation</doc>
  3458. <type name="gboolean" c:type="gboolean"/>
  3459. </parameter>
  3460. </parameters>
  3461. </method>
  3462. <property name="loop"
  3463. version="2.18"
  3464. writable="1"
  3465. transfer-ownership="none">
  3466. <doc xml:space="preserve">Whether the animation should loop when it reaches the end.</doc>
  3467. <type name="gboolean" c:type="gboolean"/>
  3468. </property>
  3469. </class>
  3470. <record name="PixbufSimpleAnimClass"
  3471. c:type="GdkPixbufSimpleAnimClass"
  3472. disguised="1"
  3473. glib:is-gtype-struct-for="PixbufSimpleAnim">
  3474. </record>
  3475. <class name="PixbufSimpleAnimIter"
  3476. c:symbol-prefix="pixbuf_simple_anim_iter"
  3477. parent="PixbufAnimationIter"
  3478. glib:type-name="GdkPixbufSimpleAnimIter"
  3479. glib:get-type="gdk_pixbuf_simple_anim_iter_get_type">
  3480. </class>
  3481. <record name="Pixdata" c:type="GdkPixdata">
  3482. <doc xml:space="preserve">A #GdkPixdata contains pixbuf information in a form suitable for
  3483. serialization and streaming.</doc>
  3484. <field name="magic" writable="1">
  3485. <doc xml:space="preserve">magic number. A valid #GdkPixdata structure must have
  3486. #GDK_PIXBUF_MAGIC_NUMBER here.</doc>
  3487. <type name="guint32" c:type="guint32"/>
  3488. </field>
  3489. <field name="length" writable="1">
  3490. <doc xml:space="preserve">less than 1 to disable length checks, otherwise
  3491. #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data.</doc>
  3492. <type name="gint32" c:type="gint32"/>
  3493. </field>
  3494. <field name="pixdata_type" writable="1">
  3495. <doc xml:space="preserve">information about colorspace, sample width and
  3496. encoding, in a #GdkPixdataType.</doc>
  3497. <type name="guint32" c:type="guint32"/>
  3498. </field>
  3499. <field name="rowstride" writable="1">
  3500. <doc xml:space="preserve">Distance in bytes between rows.</doc>
  3501. <type name="guint32" c:type="guint32"/>
  3502. </field>
  3503. <field name="width" writable="1">
  3504. <doc xml:space="preserve">Width of the image in pixels.</doc>
  3505. <type name="guint32" c:type="guint32"/>
  3506. </field>
  3507. <field name="height" writable="1">
  3508. <doc xml:space="preserve">Height of the image in pixels.</doc>
  3509. <type name="guint32" c:type="guint32"/>
  3510. </field>
  3511. <field name="pixel_data" writable="1">
  3512. <doc xml:space="preserve">@width x @height pixels, encoded according to @pixdata_type
  3513. and @rowstride.</doc>
  3514. <array zero-terminated="0" c:type="guint8*">
  3515. <type name="guint8"/>
  3516. </array>
  3517. </field>
  3518. <method name="deserialize"
  3519. c:identifier="gdk_pixdata_deserialize"
  3520. deprecated="1"
  3521. deprecated-version="2.32"
  3522. throws="1">
  3523. <doc xml:space="preserve">Deserializes (reconstruct) a #GdkPixdata structure from a byte stream.
  3524. The byte stream consists of a straightforward writeout of the
  3525. #GdkPixdata fields in network byte order, plus the @pixel_data
  3526. bytes the structure points to.
  3527. The @pixdata contents are reconstructed byte by byte and are checked
  3528. for validity. This function may fail with %GDK_PIXBUF_ERROR_CORRUPT_IMAGE
  3529. or %GDK_PIXBUF_ERROR_UNKNOWN_TYPE.</doc>
  3530. <doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
  3531. <return-value transfer-ownership="none">
  3532. <doc xml:space="preserve">Upon successful deserialization %TRUE is returned,
  3533. %FALSE otherwise.</doc>
  3534. <type name="gboolean" c:type="gboolean"/>
  3535. </return-value>
  3536. <parameters>
  3537. <instance-parameter name="pixdata" transfer-ownership="none">
  3538. <doc xml:space="preserve">a #GdkPixdata structure to be filled in.</doc>
  3539. <type name="Pixdata" c:type="GdkPixdata*"/>
  3540. </instance-parameter>
  3541. <parameter name="stream_length" transfer-ownership="none">
  3542. <doc xml:space="preserve">length of the stream used for deserialization.</doc>
  3543. <type name="guint" c:type="guint"/>
  3544. </parameter>
  3545. <parameter name="stream" transfer-ownership="none">
  3546. <doc xml:space="preserve">stream of bytes containing a
  3547. serialized #GdkPixdata structure.</doc>
  3548. <array length="0" zero-terminated="0" c:type="guint8*">
  3549. <type name="guint8" c:type="guint8"/>
  3550. </array>
  3551. </parameter>
  3552. </parameters>
  3553. </method>
  3554. <method name="from_pixbuf"
  3555. c:identifier="gdk_pixdata_from_pixbuf"
  3556. introspectable="0"
  3557. deprecated="1"
  3558. deprecated-version="2.32">
  3559. <doc xml:space="preserve">Converts a #GdkPixbuf to a #GdkPixdata. If @use_rle is %TRUE, the
  3560. pixel data is run-length encoded into newly-allocated memory and a
  3561. pointer to that memory is returned.</doc>
  3562. <doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
  3563. <return-value transfer-ownership="none" nullable="1">
  3564. <doc xml:space="preserve">If @use_rle is %TRUE, a pointer to the
  3565. newly-allocated memory for the run-length encoded pixel data,
  3566. otherwise %NULL.</doc>
  3567. <type name="gpointer" c:type="gpointer"/>
  3568. </return-value>
  3569. <parameters>
  3570. <instance-parameter name="pixdata" transfer-ownership="none">
  3571. <doc xml:space="preserve">a #GdkPixdata to fill.</doc>
  3572. <type name="Pixdata" c:type="GdkPixdata*"/>
  3573. </instance-parameter>
  3574. <parameter name="pixbuf" transfer-ownership="none">
  3575. <doc xml:space="preserve">the data to fill @pixdata with.</doc>
  3576. <type name="Pixbuf" c:type="const GdkPixbuf*"/>
  3577. </parameter>
  3578. <parameter name="use_rle" transfer-ownership="none">
  3579. <doc xml:space="preserve">whether to use run-length encoding for the pixel data.</doc>
  3580. <type name="gboolean" c:type="gboolean"/>
  3581. </parameter>
  3582. </parameters>
  3583. </method>
  3584. <method name="serialize"
  3585. c:identifier="gdk_pixdata_serialize"
  3586. deprecated="1"
  3587. deprecated-version="2.32">
  3588. <doc xml:space="preserve">Serializes a #GdkPixdata structure into a byte stream.
  3589. The byte stream consists of a straightforward writeout of the
  3590. #GdkPixdata fields in network byte order, plus the @pixel_data
  3591. bytes the structure points to.</doc>
  3592. <doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
  3593. <return-value transfer-ownership="full">
  3594. <doc xml:space="preserve">A
  3595. newly-allocated string containing the serialized #GdkPixdata
  3596. structure.</doc>
  3597. <array length="0" zero-terminated="0" c:type="guint8*">
  3598. <type name="guint8" c:type="guint8"/>
  3599. </array>
  3600. </return-value>
  3601. <parameters>
  3602. <instance-parameter name="pixdata" transfer-ownership="none">
  3603. <doc xml:space="preserve">a valid #GdkPixdata structure to serialize.</doc>
  3604. <type name="Pixdata" c:type="const GdkPixdata*"/>
  3605. </instance-parameter>
  3606. <parameter name="stream_length_p"
  3607. direction="out"
  3608. caller-allocates="0"
  3609. transfer-ownership="full">
  3610. <doc xml:space="preserve">location to store the resulting stream length in.</doc>
  3611. <type name="guint" c:type="guint*"/>
  3612. </parameter>
  3613. </parameters>
  3614. </method>
  3615. <method name="to_csource"
  3616. c:identifier="gdk_pixdata_to_csource"
  3617. deprecated="1"
  3618. deprecated-version="2.32">
  3619. <doc xml:space="preserve">Generates C source code suitable for compiling images directly
  3620. into programs.
  3621. gdk-pixbuf ships with a program called
  3622. [gdk-pixbuf-csource][gdk-pixbuf-csource], which offers a command
  3623. line interface to this function.</doc>
  3624. <doc-deprecated xml:space="preserve">Use #GResource instead.</doc-deprecated>
  3625. <return-value transfer-ownership="full">
  3626. <doc xml:space="preserve">a newly-allocated string containing the C source form
  3627. of @pixdata.</doc>
  3628. <type name="GLib.String" c:type="GString*"/>
  3629. </return-value>
  3630. <parameters>
  3631. <instance-parameter name="pixdata" transfer-ownership="none">
  3632. <doc xml:space="preserve">a #GdkPixdata to convert to C source.</doc>
  3633. <type name="Pixdata" c:type="GdkPixdata*"/>
  3634. </instance-parameter>
  3635. <parameter name="name" transfer-ownership="none">
  3636. <doc xml:space="preserve">used for naming generated data structures or macros.</doc>
  3637. <type name="utf8" c:type="const gchar*"/>
  3638. </parameter>
  3639. <parameter name="dump_type" transfer-ownership="none">
  3640. <doc xml:space="preserve">a #GdkPixdataDumpType determining the kind of C
  3641. source to be generated.</doc>
  3642. <type name="PixdataDumpType" c:type="GdkPixdataDumpType"/>
  3643. </parameter>
  3644. </parameters>
  3645. </method>
  3646. </record>
  3647. <bitfield name="PixdataDumpType" c:type="GdkPixdataDumpType">
  3648. <doc xml:space="preserve">An enumeration which is used by gdk_pixdata_to_csource() to
  3649. determine the form of C source to be generated. The three values
  3650. @GDK_PIXDATA_DUMP_PIXDATA_STREAM, @GDK_PIXDATA_DUMP_PIXDATA_STRUCT
  3651. and @GDK_PIXDATA_DUMP_MACROS are mutually exclusive, as are
  3652. @GDK_PIXBUF_DUMP_GTYPES and @GDK_PIXBUF_DUMP_CTYPES. The remaining
  3653. elements are optional flags that can be freely added.</doc>
  3654. <member name="pixdata_stream"
  3655. value="0"
  3656. c:identifier="GDK_PIXDATA_DUMP_PIXDATA_STREAM">
  3657. <doc xml:space="preserve">Generate pixbuf data stream (a single
  3658. string containing a serialized #GdkPixdata structure in network byte
  3659. order).</doc>
  3660. </member>
  3661. <member name="pixdata_struct"
  3662. value="1"
  3663. c:identifier="GDK_PIXDATA_DUMP_PIXDATA_STRUCT">
  3664. <doc xml:space="preserve">Generate #GdkPixdata structure (needs
  3665. the #GdkPixdata structure definition from gdk-pixdata.h).</doc>
  3666. </member>
  3667. <member name="macros" value="2" c:identifier="GDK_PIXDATA_DUMP_MACROS">
  3668. <doc xml:space="preserve">Generate &lt;function&gt;*_ROWSTRIDE&lt;/function&gt;,
  3669. &lt;function&gt;*_WIDTH&lt;/function&gt;, &lt;function&gt;*_HEIGHT&lt;/function&gt;,
  3670. &lt;function&gt;*_BYTES_PER_PIXEL&lt;/function&gt; and
  3671. &lt;function&gt;*_RLE_PIXEL_DATA&lt;/function&gt; or &lt;function&gt;*_PIXEL_DATA&lt;/function&gt;
  3672. macro definitions for the image.</doc>
  3673. </member>
  3674. <member name="gtypes" value="0" c:identifier="GDK_PIXDATA_DUMP_GTYPES">
  3675. <doc xml:space="preserve">Generate GLib data types instead of
  3676. standard C data types.</doc>
  3677. </member>
  3678. <member name="ctypes" value="256" c:identifier="GDK_PIXDATA_DUMP_CTYPES">
  3679. <doc xml:space="preserve">Generate standard C data types instead of
  3680. GLib data types.</doc>
  3681. </member>
  3682. <member name="static" value="512" c:identifier="GDK_PIXDATA_DUMP_STATIC">
  3683. <doc xml:space="preserve">Generate static symbols.</doc>
  3684. </member>
  3685. <member name="const" value="1024" c:identifier="GDK_PIXDATA_DUMP_CONST">
  3686. <doc xml:space="preserve">Generate const symbols.</doc>
  3687. </member>
  3688. <member name="rle_decoder"
  3689. value="65536"
  3690. c:identifier="GDK_PIXDATA_DUMP_RLE_DECODER">
  3691. <doc xml:space="preserve">Provide a &lt;function&gt;*_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp)&lt;/function&gt;
  3692. macro definition to decode run-length encoded image data.</doc>
  3693. </member>
  3694. </bitfield>
  3695. <bitfield name="PixdataType" c:type="GdkPixdataType">
  3696. <doc xml:space="preserve">An enumeration containing three sets of flags for a #GdkPixdata struct:
  3697. one for the used colorspace, one for the width of the samples and one
  3698. for the encoding of the pixel data.</doc>
  3699. <member name="color_type_rgb"
  3700. value="1"
  3701. c:identifier="GDK_PIXDATA_COLOR_TYPE_RGB">
  3702. <doc xml:space="preserve">each pixel has red, green and blue samples.</doc>
  3703. </member>
  3704. <member name="color_type_rgba"
  3705. value="2"
  3706. c:identifier="GDK_PIXDATA_COLOR_TYPE_RGBA">
  3707. <doc xml:space="preserve">each pixel has red, green and blue samples
  3708. and an alpha value.</doc>
  3709. </member>
  3710. <member name="color_type_mask"
  3711. value="255"
  3712. c:identifier="GDK_PIXDATA_COLOR_TYPE_MASK">
  3713. <doc xml:space="preserve">mask for the colortype flags of the enum.</doc>
  3714. </member>
  3715. <member name="sample_width_8"
  3716. value="65536"
  3717. c:identifier="GDK_PIXDATA_SAMPLE_WIDTH_8">
  3718. <doc xml:space="preserve">each sample has 8 bits.</doc>
  3719. </member>
  3720. <member name="sample_width_mask"
  3721. value="983040"
  3722. c:identifier="GDK_PIXDATA_SAMPLE_WIDTH_MASK">
  3723. <doc xml:space="preserve">mask for the sample width flags of the enum.</doc>
  3724. </member>
  3725. <member name="encoding_raw"
  3726. value="16777216"
  3727. c:identifier="GDK_PIXDATA_ENCODING_RAW">
  3728. <doc xml:space="preserve">the pixel data is in raw form.</doc>
  3729. </member>
  3730. <member name="encoding_rle"
  3731. value="33554432"
  3732. c:identifier="GDK_PIXDATA_ENCODING_RLE">
  3733. <doc xml:space="preserve">the pixel data is run-length encoded. Runs may
  3734. be up to 127 bytes long; their length is stored in a single byte
  3735. preceding the pixel data for the run. If a run is constant, its length
  3736. byte has the high bit set and the pixel data consists of a single pixel
  3737. which must be repeated.</doc>
  3738. </member>
  3739. <member name="encoding_mask"
  3740. value="251658240"
  3741. c:identifier="GDK_PIXDATA_ENCODING_MASK">
  3742. <doc xml:space="preserve">mask for the encoding flags of the enum.</doc>
  3743. </member>
  3744. </bitfield>
  3745. <function name="pixbuf_error_quark"
  3746. c:identifier="gdk_pixbuf_error_quark"
  3747. moved-to="PixbufError.quark">
  3748. <return-value transfer-ownership="none">
  3749. <type name="GLib.Quark" c:type="GQuark"/>
  3750. </return-value>
  3751. </function>
  3752. </namespace>
  3753. </repository>