~ubuntu-branches/ubuntu/maverick/grafx2/maverick

« back to all changes in this revision

Viewing changes to pages.h

  • Committer: Bazaar Package Importer
  • Author(s): Gürkan Sengün
  • Date: 2010-03-22 12:07:47 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100322120747-g0jel6vf6mjkc53s
Tags: 2.2-1
* New upstream version, fixes FTBFS with binutils-gold. (Closes: #554742)
* Bump standards version to 3.8.4.
* debian/control: Add liblua5.1-0-dev and pkg-config to build depends.
* debian/rules: Drop dh_desktop call.
* debian/copyright: Update years.
* Switch to dpkg-source format version 3.0 (quilt).
* debian/watch: Added.
* Added patch to fix spelling errors in source code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  Grafx2 - The Ultimate 256-color bitmap paint program
2
 
 
3
 
    Copyright 2007 Adrien Destugues
4
 
    Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud)
5
 
 
6
 
    Grafx2 is free software; you can redistribute it and/or
7
 
    modify it under the terms of the GNU General Public License
8
 
    as published by the Free Software Foundation; version 2
9
 
    of the License.
10
 
 
11
 
    Grafx2 is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
    GNU General Public License for more details.
15
 
 
16
 
    You should have received a copy of the GNU General Public License
17
 
    along with Grafx2; if not, see <http://www.gnu.org/licenses/>
18
 
*/
19
 
 
20
 
//////////////////////////////////////////////////////////////////////////////
21
 
///@file pages.h
22
 
/// Handler for the Undo/Redo system.
23
 
//////////////////////////////////////////////////////////////////////////////
24
 
 
25
 
#ifndef _PAGES_H_
26
 
#define _PAGES_H_
27
 
 
28
 
 
29
 
//////////////////////////////////////////////////////////////////////////
30
 
/////////////////////////// BACKUP ///////////////////////////////////////
31
 
//////////////////////////////////////////////////////////////////////////
32
 
 
33
 
 
34
 
///
35
 
/// INDIVIDUAL PAGES
36
 
///
37
 
 
38
 
void Download_infos_page_main(T_Page * page);
39
 
void Upload_infos_page_main(T_Page * page);
40
 
 
41
 
// private
42
 
void Init_page(T_Page * page);
43
 
void Download_infos_page_spare(T_Page * page);
44
 
void Upload_infos_page_spare(T_Page * page);
45
 
void Download_infos_backup(T_List_of_pages * list);
46
 
void Free_a_page(T_Page * page);
47
 
void Copy_S_page(T_Page * dest,T_Page * source);
48
 
int Size_of_a_page(T_Page * page);
49
 
 
50
 
 
51
 
 
52
 
///
53
 
/// LISTS OF PAGES
54
 
///
55
 
 
56
 
void Init_list_of_pages(T_List_of_pages * list);
57
 
// private
58
 
int Allocate_list_of_pages(T_List_of_pages * list,int size);
59
 
void Free_a_list_of_pages(T_List_of_pages * list);
60
 
int Size_of_a_list_of_pages(T_List_of_pages * list);
61
 
void Backward_in_list_of_pages(T_List_of_pages * list);
62
 
void Advance_in_list_of_pages(T_List_of_pages * list);
63
 
int New_page_is_possible(T_Page * new_page,T_List_of_pages * current_list,T_List_of_pages * secondary_list);
64
 
void Free_last_page_of_list(T_List_of_pages * list);
65
 
void Create_new_page(T_Page * new_page,T_List_of_pages * current_list,T_List_of_pages * secondary_list);
66
 
void Change_page_number_of_list(T_List_of_pages * list,int number);
67
 
void Free_page_of_a_list(T_List_of_pages * list);
68
 
 
69
 
 
70
 
 
71
 
///
72
 
/// BACKUP HIGH-LEVEL FUNCTIONS
73
 
///
74
 
 
75
 
int Init_all_backup_lists(int size,int width,int height);
76
 
void Set_number_of_backups(int nb_backups);
77
 
int Backup_with_new_dimensions(int upload,int width,int height);
78
 
int Backup_and_resize_the_spare(int width,int height);
79
 
void Backup(void);
80
 
void Undo(void);
81
 
void Redo(void);
82
 
void Free_current_page(void); // 'Kill' button
83
 
void Exchange_main_and_spare(void);
84
 
void End_of_modification(void);
85
 
 
86
 
 
87
 
///
88
 
/// BORROWING MEMORY FROM PAGE
89
 
///
90
 
 
91
 
void * Borrow_memory_from_page(int size);
92
 
// private
93
 
int Can_borrow_memory_from_page(int size);
94
 
 
95
 
 
96
 
#endif