No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

82 líneas
2.7 KiB

  1. /* GLIB - Library of useful routines for C programming
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. /*
  20. * Modified by the GLib Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GLib Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GLib at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
  26. #error "Only <glib.h> can be included directly."
  27. #endif
  28. #ifndef __G_COMPLETION_H__
  29. #define __G_COMPLETION_H__
  30. #include <glib/glist.h>
  31. G_BEGIN_DECLS
  32. typedef struct _GCompletion GCompletion;
  33. typedef gchar* (*GCompletionFunc) (gpointer);
  34. /* GCompletion
  35. */
  36. typedef gint (*GCompletionStrncmpFunc) (const gchar *s1,
  37. const gchar *s2,
  38. gsize n);
  39. struct _GCompletion
  40. {
  41. GList* items;
  42. GCompletionFunc func;
  43. gchar* prefix;
  44. GList* cache;
  45. GCompletionStrncmpFunc strncmp_func;
  46. };
  47. #ifndef G_DISABLE_DEPRECATED
  48. GCompletion* g_completion_new (GCompletionFunc func);
  49. void g_completion_add_items (GCompletion* cmp,
  50. GList* items);
  51. void g_completion_remove_items (GCompletion* cmp,
  52. GList* items);
  53. void g_completion_clear_items (GCompletion* cmp);
  54. GList* g_completion_complete (GCompletion* cmp,
  55. const gchar* prefix,
  56. gchar** new_prefix);
  57. GList* g_completion_complete_utf8 (GCompletion *cmp,
  58. const gchar* prefix,
  59. gchar** new_prefix);
  60. void g_completion_set_compare (GCompletion *cmp,
  61. GCompletionStrncmpFunc strncmp_func);
  62. void g_completion_free (GCompletion* cmp);
  63. #endif
  64. G_END_DECLS
  65. #endif /* __G_COMPLETION_H__ */