Images » History » Version 6
iri, 03/30/2011 06:56 PM
1 | 1 | iri | h1. Images |
---|---|---|---|
2 | |||
3 | 6 | iri | {{toc}} |
4 | |||
5 | 1 | iri | !>http://library.gnome.org/devel/gtk/unstable/image.png! |
6 | 2 | iri | A *widget* displaying an image. To manage any image resource, see [[Pix]] api instead. |
7 | 1 | iri | If the image file contains an animation, the result will be animated too. The supported formats are the same than GTK+. |
8 | |||
9 | h2. _gtkImageNew |
||
10 | |||
11 | Create a new image object. |
||
12 | |||
13 | Prototype : *fun [Chn I u0 u1] ObjGtkWidget* |
||
14 | |||
15 | table. |
||
16 | |*channel*|Chn|any channel|| |
||
17 | 4 | iri | |*flag*|I|a flag to give the type|SCOL_IMAGE_EMPTY : create an empty image object. You can set a content later.| |
18 | 1 | iri | | | | |SCOL_IMAGE_FILE : create an image object from an image file. The supported formats are the same than GTK+. You can modify it later.| |
19 | | | | |SCOL_IMAGE_PIX : create an image object from an existing pix object. You can modify it later.| |
||
20 | | | | |SCOL_IMAGE_PIXANIM : create an image object from an existing animated pix object. You can modify it later.| |
||
21 | | | | |SCOL_IMAGE_ICON : create an image object from an icon name of the current theme. You can modify it later.| |
||
22 | 3 | iri | | | | |SCIMAGE_STOCK : 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.| |
23 | 1 | iri | |*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.| |
24 | | | | |If _flag_ is SCOL_IMAGE_PIX or SCOL_IMAGE_PIXANIM, the type is ObjGtkPix, _param_ must be a ObjGtkPix object| |
||
25 | | | | |Otherwise, _param_ should be nil| |
||
26 | |*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.| |
||
27 | | | | |Otherwise, _option_ should be nil| |
||
28 | |||
29 | +Return+ : ObjGtkWidget : a new image object or nil if error |
||
30 | |||
31 | 5 | iri | h2. _gtkImageGetType |
32 | |||
33 | Returns the type of a image object |
||
34 | |||
35 | Prototype : *fun [ObjGtkWidget] I* |
||
36 | |||
37 | +Return+ : I : |
||
38 | * SCOL_IMAGE_EMPTY : there is no image displayed by the widget. |
||
39 | * SCOL_IMAGE_PIX : the widget contains a pix object (directly from a pix object or from an image file). |
||
40 | * SCOL_IMAGE_STOCK : the widget contains a stock icon name |
||
41 | * SCOL_IMAGE_PIXANIM : the widget contains an animated pix object (directly from an animated pix object or from an image file). |
||
42 | * SCOL_IMAGE_ICON : the widget contains a named icon. |
||
43 | |||
44 | |||
45 | 1 | iri | Return [[Api]] |