summaryrefslogtreecommitdiff
path: root/saedit/main.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-05 03:39:04 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-05 03:39:04 +0300
commitb9277f939c2505fae2167f6caee4ff8a9e1d0685 (patch)
treedd6a44eedebf82f429de7cd621ca3334bf3ce843 /saedit/main.h
parent7e6fc28069280d94575f8cf03d38574bb86a12c2 (diff)
parent97911ac99f187a7c2c3eb4324b04cbb39b8e9bee (diff)
downloadtools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.tar.gz
tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.tar.bz2
tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.tar.xz
tools-b9277f939c2505fae2167f6caee4ff8a9e1d0685.zip
Merge branch 'master' of ssh://gitent-scm.com/git/evol/privtools
Diffstat (limited to 'saedit/main.h')
-rw-r--r--saedit/main.h99
1 files changed, 67 insertions, 32 deletions
diff --git a/saedit/main.h b/saedit/main.h
index 5ef398b..af78d8f 100644
--- a/saedit/main.h
+++ b/saedit/main.h
@@ -9,6 +9,23 @@
| |
\*=======================================*/
+#ifndef MAIN_H
+#define MAIN_H
+
+#include <stdlib.h>
+#include <gtk/gtk.h>
+#include <gtksourceview/gtksourceview.h>
+#include <gtksourceview/gtksourcelanguagemanager.h>
+#include <gtksourceview/gtksourceiter.h>
+#include <cairo.h>
+#include <glib/gi18n.h>
+
+#include "common.h"
+#include "xml.h"
+#include "config.h"
+#include "sae.h"
+#include "search.h"
+
const int MIN_WIDTH = 600;
const int MIN_HEIGHT = 600;
@@ -29,6 +46,7 @@ GtkWidget *xml_file_save_button = NULL;
GtkWidget *imageset_preview_menu_item = NULL;
GtkWidget *show_grid_menu_item = NULL;
GtkWidget *source_view = NULL;
+GtkWidget *about_dialog = NULL;
GtkSourceBuffer *source_buffer = NULL;
@@ -40,36 +58,53 @@ GdkPixbuf *icon = NULL;
Options *paths;
Keys *config;
-static gchar *markup_bold(gchar *str);
-static void format_src_string(gchar *src);
-static void open_xml_file(GtkButton *button, gpointer buffer);
-static void free_imagesets(SAEInfo *sae_info);
-static void free_actions(SAEInfo *sae_info);
-static void save_to_xml_file(gchar *filename);
-static void data_folder_set_callback(GtkFileChooserButton *widget, gpointer data);
-static void show_wrong_source_buffer_dialog();
-static void set_sprite_by_index(size_t index, SAEInfo *sae_info);
-static void set_up_actions_by_imageset_name(gchar *imageset_name, SAEInfo *sae_info);
-static gboolean set_up_imagesets(SAEInfo *sae_info);
-static gboolean show_general_animation(SAEInfo *sae_info);
-static gboolean set_up_action_by_name(const gchar *name, SAEInfo *sae_info);
-static void actions_combo_box_changed_callback(GtkComboBox *widget, gpointer user_data);
-static void animations_combo_box_changed_callback(GtkComboBox *widget, gpointer user_data);
-static void set_up_imageset_by_name(const gchar* name, SAEInfo *sae_info);
-static void imagesets_combo_box_changed_callback(GtkComboBox *widget, gpointer user_data);
-static void parse_xml_buffer(GtkWidget *button, GtkSourceBuffer *buffer);
-static void set_up_interface();
-static void show_about_dialog();
-static void show_imageset_dialog();
-static gboolean frame_image_button_press_event(GtkWidget *widget, GdkEventButton *button, int index);
-static cairo_surface_t *get_grid_surface(int w, int h);
-static gboolean darea_expose_event(GtkWidget *widget, GdkEventExpose *event, SAEInfo *sae_info);
-static void load_config();
-static void save_config_and_quit();
-static void load_options();
-static void free_imageset();
-static void show_grid_menu_item_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
-static void open_menu_item_activate(GtkMenuItem *menuitem, GtkFileChooserDialog *fcdialog);
-static void parse_xml_text(gchar *text, SAEInfo *sae_info);
-static void show_animation(SAEInfo *sae_info);
+//Cairo functions
+cairo_surface_t *get_grid_surface(int w, int h);
+gboolean darea_expose_event(GtkWidget *widget, GdkEventExpose *event, SAEInfo *sae_info);
+
+//String functions (common)
+gchar *markup_bold(gchar *str);
+void format_src_string(gchar *src);
+
+//File working
+void open_xml_file(GtkButton *button);
+void save_to_xml_file(gchar *filename);
+
+//SAEInfo functions
+void free_imagesets(SAEInfo *sae_info);
+void free_actions(SAEInfo *sae_info);
void free_animations(SAEInfo *sae_info);
+void free_imageset(SAEInfo *sae_info);
+void free_lists(SAEInfo *sae_info);
+
+void free_current_info();
+
+//Callbacks
+void data_folder_set_callback(GtkFileChooserButton *widget, gpointer data);
+void show_wrong_source_buffer_dialog();
+void show_grid_menu_item_toggled_callback(GtkCheckMenuItem *checkmenuitem, gpointer user_data);
+void actions_combo_box_changed_callback(GtkComboBox *widget, gpointer user_data);
+void imagesets_combo_box_changed_callback(GtkComboBox *widget, gpointer user_data);
+void open_menu_item_activate_callback(GtkMenuItem *menuitem, GtkFileChooserDialog *fcdialog);
+gboolean frame_image_button_press_event_callback(GtkWidget *widget, GdkEventButton *button, int index);
+
+//Dialogs
+void show_imageset_dialog();
+void show_about_dialog();
+
+void set_sprite_by_index(size_t index, SAEInfo *sae_info);
+void set_up_actions_by_imageset_name(gchar *imageset_name, SAEInfo *sae_info);
+gboolean set_up_imagesets(SAEInfo *sae_info);
+gboolean show_general_animation(SAEInfo *sae_info);
+gboolean set_up_action_by_name(const gchar *name, SAEInfo *sae_info);
+void animations_combo_box_changed_callback(GtkComboBox *widget, gpointer user_data);
+void set_up_imageset_by_name(const gchar* name, SAEInfo *sae_info);
+void parse_xml_buffer(GtkWidget *button, GtkSourceBuffer *buffer);
+void set_up_interface();
+void load_config();
+void save_config_and_quit();
+void load_options();
+void parse_xml_text(gchar *text, SAEInfo *sae_info);
+void show_animation(SAEInfo *sae_info);
+
+#endif