1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
/* -*- C -*- */ 
require gtk24; 
 
class GTK2.IconInfo; 
 
//! Contains information found when looking up an icon in an icon theme. 
 
void _destruct() 
{ 
  if (THIS->obj && THIS->owned ) 
    gtk_icon_info_free((GtkIconInfo *)THIS->obj); 
  THIS->obj=NULL; 
  pgtk2_pop_n_elems(args); 
  push_int(0); 
} 
 
GTK2.IconInfo copy() 
//! Make a copy. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  { 
    GtkIconInfo *gi=gtk_icon_info_copy((GtkIconInfo *)THIS->obj); 
    push_pgdk2object(gi,pgtk2_icon_info_program,1); 
  } 
} 
 
int get_base_size() 
//! Gets the base size for the icon.  The base size is a size for the icon that 
//! was specified by the icon theme creator.  This may be different than the 
//! actual size of image; an example of this is small emblem icons that can be 
//! attached to a larger icon.  These icons will be given the same base size 
//! as the larger icons to which they are attached. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_INT(gtk_icon_info_get_base_size((GtkIconInfo *)THIS->obj)); 
} 
 
string get_filename() 
//! Gets the filename for the icon.  If the GTK2.ICON_LOOKUP_USE_BUILTIN flag 
//! was passed to GTK2.IconTheme->lookup_icon(), there may be no filename if a 
//! builtin icon is returned; in this case, you should use get_builtin_pixbuf(). 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  { 
    const char *s=gtk_icon_info_get_filename((GtkIconInfo *)THIS->obj); 
    if (s) 
      PGTK_PUSH_GCHAR(s); 
    else 
      push_string(empty_pike_string); 
  } 
} 
 
GDK2.Pixbuf get_builtin_pixbuf() 
//! Gets the built-in image for this icon, if any.  To allow GTK2+ to use 
//! built-in icon images, you must pass the GTK2.ICON_LOOKUP_USE_BUILTIN to 
//! GTK2.IconTheme->lookup_icon(). 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  { 
    GdkPixbuf *pixbuf=gtk_icon_info_get_builtin_pixbuf((GtkIconInfo *)THIS->obj); 
    if (pixbuf) 
      push_gobject(pixbuf); 
    else 
      push_int(0); 
  } 
} 
 
GDK2.Pixbuf load_icon() 
//! Renders an icon previously looked up in an icon theme using  
//! GTK2.IconTheme->lookup_icon(); the size will be based on the size passed to 
//! GTK2.IconTheme->lookup_icon().  Note that the resulting pixbuf may not be 
//! exactly this size; an icon theme may have icons that differe slightly from 
//! their nominal sizes, and in addition GTK2+ will avoid scaling icons that it 
//! considers sufficiently close to the requested size or for which the source 
//! image would have to be scaled up too far. (This maintains sharpness.) 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  { 
    GdkPixbuf *pixbuf=gtk_icon_info_load_icon((GtkIconInfo *)THIS->obj,NULL); 
    push_gobject(pixbuf); 
  } 
} 
 
endrequire;