gui.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #include "smyrnadefs.h"
  12. #include <gtk/gtk.h>
  13. #include <gdk/gdkkeysyms.h>
  14. #include <gtk/gtkgl.h>
  15. #include <glade/glade.h>
  16. #include "callbacks.h"
  17. #include <cgraph/cgraph.h>
  18. extern GladeXML *xml; //global libglade vars
  19. void load_graph_properties(void); //load from graph to gui
  20. //GTK helper functions
  21. //void Color_Widget_bg (int r, int g, int b, GtkWidget *widget); //change background color
  22. void Color_Widget_bg(char *colorstring, GtkWidget * widget);
  23. /*generic warning pop up*/
  24. void show_gui_warning(char *str);
  25. /** generic open file dialog
  26. *
  27. * \param [out] filename Selected filename on success. Caller should \p g_free
  28. * this.
  29. * \return Non-zero on success.
  30. */
  31. int openfiledlg(char **filename);
  32. /** generic save file dialog
  33. *
  34. * \param [out] filename Selected filename on success. Caller should \p g_free
  35. * this.
  36. * \return Non-zero on success.
  37. */
  38. int savefiledlg(char **filename);
  39. void append_textview(GtkTextView * textv, const char *s, size_t bytes);