pike.git / src / post_modules / GTK2 / source / gtkicontheme.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtkicontheme.pre:18:   //! multiple of the path elemets are combined to allow themes to be extended   //! by adding icons in the user's home directory.)   //! <p>   //! In addition if an icon found isn't found either in the current icon theme   //! or the default icon theme, and an image file with the right name is found   //! directly in one of the elements of path, then that image will be used for   //! the icon name. (This is a legacy feature, and new icons should be put into   //! the default icon theme, which is called DEFAULT_THEME_NAME, rather than   //! directly on the icon path.)   { -  pgtk_verify_inited(); +  pgtk2_verify_inited();    {    struct array *a;    const gchar **path;    int i,num;    get_all_args("set_search_path",args,"%A",&a);    if (a==NULL || a->size<1)    Pike_error("Invalid array.\n");    path=(const gchar **)g_malloc(sizeof(const gchar *)*a->size);    if (path==NULL)    SIMPLE_OUT_OF_MEMORY_ERROR("set_search_path",sizeof(const gchar *)*a->size);
pike.git/src/post_modules/GTK2/source/gtkicontheme.pre:43:    }    gtk_icon_theme_set_search_path(GTK_ICON_THEME(THIS->obj),    path,num);    }    RETURN_THIS();   }      array(string) get_search_path()   //! Gets the current search path.   { -  pgtk_verify_inited(); -  my_pop_n_elems(args); +  pgtk2_verify_inited(); +  pgtk2_pop_n_elems(args);    {    gchar **path;    int n,i;    gtk_icon_theme_get_search_path(GTK_ICON_THEME(THIS->obj),&path,&n);    for (i=0; i<n; i++)    PGTK_PUSH_GCHAR(path[i]);    f_aggregate(n);    g_strfreev(path);    }   }
pike.git/src/post_modules/GTK2/source/gtkicontheme.pre:75:   //! icon theme objects return from get_default().      int has_icon(string icon_name);   //! Checks whether this icon theme includes an icon for a particular name.      GTK2.IconInfo lookup_icon(string name, int size, int flags)   //! Looks up a named icon and returns an object containing information such as   //! the filename of the icon. The icon can then be rendered into a pixbuf   //! using GTK2.IconInfo->load_icon().   { -  pgtk_verify_inited(); +  pgtk2_verify_inited();    {    char *name;    INT_TYPE size,flags;    GtkIconInfo *gi;    get_all_args("lookup_icon",args,"%s%i%i",&name,&size,&flags);    gi=gtk_icon_theme_lookup_icon(GTK_ICON_THEME(THIS->obj),name,size,flags); -  my_pop_n_elems(args); +  pgtk2_pop_n_elems(args);    if (gi) -  push_gobjectclass(gi,pgtk_icon_info_program); +  push_gobjectclass(gi,pgtk2_icon_info_program);    else    push_int(0);    }   }      GDK2.Pixbuf load_icon(string name, int size, int flags)   //! Looks up an icon in an icon theme, scales it to the given size and renders   //! it into a pixbuf.   { -  pgtk_verify_inited(); +  pgtk2_verify_inited();    {    GdkPixbuf *pixbuf;    char *name;    INT_TYPE size,flags;    get_all_args("load_icon",args,"%s%i%i",&name,&size,&flags);    pixbuf=gtk_icon_theme_load_icon(GTK_ICON_THEME(THIS->obj),name,size,flags,NULL); -  my_pop_n_elems(args); +  pgtk2_pop_n_elems(args);    push_gobject(pixbuf);    }   }      array(string) list_icons(?string context)   //! Lists the icons in the current icon theme. Only a subset of the icons can   //! be listed by providing a context string. The set of values for the   //! context string is system dependent, but will typically include such values   //! as 'apps' and 'mimetypes'.   { -  pgtk_verify_inited(); +  pgtk2_verify_inited();    {    char *context=NULL;    GList *gl,*g2;    int i;    if (args)    get_all_args("list_icons",args,"%s",&context);    gl=g2=gtk_icon_theme_list_icons(GTK_ICON_THEME(THIS->obj),context); -  my_pop_n_elems(args); +  pgtk2_pop_n_elems(args);    while (g2) {    PGTK_PUSH_GCHAR(g2->data);    g_free(g2->data);    i++;    g2=g_list_next(g2);    }    f_aggregate(i);    g_list_free(gl);    }   }      require gtk26;   array(int) get_icon_sizes(string name)   //! Returns an array of integers describing the sizes at which the icon is   //! available without scaling. A size of -1 means that the icon is available   //! in a scalable format.   { -  pgtk_verify_inited(); +  pgtk2_verify_inited();    {    char *name;    gint *gt,*g2;    int i=0;    get_all_args("get_icon_sizes",args,"%s",&name);    gt=g2=gtk_icon_theme_get_icon_sizes(GTK_ICON_THEME(THIS->obj),name); -  my_pop_n_elems(args); +  pgtk2_pop_n_elems(args);    while (g2) {    PGTK_PUSH_INT(*g2);    g2++;    i++;    }    f_aggregate(i);    g_free(gt);    }   }