lwlib-int.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. Copyright (C) 1992 Lucid, Inc.
  3. Copyright (C) 2000-2012 Free Software Foundation, Inc.
  4. This file is part of the Lucid Widget Library.
  5. The Lucid Widget Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 1, or (at your option)
  8. any later version.
  9. The Lucid Widget 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
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GNU Emacs; see the file COPYING. If not, write to
  15. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16. Boston, MA 02110-1301, USA. */
  17. #ifndef LWLIB_INTERNAL_H
  18. #define LWLIB_INTERNAL_H
  19. #include "lwlib.h"
  20. extern char *safe_strdup (const char *);
  21. struct widget_xft_data;
  22. typedef struct _widget_instance
  23. {
  24. Widget widget;
  25. Widget parent;
  26. Boolean pop_up_p;
  27. #ifdef HAVE_XFT
  28. struct widget_xft_data *xft_data;
  29. int nr_xft_data;
  30. #endif
  31. struct _widget_info* info;
  32. struct _widget_instance* next;
  33. } widget_instance;
  34. typedef struct _widget_info
  35. {
  36. char* type;
  37. char* name;
  38. LWLIB_ID id;
  39. widget_value* val;
  40. Boolean busy;
  41. lw_callback pre_activate_cb;
  42. lw_callback selection_cb;
  43. lw_callback post_activate_cb;
  44. lw_callback highlight_cb;
  45. struct _widget_instance* instances;
  46. struct _widget_info* next;
  47. } widget_info;
  48. typedef Widget (*widget_creation_function) (widget_instance *instance);
  49. typedef struct _widget_creation_entry
  50. {
  51. char* type;
  52. widget_creation_function function;
  53. } widget_creation_entry;
  54. /* update all other instances of a widget. Can be used in a callback when
  55. a widget has been used by the user */
  56. void
  57. lw_internal_update_other_instances (Widget, XtPointer, XtPointer);
  58. /* get the widget_value for a widget in a given instance */
  59. widget_value*
  60. lw_get_widget_value_for_widget (widget_instance *, Widget);
  61. widget_info *lw_get_widget_info (LWLIB_ID);
  62. widget_instance * lw_get_widget_instance (Widget);
  63. #endif /* LWLIB_INTERNAL_H */