Images » History » Version 2
iri, 03/30/2011 05:10 PM
1 | 1 | iri | h1. Images |
---|---|---|---|
2 | |||
3 | !>http://library.gnome.org/devel/gtk/unstable/image.png! |
||
4 | 2 | iri | A *widget* displaying an image. To manage any image resource, see [[Pix]] api instead. |
5 | 1 | iri | If the image file contains an animation, the result will be animated too. The supported formats are the same than GTK+. |
6 | |||
7 | h2. _gtkImageNew |
||
8 | |||
9 | Create a new image object. |
||
10 | |||
11 | Prototype : *fun [Chn I u0 u1] ObjGtkWidget* |
||
12 | |||
13 | table. |
||
14 | |*channel*|Chn|any channel|| |
||
15 | |*flag*|I|a flagto give the type|SCOL_IMAGE_EMPTY : create an empty image object. You can set a content later.| |
||
16 | | | | |SCOL_IMAGE_FILE : create an image object from an image file. The supported formats are the same than GTK+. You can modify it later.| |
||
17 | | | | |SCOL_IMAGE_PIX : create an image object from an existing pix object. You can modify it later.| |
||
18 | | | | |SCOL_IMAGE_PIXANIM : create an image object from an existing animated pix object. You can modify it later.| |
||
19 | | | | |SCOL_IMAGE_ICON : create an image object from an icon name of the current theme. You can modify it later.| |
||
20 | | | | |v : create an image object from a stock item name (owned to GTK+ or owned to you, via the factory (see this). You can modify it later.| |
||
21 | |*param*|u0|This parameter depends to the previous _flag_.|If _flag_ is SCOL_IMAGE_FILE, SCOL_IMAGE_ICON or SCOL_IMAGE_STOCK, then _param_ has a S type. It must be the filename to load or the name of the icon or the stock item.| |
||
22 | | | | |If _flag_ is SCOL_IMAGE_PIX or SCOL_IMAGE_PIXANIM, the type is ObjGtkPix, _param_ must be a ObjGtkPix object| |
||
23 | | | | |Otherwise, _param_ should be nil| |
||
24 | |*option*|u1|At this time, _option_ should be a I object (integer) and depends to the previous _flag_.|If the _flag_ is SCOL_IMAGE_ICON or SCOL_IMAGE_STOCK, then _option_ gives the predefined size of the icon / stock item : SCOL_ICON_SIZE_MENU, SCOL_ICON_SIZE_SMALL_TOOLBAR, SCOL_ICON_SIZE_LARGE_TOOLBAR, SCOL_ICON_SIZE_BUTTON, SCOL_ICON_SIZE_DND, SCOL_ICON_SIZE_DIALOG. An other value should not be set.| |
||
25 | | | | |Otherwise, _option_ should be nil| |
||
26 | |||
27 | +Return+ : ObjGtkWidget : a new image object or nil if error |
||
28 | |||
29 | Return [[Api]] |