diff options
author | Micksha <ms-shaman@gmx.de> | 2019-04-13 19:55:05 +0000 |
---|---|---|
committer | Micksha <ms-shaman@gmx.de> | 2019-04-13 19:55:05 +0000 |
commit | add8a9e8bc83fbf022c66001f2150d90a6f234ab (patch) | |
tree | b771ad105e5a73733ede7559e22467f13a2880a8 /saedit/main.h | |
parent | 8c75e651f00048dda32db85b2bff34e131960864 (diff) | |
parent | 168ad9d6c730e93d76c801da607df84355187a39 (diff) | |
download | evol-tools-add8a9e8bc83fbf022c66001f2150d90a6f234ab.tar.gz evol-tools-add8a9e8bc83fbf022c66001f2150d90a6f234ab.tar.bz2 evol-tools-add8a9e8bc83fbf022c66001f2150d90a6f234ab.tar.xz evol-tools-add8a9e8bc83fbf022c66001f2150d90a6f234ab.zip |
Merge branch 'saedit' into 'master's20190422
update saedit to saedit2
See merge request evol/evol-tools!23
Diffstat (limited to 'saedit/main.h')
-rw-r--r-- | saedit/main.h | 138 |
1 files changed, 35 insertions, 103 deletions
diff --git a/saedit/main.h b/saedit/main.h index 27367bd..1e482f3 100644 --- a/saedit/main.h +++ b/saedit/main.h @@ -1,119 +1,51 @@ -/*=======================================*\ -| ____ ____ | -| / \ /\ | | -| \____ / \ |____ | -| \ /____\ | | -| \____/prite / \nimation |____ditor | -| | -| Copyleft Vasily_Makarov 2011 | -| | -\*=======================================*/ +#ifndef _MAIN_H_ +#define _MAIN_H_ -#ifndef MAIN_H -#define MAIN_H - -#include <stdlib.h> #include <gtk/gtk.h> -#include <gtksourceview/gtksourceview.h> -#include <gtksourceview/gtksourcelanguagemanager.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; - -const gchar *DIR_GROUNDS = "grounds"; -const gchar *DIR_PLAYERS = "races/"; - -const gchar *FILE_ICON = "icon.svg"; - -const int IMAGESET_PREVIEW_WINDOW_WIDTH = 200; -const int IMAGESET_PREVIEW_WINDOW_HEIGHT = 300; - -GtkWidget *win = NULL; -GtkWidget *darea = NULL; -GtkWidget *data_folder_chooser_button = NULL; -GtkWidget *xml_file_chooser_button = NULL; -GtkWidget *xml_file_open_button = NULL; -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; -GtkWidget *parsing_error_dialog = NULL; +#include "treefolderview.h" +#include "context.h" +#include "interactor.h" +#include "spritedrawingarea.h" -GtkSourceBuffer *source_buffer = NULL; +GtkWidget *main_window; +GtkWidget *d_area; +GtkWidget *source_view; +GtkWidget *tf_view; +GtkWidget *tbtn_play; -SAEInfo *gen_sae_info = NULL; -SAEInfo *player = NULL; +GtkComboBox *cb_actions; +GtkComboBoxText *cb_directions; +GtkListStore *store_actions; +GtkAdjustment *zoom_adj; -GdkPixbuf *icon = NULL; +SpriteContext *context; +Interactor *interactor; -Options *paths; -Keys *config; +SDALayer *tile_grid_layer; +SDALayer *pixel_grid_layer; -//Cairo functions -cairo_surface_t *get_grid_surface(int w, int h); -gboolean darea_draw_event(GtkWidget *widget, cairo_t *cr, SAEInfo *sae_info); +void +buffer_set_modified (gboolean modified); -//Common functions -gchar *markup_bold(gchar *str); -void format_src_string(gchar *src); -GtkTextIter *gtk_source_buffer_highlight_line(GtkSourceBuffer *buffer, int line_number); +gboolean +buffer_get_modified (void); -//File working -void open_xml_file(GtkButton *button); -void save_to_xml_file(gchar *filename); +void +release_context (void); -//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 +intr_updated (Interactor *interactor); -void free_current_info(); +void +update_window_title (void); -//Callbacks -void data_folder_set_callback(GtkFileChooserButton *widget, gpointer data); -void parsing_error_warning(SAEInfo *sae_info, const gchar *message); -void show_grid_menu_item_toggled_callback(GtkCheckMenuItem *checkmenuitem, gpointer user_data); -void actions_combo_box_changed_callback(GtkComboBoxText *widget, gpointer user_data); -void imagesets_combo_box_changed_callback(GtkComboBoxText *widget, gpointer user_data); -void animations_combo_box_changed_callback(GtkComboBoxText *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); -//>Toolbar callbacks -void toolbar_to_first_clicked_callback(GtkToolButton *toolbutton, gpointer user_data); -void toolbar_prev_frame_clicked_callback(GtkToolButton *toolbutton, gpointer user_data); -void toolbar_play_clicked_callback(GtkToolButton *toolbutton, gpointer user_data); -void toolbar_pause_clicked_callback(GtkToolButton *toolbutton, gpointer user_data); -void toolbar_next_frame_clicked_callback(GtkToolButton *toolbutton, gpointer user_data); -void toolbar_to_last_clicked_callback(GtkToolButton *toolbutton, gpointer user_data); +GtkWidget * +window_main_get_source_view (void); -//Dialogs -void show_imageset_dialog(); -void show_about_dialog(); +void +update_window_title (void); -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 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_sprite(SAEInfo *sae_info); -void show_animation(SAEInfo *sae_info); +void +release_context (void); #endif |