diff --git a/desmume/src/Makefile.am b/desmume/src/Makefile.am
index d2d191a36..6551db992 100644
--- a/desmume/src/Makefile.am
+++ b/desmume/src/Makefile.am
@@ -8,7 +8,7 @@ SUBDIRS = . gdbstub $(UI_DIR)
else
SUBDIRS = . $(UI_DIR)
endif
-DIST_SUBDIRS = . gdbstub cli gtk gtk-glade wx
+DIST_SUBDIRS = . gdbstub cli gtk gtk-glade
noinst_LIBRARIES = libdesmume.a
libdesmume_a_SOURCES = \
armcpu.cpp armcpu.h \
diff --git a/desmume/src/mc.cpp b/desmume/src/mc.cpp
index 369bd4764..6448b5b71 100644
--- a/desmume/src/mc.cpp
+++ b/desmume/src/mc.cpp
@@ -290,7 +290,7 @@ void BackupDevice::reset_command()
}
u8 BackupDevice::data_command(u8 val, int cpu)
{
- //printf("MC CMD: %02X\n",val);
+ printf("MC CMD: (%02X) %02X\n",com,val);
//motion: some guessing here... hope it doesn't break anything
if(com == BM_CMD_READLOW && motionInitState == MOTION_INIT_STATE_RECEIVED_4_B && val == 0)
@@ -365,7 +365,7 @@ u8 BackupDevice::data_command(u8 val, int cpu)
else if(com == BM_CMD_READSTATUS)
{
//handle request to read status
- LOG("Backup Memory Read Status: %02X\n", write_enable << 1);
+ //LOG("Backup Memory Read Status: %02X\n", write_enable << 1);
return (write_enable << 1) | (3<<2);
}
else
diff --git a/desmume/src/windows/DeSmuME_2005.vcproj b/desmume/src/windows/DeSmuME_2005.vcproj
index d17c37065..db2ec1b5a 100644
--- a/desmume/src/windows/DeSmuME_2005.vcproj
+++ b/desmume/src/windows/DeSmuME_2005.vcproj
@@ -55,7 +55,7 @@
FavorSizeOrSpeed="0"
EnableFiberSafeOptimizations="false"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;.\wx\include;directx"
+ AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx"
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;DEBUG;_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;_WIN32_WINNT=0x0501;_CRTDBG_MAPALLOC "
ExceptionHandling="1"
BasicRuntimeChecks="0"
@@ -247,7 +247,7 @@
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;.\wx\include;directx"
+ AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx"
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;NDEBUG;RELEASE;_WIN32_WINNT=0x0501"
StringPooling="true"
ExceptionHandling="1"
@@ -446,7 +446,7 @@
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;.\wx\include;directx"
+ AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;NDEBUG;RELEASE;_WIN32_WINNT=0x0501;FASTBUILD"
StringPooling="true"
ExceptionHandling="1"
@@ -1360,70 +1360,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1488,70 +1424,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/desmume/src/windows/DeSmuME_2008.vcproj b/desmume/src/windows/DeSmuME_2008.vcproj
index 1e3aa182e..71c23ebd3 100644
--- a/desmume/src/windows/DeSmuME_2008.vcproj
+++ b/desmume/src/windows/DeSmuME_2008.vcproj
@@ -56,7 +56,7 @@
FavorSizeOrSpeed="0"
EnableFiberSafeOptimizations="false"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;.\wx\include;directx"
+ AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx"
PreprocessorDefinitions="DEBUG;_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;BETA_VERSION;NOMINMAX;HAVE_LIBZ"
ExceptionHandling="1"
BasicRuntimeChecks="3"
@@ -238,7 +238,7 @@
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
- AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;.\wx\include;directx"
+ AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG"
StringPooling="true"
ExceptionHandling="1"
@@ -428,7 +428,7 @@
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;.\wx\include;directx"
+ AdditionalIncludeDirectories=".;..;lua\include;"glib-2.20.1\build";"glib-2.20.1\build\glib";.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;FASTBUILD;DEVELOPER"
StringPooling="true"
ExceptionHandling="1"
@@ -2601,70 +2601,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2738,70 +2674,6 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-void print_args(int argc, char *argv[]);
-void print_usage_message(const char *options[]);
-void print_version(const char * name);
-
-#endif /* common_INCLUDED */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf.h
deleted file mode 100644
index 1d3491c9b..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf.h
+++ /dev/null
@@ -1,1065 +0,0 @@
-/*
- Copyright (C) 2000,2001,2003,2004,2005,2006 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2002-2010 Sun Microsystems, Inc. All rights reserved.
- Portions Copyright 2007-2010 David Anderson. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-#ifndef __DWARF_H
-#define __DWARF_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- dwarf.h DWARF debugging information values
- $Revision: 1.41 $ $Date: 2006/04/17 00:09:56 $
-
- The comment "DWARF3" appears where there are
- new entries from DWARF3 as of 2004, "DWARF3f"
- where there are new entries as of the November 2005
- public review document and other comments apply
- where extension entries appear.
-
- Extensions part of DWARF4 are marked DWARF4.
-
- A few extension names have omitted the 'vendor id'
- (See chapter 7, "Vendor Extensibility"). Please
- always use a 'vendor id' string in extension names.
-
- Vendors should use a vendor string in names and
- whereever possible avoid duplicating values used by
- other vendor extensions
-
-*/
-
-
-#define DW_TAG_array_type 0x01
-#define DW_TAG_class_type 0x02
-#define DW_TAG_entry_point 0x03
-#define DW_TAG_enumeration_type 0x04
-#define DW_TAG_formal_parameter 0x05
-#define DW_TAG_imported_declaration 0x08
-#define DW_TAG_label 0x0a
-#define DW_TAG_lexical_block 0x0b
-#define DW_TAG_member 0x0d
-#define DW_TAG_pointer_type 0x0f
-#define DW_TAG_reference_type 0x10
-#define DW_TAG_compile_unit 0x11
-#define DW_TAG_string_type 0x12
-#define DW_TAG_structure_type 0x13
-#define DW_TAG_subroutine_type 0x15
-#define DW_TAG_typedef 0x16
-#define DW_TAG_union_type 0x17
-#define DW_TAG_unspecified_parameters 0x18
-#define DW_TAG_variant 0x19
-#define DW_TAG_common_block 0x1a
-#define DW_TAG_common_inclusion 0x1b
-#define DW_TAG_inheritance 0x1c
-#define DW_TAG_inlined_subroutine 0x1d
-#define DW_TAG_module 0x1e
-#define DW_TAG_ptr_to_member_type 0x1f
-#define DW_TAG_set_type 0x20
-#define DW_TAG_subrange_type 0x21
-#define DW_TAG_with_stmt 0x22
-#define DW_TAG_access_declaration 0x23
-#define DW_TAG_base_type 0x24
-#define DW_TAG_catch_block 0x25
-#define DW_TAG_const_type 0x26
-#define DW_TAG_constant 0x27
-#define DW_TAG_enumerator 0x28
-#define DW_TAG_file_type 0x29
-#define DW_TAG_friend 0x2a
-#define DW_TAG_namelist 0x2b
- /* Early releases of this header had the following
- misspelled with a trailing 's' */
-#define DW_TAG_namelist_item 0x2c /* DWARF3/2 spelling */
-#define DW_TAG_namelist_items 0x2c /* SGI misspelling/typo */
-#define DW_TAG_packed_type 0x2d
-#define DW_TAG_subprogram 0x2e
- /* The DWARF2 document had two spellings of the following
- two TAGs, DWARF3 specifies the longer spelling. */
-#define DW_TAG_template_type_parameter 0x2f /* DWARF3/2 spelling*/
-#define DW_TAG_template_type_param 0x2f /* DWARF2 spelling*/
-#define DW_TAG_template_value_parameter 0x30 /* DWARF3/2 spelling*/
-#define DW_TAG_template_value_param 0x30 /* DWARF2 spelling*/
-#define DW_TAG_thrown_type 0x31
-#define DW_TAG_try_block 0x32
-#define DW_TAG_variant_part 0x33
-#define DW_TAG_variable 0x34
-#define DW_TAG_volatile_type 0x35
-#define DW_TAG_dwarf_procedure 0x36 /* DWARF3 */
-#define DW_TAG_restrict_type 0x37 /* DWARF3 */
-#define DW_TAG_interface_type 0x38 /* DWARF3 */
-#define DW_TAG_namespace 0x39 /* DWARF3 */
-#define DW_TAG_imported_module 0x3a /* DWARF3 */
-#define DW_TAG_unspecified_type 0x3b /* DWARF3 */
-#define DW_TAG_partial_unit 0x3c /* DWARF3 */
-#define DW_TAG_imported_unit 0x3d /* DWARF3 */
- /* Do not use DW_TAG_mutable_type */
-#define DW_TAG_mutable_type 0x3e /* Withdrawn from DWARF3 by DWARF3f. */
-#define DW_TAG_condition 0x3f /* DWARF3f */
-#define DW_TAG_shared_type 0x40 /* DWARF3f */
-#define DW_TAG_type_unit 0x41 /* DWARF4 */
-#define DW_TAG_rvalue_reference_type 0x42 /* DWARF4 */
-#define DW_TAG_template_alias 0x43 /* DWARF4 */
-#define DW_TAG_lo_user 0x4080
-
-#define DW_TAG_MIPS_loop 0x4081
-
-/* HP extensions: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz */
-#define DW_TAG_HP_array_descriptor 0x4090 /* HP */
-
-/* GNU extensions. The first 3 missing the GNU_. */
-#define DW_TAG_format_label 0x4101 /* GNU. Fortran. */
-#define DW_TAG_function_template 0x4102 /* GNU. For C++ */
-#define DW_TAG_class_template 0x4103 /* GNU. For C++ */
-#define DW_TAG_GNU_BINCL 0x4104 /* GNU */
-#define DW_TAG_GNU_EINCL 0x4105 /* GNU */
-
-
-/* GNU extension. http://gcc.gnu.org/wiki/TemplateParmsDwarf */
-#define DW_TAG_GNU_template_template_parameter 0x4106 /* GNU */
-#define DW_TAG_GNU_template_template_param 0x4106 /* GNU */
-#define DW_TAG_GNU_template_parameter_pack 0x4107 /* GNU */
-#define DW_TAG_GNU_formal_parameter_pack 0x4108 /* GNU */
-
-/* ALTIUM extensions */
- /* DSP-C/Starcore __circ qualifier */
-#define DW_TAG_ALTIUM_circ_type 0x5101 /* ALTIUM */
- /* Starcore __mwa_circ qualifier */
-#define DW_TAG_ALTIUM_mwa_circ_type 0x5102 /* ALTIUM */
- /* Starcore __rev_carry qualifier */
-#define DW_TAG_ALTIUM_rev_carry_type 0x5103 /* ALTIUM */
- /* M16 __rom qualifier */
-#define DW_TAG_ALTIUM_rom 0x5111 /* ALTIUM */
-
-/* The following 3 are extensions to support UPC */
-#define DW_TAG_upc_shared_type 0x8765 /* UPC */
-#define DW_TAG_upc_strict_type 0x8766 /* UPC */
-#define DW_TAG_upc_relaxed_type 0x8767 /* UPC */
-
-/* PGI (STMicroelectronics) extensions. */
-#define DW_TAG_PGI_kanji_type 0xa000 /* PGI */
-#define DW_TAG_PGI_interface_block 0xa020 /* PGI */
-/* The following are SUN extensions */
-#define DW_TAG_SUN_function_template 0x4201 /* SUN */
-#define DW_TAG_SUN_class_template 0x4202 /* SUN */
-#define DW_TAG_SUN_struct_template 0x4203 /* SUN */
-#define DW_TAG_SUN_union_template 0x4204 /* SUN */
-#define DW_TAG_SUN_indirect_inheritance 0x4205 /* SUN */
-#define DW_TAG_SUN_codeflags 0x4206 /* SUN */
-#define DW_TAG_SUN_memop_info 0x4207 /* SUN */
-#define DW_TAG_SUN_omp_child_func 0x4208 /* SUN */
-#define DW_TAG_SUN_rtti_descriptor 0x4209 /* SUN */
-#define DW_TAG_SUN_dtor_info 0x420a /* SUN */
-#define DW_TAG_SUN_dtor 0x420b /* SUN */
-#define DW_TAG_SUN_f90_interface 0x420c /* SUN */
-#define DW_TAG_SUN_fortran_vax_structure 0x420d /* SUN */
-#define DW_TAG_SUN_hi 0x42ff /* SUN */
-
-
-#define DW_TAG_hi_user 0xffff
-
-#define DW_children_no 0
-#define DW_children_yes 1
-
-
-
-#define DW_FORM_addr 0x01
-#define DW_FORM_block2 0x03
-#define DW_FORM_block4 0x04
-#define DW_FORM_data2 0x05
-#define DW_FORM_data4 0x06
-#define DW_FORM_data8 0x07
-#define DW_FORM_string 0x08
-#define DW_FORM_block 0x09
-#define DW_FORM_block1 0x0a
-#define DW_FORM_data1 0x0b
-#define DW_FORM_flag 0x0c
-#define DW_FORM_sdata 0x0d
-#define DW_FORM_strp 0x0e
-#define DW_FORM_udata 0x0f
-#define DW_FORM_ref_addr 0x10
-#define DW_FORM_ref1 0x11
-#define DW_FORM_ref2 0x12
-#define DW_FORM_ref4 0x13
-#define DW_FORM_ref8 0x14
-#define DW_FORM_ref_udata 0x15
-#define DW_FORM_indirect 0x16
-#define DW_FORM_sec_offset 0x17 /* DWARF4 */
-#define DW_FORM_exprloc 0x18 /* DWARF4 */
-#define DW_FORM_flag_present 0x19 /* DWARF4 */
-#define DW_FORM_ref_sig8 0x20 /* DWARF4 */
-
-#define DW_AT_sibling 0x01
-#define DW_AT_location 0x02
-#define DW_AT_name 0x03
-#define DW_AT_ordering 0x09
-#define DW_AT_subscr_data 0x0a
-#define DW_AT_byte_size 0x0b
-#define DW_AT_bit_offset 0x0c
-#define DW_AT_bit_size 0x0d
-#define DW_AT_element_list 0x0f
-#define DW_AT_stmt_list 0x10
-#define DW_AT_low_pc 0x11
-#define DW_AT_high_pc 0x12
-#define DW_AT_language 0x13
-#define DW_AT_member 0x14
-#define DW_AT_discr 0x15
-#define DW_AT_discr_value 0x16
-#define DW_AT_visibility 0x17
-#define DW_AT_import 0x18
-#define DW_AT_string_length 0x19
-#define DW_AT_common_reference 0x1a
-#define DW_AT_comp_dir 0x1b
-#define DW_AT_const_value 0x1c
-#define DW_AT_containing_type 0x1d
-#define DW_AT_default_value 0x1e
-#define DW_AT_inline 0x20
-#define DW_AT_is_optional 0x21
-#define DW_AT_lower_bound 0x22
-#define DW_AT_producer 0x25
-#define DW_AT_prototyped 0x27
-#define DW_AT_return_addr 0x2a
-#define DW_AT_start_scope 0x2c
-#define DW_AT_bit_stride 0x2e /* DWARF3 name */
-#define DW_AT_stride_size 0x2e /* DWARF2 name */
-#define DW_AT_upper_bound 0x2f
-#define DW_AT_abstract_origin 0x31
-#define DW_AT_accessibility 0x32
-#define DW_AT_address_class 0x33
-#define DW_AT_artificial 0x34
-#define DW_AT_base_types 0x35
-#define DW_AT_calling_convention 0x36
-#define DW_AT_count 0x37
-#define DW_AT_data_member_location 0x38
-#define DW_AT_decl_column 0x39
-#define DW_AT_decl_file 0x3a
-#define DW_AT_decl_line 0x3b
-#define DW_AT_declaration 0x3c
-#define DW_AT_discr_list 0x3d
-#define DW_AT_encoding 0x3e
-#define DW_AT_external 0x3f
-#define DW_AT_frame_base 0x40
-#define DW_AT_friend 0x41
-#define DW_AT_identifier_case 0x42
-#define DW_AT_macro_info 0x43
-#define DW_AT_namelist_item 0x44
-#define DW_AT_priority 0x45
-#define DW_AT_segment 0x46
-#define DW_AT_specification 0x47
-#define DW_AT_static_link 0x48
-#define DW_AT_type 0x49
-#define DW_AT_use_location 0x4a
-#define DW_AT_variable_parameter 0x4b
-#define DW_AT_virtuality 0x4c
-#define DW_AT_vtable_elem_location 0x4d
-#define DW_AT_allocated 0x4e /* DWARF3 */
-#define DW_AT_associated 0x4f /* DWARF3 */
-#define DW_AT_data_location 0x50 /* DWARF3 */
-#define DW_AT_byte_stride 0x51 /* DWARF3f */
-#define DW_AT_stride 0x51 /* DWARF3 (do not use) */
-#define DW_AT_entry_pc 0x52 /* DWARF3 */
-#define DW_AT_use_UTF8 0x53 /* DWARF3 */
-#define DW_AT_extension 0x54 /* DWARF3 */
-#define DW_AT_ranges 0x55 /* DWARF3 */
-#define DW_AT_trampoline 0x56 /* DWARF3 */
-#define DW_AT_call_column 0x57 /* DWARF3 */
-#define DW_AT_call_file 0x58 /* DWARF3 */
-#define DW_AT_call_line 0x59 /* DWARF3 */
-#define DW_AT_description 0x5a /* DWARF3 */
-#define DW_AT_binary_scale 0x5b /* DWARF3f */
-#define DW_AT_decimal_scale 0x5c /* DWARF3f */
-#define DW_AT_small 0x5d /* DWARF3f */
-#define DW_AT_decimal_sign 0x5e /* DWARF3f */
-#define DW_AT_digit_count 0x5f /* DWARF3f */
-#define DW_AT_picture_string 0x60 /* DWARF3f */
-#define DW_AT_mutable 0x61 /* DWARF3f */
-#define DW_AT_threads_scaled 0x62 /* DWARF3f */
-#define DW_AT_explicit 0x63 /* DWARF3f */
-#define DW_AT_object_pointer 0x64 /* DWARF3f */
-#define DW_AT_endianity 0x65 /* DWARF3f */
-#define DW_AT_elemental 0x66 /* DWARF3f */
-#define DW_AT_pure 0x67 /* DWARF3f */
-#define DW_AT_recursive 0x68 /* DWARF3f */
-#define DW_AT_signature 0x69 /* DWARF4 */
-#define DW_AT_main_subprogram 0x6a /* DWARF4 */
-#define DW_AT_data_bit_offset 0x6b /* DWARF4 */
-#define DW_AT_const_expr 0x6c /* DWARF4 */
-#define DW_AT_enum_class 0x6d /* DWARF4 */
-#define DW_AT_linkage_name 0x6e /* DWARF4 */
-
-/* In extensions, we attempt to include the vendor extension
- in the name even when the vendor leaves it out. */
-
-/* HP extensions. */
-#define DW_AT_HP_block_index 0x2000 /* HP */
-
-/* Follows extension so dwarfdump prints the most-likely-useful name. */
-#define DW_AT_lo_user 0x2000
-
-#define DW_AT_MIPS_fde 0x2001 /* MIPS/SGI */
-#define DW_AT_MIPS_loop_begin 0x2002 /* MIPS/SGI */
-#define DW_AT_MIPS_tail_loop_begin 0x2003 /* MIPS/SGI */
-#define DW_AT_MIPS_epilog_begin 0x2004 /* MIPS/SGI */
-#define DW_AT_MIPS_loop_unroll_factor 0x2005 /* MIPS/SGI */
-#define DW_AT_MIPS_software_pipeline_depth 0x2006 /* MIPS/SGI */
-#define DW_AT_MIPS_linkage_name 0x2007 /* MIPS/SGI, GNU, and others.*/
-#define DW_AT_MIPS_stride 0x2008 /* MIPS/SGI */
-#define DW_AT_MIPS_abstract_name 0x2009 /* MIPS/SGI */
-#define DW_AT_MIPS_clone_origin 0x200a /* MIPS/SGI */
-#define DW_AT_MIPS_has_inlines 0x200b /* MIPS/SGI */
-#define DW_AT_MIPS_stride_byte 0x200c /* MIPS/SGI */
-#define DW_AT_MIPS_stride_elem 0x200d /* MIPS/SGI */
-#define DW_AT_MIPS_ptr_dopetype 0x200e /* MIPS/SGI */
-#define DW_AT_MIPS_allocatable_dopetype 0x200f /* MIPS/SGI */
-#define DW_AT_MIPS_assumed_shape_dopetype 0x2010 /* MIPS/SGI */
-#define DW_AT_MIPS_assumed_size 0x2011 /* MIPS/SGI */
-
-/* HP extensions. */
-#define DW_AT_HP_unmodifiable 0x2001 /* conflict: MIPS */
-#define DW_AT_HP_actuals_stmt_list 0x2010 /* conflict: MIPS */
-#define DW_AT_HP_proc_per_section 0x2011 /* conflict: MIPS */
-#define DW_AT_HP_raw_data_ptr 0x2012 /* HP */
-#define DW_AT_HP_pass_by_reference 0x2013 /* HP */
-#define DW_AT_HP_opt_level 0x2014 /* HP */
-#define DW_AT_HP_prof_version_id 0x2015 /* HP */
-#define DW_AT_HP_opt_flags 0x2016 /* HP */
-#define DW_AT_HP_cold_region_low_pc 0x2017 /* HP */
-#define DW_AT_HP_cold_region_high_pc 0x2018 /* HP */
-#define DW_AT_HP_all_variables_modifiable 0x2019 /* HP */
-#define DW_AT_HP_linkage_name 0x201a /* HP */
-#define DW_AT_HP_prof_flags 0x201b /* HP */
-
-#define DW_AT_CPQ_discontig_ranges 0x2001 /* COMPAQ/HP */
-#define DW_AT_CPQ_semantic_events 0x2002 /* COMPAQ/HP */
-#define DW_AT_CPQ_split_lifetimes_var 0x2003 /* COMPAQ/HP */
-#define DW_AT_CPQ_split_lifetimes_rtn 0x2004 /* COMPAQ/HP */
-#define DW_AT_CPQ_prologue_length 0x2005 /* COMPAQ/HP */
-
-#define DW_AT_INTEL_other_endian 0x2026 /* Intel, 1 if byte swapped. */
-
-/* GNU extensions. */
-#define DW_AT_sf_names 0x2101 /* GNU */
-#define DW_AT_src_info 0x2102 /* GNU */
-#define DW_AT_mac_info 0x2103 /* GNU */
-#define DW_AT_src_coords 0x2104 /* GNU */
-#define DW_AT_body_begin 0x2105 /* GNU */
-#define DW_AT_body_end 0x2106 /* GNU */
-#define DW_AT_GNU_vector 0x2107 /* GNU */
-#define DW_AT_GNU_template_name 0x2108 /* GNU */
-
-/* ALTIUM extension: ALTIUM Compliant location lists (flag) */
-#define DW_AT_ALTIUM_loclist 0x2300 /* ALTIUM */
-
-/* Sun extensions */
-#define DW_AT_SUN_template 0x2201 /* SUN */
-#define DW_AT_VMS_rtnbeg_pd_address 0x2201 /* VMS */
-#define DW_AT_SUN_alignment 0x2202 /* SUN */
-#define DW_AT_SUN_vtable 0x2203 /* SUN */
-#define DW_AT_SUN_count_guarantee 0x2204 /* SUN */
-#define DW_AT_SUN_command_line 0x2205 /* SUN */
-#define DW_AT_SUN_vbase 0x2206 /* SUN */
-#define DW_AT_SUN_compile_options 0x2207 /* SUN */
-#define DW_AT_SUN_language 0x2208 /* SUN */
-#define DW_AT_SUN_browser_file 0x2209 /* SUN */
-#define DW_AT_SUN_vtable_abi 0x2210 /* SUN */
-#define DW_AT_SUN_func_offsets 0x2211 /* SUN */
-#define DW_AT_SUN_cf_kind 0x2212 /* SUN */
-#define DW_AT_SUN_vtable_index 0x2213 /* SUN */
-#define DW_AT_SUN_omp_tpriv_addr 0x2214 /* SUN */
-#define DW_AT_SUN_omp_child_func 0x2215 /* SUN */
-#define DW_AT_SUN_func_offset 0x2216 /* SUN */
-#define DW_AT_SUN_memop_type_ref 0x2217 /* SUN */
-#define DW_AT_SUN_profile_id 0x2218 /* SUN */
-#define DW_AT_SUN_memop_signature 0x2219 /* SUN */
-#define DW_AT_SUN_obj_dir 0x2220 /* SUN */
-#define DW_AT_SUN_obj_file 0x2221 /* SUN */
-#define DW_AT_SUN_original_name 0x2222 /* SUN */
-#define DW_AT_SUN_hwcprof_signature 0x2223 /* SUN */
-#define DW_AT_SUN_amd64_parmdump 0x2224 /* SUN */
-#define DW_AT_SUN_part_link_name 0x2225 /* SUN */
-#define DW_AT_SUN_link_name 0x2226 /* SUN */
-#define DW_AT_SUN_pass_with_const 0x2227 /* SUN */
-#define DW_AT_SUN_return_with_const 0x2228 /* SUN */
-#define DW_AT_SUN_import_by_name 0x2229 /* SUN */
-#define DW_AT_SUN_f90_pointer 0x222a /* SUN */
-#define DW_AT_SUN_pass_by_ref 0x222b /* SUN */
-#define DW_AT_SUN_f90_allocatable 0x222c /* SUN */
-#define DW_AT_SUN_f90_assumed_shape_array 0x222d /* SUN */
-#define DW_AT_SUN_c_vla 0x222e /* SUN */
-#define DW_AT_SUN_return_value_ptr 0x2230 /* SUN */
-#define DW_AT_SUN_dtor_start 0x2231 /* SUN */
-#define DW_AT_SUN_dtor_length 0x2232 /* SUN */
-#define DW_AT_SUN_dtor_state_initial 0x2233 /* SUN */
-#define DW_AT_SUN_dtor_state_final 0x2234 /* SUN */
-#define DW_AT_SUN_dtor_state_deltas 0x2235 /* SUN */
-#define DW_AT_SUN_import_by_lname 0x2236 /* SUN */
-#define DW_AT_SUN_f90_use_only 0x2237 /* SUN */
-#define DW_AT_SUN_namelist_spec 0x2238 /* SUN */
-#define DW_AT_SUN_is_omp_child_func 0x2239 /* SUN */
-#define DW_AT_SUN_fortran_main_alias 0x223a /* SUN */
-#define DW_AT_SUN_fortran_based 0x223b /* SUN */
-
-/* UPC extension */
-#define DW_AT_upc_threads_scaled 0x3210 /* UPC */
-
-/* PGI (STMicroelectronics) extensions. */
-#define DW_AT_PGI_lbase 0x3a00 /* PGI. Block, constant, reference. This attribute is an ASTPLAB extension used to describe the array local base. */
-#define DW_AT_PGI_soffset 0x3a01 /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the section offset, or the offset to the first element in the dimension. */
-#define DW_AT_PGI_lstride 0x3a02 /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the linear stride or the distance between elements in the dimension. */
-
-/* Apple Extensions for closures */
-#define DW_AT_APPLE_closure 0x3fe4 /* Apple */
-/* Apple Extensions for Objective-C runtime info */
-#define DW_AT_APPLE_major_runtime_vers 0x3fe5 /* Apple */
-#define DW_AT_APPLE_runtime_class 0x3fe6 /* Apple */
-
-
-#define DW_AT_hi_user 0x3fff
-
-#define DW_OP_addr 0x03
-#define DW_OP_deref 0x06
-#define DW_OP_const1u 0x08
-#define DW_OP_const1s 0x09
-#define DW_OP_const2u 0x0a
-#define DW_OP_const2s 0x0b
-#define DW_OP_const4u 0x0c
-#define DW_OP_const4s 0x0d
-#define DW_OP_const8u 0x0e
-#define DW_OP_const8s 0x0f
-#define DW_OP_constu 0x10
-#define DW_OP_consts 0x11
-#define DW_OP_dup 0x12
-#define DW_OP_drop 0x13
-#define DW_OP_over 0x14
-#define DW_OP_pick 0x15
-#define DW_OP_swap 0x16
-#define DW_OP_rot 0x17
-#define DW_OP_xderef 0x18
-#define DW_OP_abs 0x19
-#define DW_OP_and 0x1a
-#define DW_OP_div 0x1b
-#define DW_OP_minus 0x1c
-#define DW_OP_mod 0x1d
-#define DW_OP_mul 0x1e
-#define DW_OP_neg 0x1f
-#define DW_OP_not 0x20
-#define DW_OP_or 0x21
-#define DW_OP_plus 0x22
-#define DW_OP_plus_uconst 0x23
-#define DW_OP_shl 0x24
-#define DW_OP_shr 0x25
-#define DW_OP_shra 0x26
-#define DW_OP_xor 0x27
-#define DW_OP_bra 0x28
-#define DW_OP_eq 0x29
-#define DW_OP_ge 0x2a
-#define DW_OP_gt 0x2b
-#define DW_OP_le 0x2c
-#define DW_OP_lt 0x2d
-#define DW_OP_ne 0x2e
-#define DW_OP_skip 0x2f
-#define DW_OP_lit0 0x30
-#define DW_OP_lit1 0x31
-#define DW_OP_lit2 0x32
-#define DW_OP_lit3 0x33
-#define DW_OP_lit4 0x34
-#define DW_OP_lit5 0x35
-#define DW_OP_lit6 0x36
-#define DW_OP_lit7 0x37
-#define DW_OP_lit8 0x38
-#define DW_OP_lit9 0x39
-#define DW_OP_lit10 0x3a
-#define DW_OP_lit11 0x3b
-#define DW_OP_lit12 0x3c
-#define DW_OP_lit13 0x3d
-#define DW_OP_lit14 0x3e
-#define DW_OP_lit15 0x3f
-#define DW_OP_lit16 0x40
-#define DW_OP_lit17 0x41
-#define DW_OP_lit18 0x42
-#define DW_OP_lit19 0x43
-#define DW_OP_lit20 0x44
-#define DW_OP_lit21 0x45
-#define DW_OP_lit22 0x46
-#define DW_OP_lit23 0x47
-#define DW_OP_lit24 0x48
-#define DW_OP_lit25 0x49
-#define DW_OP_lit26 0x4a
-#define DW_OP_lit27 0x4b
-#define DW_OP_lit28 0x4c
-#define DW_OP_lit29 0x4d
-#define DW_OP_lit30 0x4e
-#define DW_OP_lit31 0x4f
-#define DW_OP_reg0 0x50
-#define DW_OP_reg1 0x51
-#define DW_OP_reg2 0x52
-#define DW_OP_reg3 0x53
-#define DW_OP_reg4 0x54
-#define DW_OP_reg5 0x55
-#define DW_OP_reg6 0x56
-#define DW_OP_reg7 0x57
-#define DW_OP_reg8 0x58
-#define DW_OP_reg9 0x59
-#define DW_OP_reg10 0x5a
-#define DW_OP_reg11 0x5b
-#define DW_OP_reg12 0x5c
-#define DW_OP_reg13 0x5d
-#define DW_OP_reg14 0x5e
-#define DW_OP_reg15 0x5f
-#define DW_OP_reg16 0x60
-#define DW_OP_reg17 0x61
-#define DW_OP_reg18 0x62
-#define DW_OP_reg19 0x63
-#define DW_OP_reg20 0x64
-#define DW_OP_reg21 0x65
-#define DW_OP_reg22 0x66
-#define DW_OP_reg23 0x67
-#define DW_OP_reg24 0x68
-#define DW_OP_reg25 0x69
-#define DW_OP_reg26 0x6a
-#define DW_OP_reg27 0x6b
-#define DW_OP_reg28 0x6c
-#define DW_OP_reg29 0x6d
-#define DW_OP_reg30 0x6e
-#define DW_OP_reg31 0x6f
-#define DW_OP_breg0 0x70
-#define DW_OP_breg1 0x71
-#define DW_OP_breg2 0x72
-#define DW_OP_breg3 0x73
-#define DW_OP_breg4 0x74
-#define DW_OP_breg5 0x75
-#define DW_OP_breg6 0x76
-#define DW_OP_breg7 0x77
-#define DW_OP_breg8 0x78
-#define DW_OP_breg9 0x79
-#define DW_OP_breg10 0x7a
-#define DW_OP_breg11 0x7b
-#define DW_OP_breg12 0x7c
-#define DW_OP_breg13 0x7d
-#define DW_OP_breg14 0x7e
-#define DW_OP_breg15 0x7f
-#define DW_OP_breg16 0x80
-#define DW_OP_breg17 0x81
-#define DW_OP_breg18 0x82
-#define DW_OP_breg19 0x83
-#define DW_OP_breg20 0x84
-#define DW_OP_breg21 0x85
-#define DW_OP_breg22 0x86
-#define DW_OP_breg23 0x87
-#define DW_OP_breg24 0x88
-#define DW_OP_breg25 0x89
-#define DW_OP_breg26 0x8a
-#define DW_OP_breg27 0x8b
-#define DW_OP_breg28 0x8c
-#define DW_OP_breg29 0x8d
-#define DW_OP_breg30 0x8e
-#define DW_OP_breg31 0x8f
-#define DW_OP_regx 0x90
-#define DW_OP_fbreg 0x91
-#define DW_OP_bregx 0x92
-#define DW_OP_piece 0x93
-#define DW_OP_deref_size 0x94
-#define DW_OP_xderef_size 0x95
-#define DW_OP_nop 0x96
-#define DW_OP_push_object_address 0x97 /* DWARF3 */
-#define DW_OP_call2 0x98 /* DWARF3 */
-#define DW_OP_call4 0x99 /* DWARF3 */
-#define DW_OP_call_ref 0x9a /* DWARF3 */
-#define DW_OP_form_tls_address 0x9b /* DWARF3f */
-#define DW_OP_call_frame_cfa 0x9c /* DWARF3f */
-#define DW_OP_bit_piece 0x9d /* DWARF3f */
-#define DW_OP_implicit_value 0x9e /* DWARF4 */
-#define DW_OP_stack_value 0x9f /* DWARF4 */
-
-
- /* GNU extensions. */
-#define DW_OP_GNU_push_tls_address 0xe0 /* GNU */
-
-/* Follows extension so dwarfdump prints the most-likely-useful name. */
-#define DW_OP_lo_user 0xe0
-
- /* HP extensions. */
-#define DW_OP_HP_unknown 0xe0 /* HP conflict: GNU */
-#define DW_OP_HP_is_value 0xe1 /* HP */
-#define DW_OP_HP_fltconst4 0xe2 /* HP */
-#define DW_OP_HP_fltconst8 0xe3 /* HP */
-#define DW_OP_HP_mod_range 0xe4 /* HP */
-#define DW_OP_HP_unmod_range 0xe5 /* HP */
-#define DW_OP_HP_tls 0xe6 /* HP */
-
-#define DW_OP_INTEL_bit_piece 0xe8 /* Intel: made obsolete by DW_OP_bit_piece above. */
-
-
- /* Apple extension. */
-#define DW_OP_APPLE_uninit 0xf0 /* Apple */
-
-#define DW_OP_hi_user 0xff
-
-#define DW_ATE_address 0x1
-#define DW_ATE_boolean 0x2
-#define DW_ATE_complex_float 0x3
-#define DW_ATE_float 0x4
-#define DW_ATE_signed 0x5
-#define DW_ATE_signed_char 0x6
-#define DW_ATE_unsigned 0x7
-#define DW_ATE_unsigned_char 0x8
-#define DW_ATE_imaginary_float 0x9 /* DWARF3 */
-#define DW_ATE_packed_decimal 0xa /* DWARF3f */
-#define DW_ATE_numeric_string 0xb /* DWARF3f */
-#define DW_ATE_edited 0xc /* DWARF3f */
-#define DW_ATE_signed_fixed 0xd /* DWARF3f */
-#define DW_ATE_unsigned_fixed 0xe /* DWARF3f */
-#define DW_ATE_decimal_float 0xf /* DWARF3f */
-
-
-/* ALTIUM extensions. x80, x81 */
-#define DW_ATE_ALTIUM_fract 0x80 /* ALTIUM __fract type */
-
-/* Follows extension so dwarfdump prints the most-likely-useful name. */
-#define DW_ATE_lo_user 0x80
-
-/* Shown here to help dwarfdump build script. */
-#define DW_ATE_ALTIUM_accum 0x81 /* ALTIUM __accum type */
-
-/* HP Floating point extensions. */
-#define DW_ATE_HP_float80 0x80 /* (80 bit). HP */
-
-
-#define DW_ATE_HP_complex_float80 0x81 /* Complex (80 bit). HP */
-#define DW_ATE_HP_float128 0x82 /* (128 bit). HP */
-#define DW_ATE_HP_complex_float128 0x83 /* Complex (128 bit). HP */
-#define DW_ATE_HP_floathpintel 0x84 /* (82 bit IA64). HP */
-#define DW_ATE_HP_imaginary_float80 0x85 /* HP */
-#define DW_ATE_HP_imaginary_float128 0x86 /* HP */
-
-/* Sun extensions */
-#define DW_ATE_SUN_interval_float 0x91
-#define DW_ATE_SUN_imaginary_float 0x92 /* Obsolete: See DW_ATE_imaginary_float */
-
-#define DW_ATE_hi_user 0xff
-
-
-/* Decimal Sign codes. */
-#define DW_DS_unsigned 0x01 /* DWARF3f */
-#define DW_DS_leading_overpunch 0x02 /* DWARF3f */
-#define DW_DS_trailing_overpunch 0x03 /* DWARF3f */
-#define DW_DS_leading_separate 0x04 /* DWARF3f */
-
-#define DW_DS_trailing_separate 0x05 /* DWARF3f */
-
-/* Endian code name. */
-#define DW_END_default 0x00 /* DWARF3f */
-#define DW_END_big 0x01 /* DWARF3f */
-#define DW_END_little 0x02 /* DWARF3f */
-
-#define DW_END_lo_user 0x40 /* DWARF3f */
-#define DW_END_hi_user 0xff /* DWARF3f */
-
-/* For use with DW_TAG_SUN_codeflags
- * If DW_TAG_SUN_codeflags is accepted as a dwarf standard, then
- * standard dwarf ATCF entries start at 0x01
- */
-#define DW_ATCF_lo_user 0x40 /* SUN */
-#define DW_ATCF_SUN_mop_bitfield 0x41 /* SUN */
-#define DW_ATCF_SUN_mop_spill 0x42 /* SUN */
-#define DW_ATCF_SUN_mop_scopy 0x43 /* SUN */
-#define DW_ATCF_SUN_func_start 0x44 /* SUN */
-#define DW_ATCF_SUN_end_ctors 0x45 /* SUN */
-#define DW_ATCF_SUN_branch_target 0x46 /* SUN */
-#define DW_ATCF_SUN_mop_stack_probe 0x47 /* SUN */
-#define DW_ATCF_SUN_func_epilog 0x48 /* SUN */
-#define DW_ATCF_hi_user 0xff /* SUN */
-
-/* Accessibility code name. */
-#define DW_ACCESS_public 0x01
-#define DW_ACCESS_protected 0x02
-#define DW_ACCESS_private 0x03
-
-/* Visibility code name. */
-#define DW_VIS_local 0x01
-#define DW_VIS_exported 0x02
-#define DW_VIS_qualified 0x03
-
-/* Virtuality code name. */
-#define DW_VIRTUALITY_none 0x00
-#define DW_VIRTUALITY_virtual 0x01
-#define DW_VIRTUALITY_pure_virtual 0x02
-
-#define DW_LANG_C89 0x0001
-#define DW_LANG_C 0x0002
-#define DW_LANG_Ada83 0x0003
-#define DW_LANG_C_plus_plus 0x0004
-#define DW_LANG_Cobol74 0x0005
-#define DW_LANG_Cobol85 0x0006
-#define DW_LANG_Fortran77 0x0007
-#define DW_LANG_Fortran90 0x0008
-#define DW_LANG_Pascal83 0x0009
-#define DW_LANG_Modula2 0x000a
-#define DW_LANG_Java 0x000b /* DWARF3 */
-#define DW_LANG_C99 0x000c /* DWARF3 */
-#define DW_LANG_Ada95 0x000d /* DWARF3 */
-#define DW_LANG_Fortran95 0x000e /* DWARF3 */
-#define DW_LANG_PLI 0x000f /* DWARF3 */
-#define DW_LANG_ObjC 0x0010 /* DWARF3f */
-#define DW_LANG_ObjC_plus_plus 0x0011 /* DWARF3f */
-#define DW_LANG_UPC 0x0012 /* DWARF3f */
-#define DW_LANG_D 0x0013 /* DWARF3f */
-#define DW_LANG_Python 0x0014 /* DWARF4 */
-#define DW_LANG_lo_user 0x8000
-#define DW_LANG_Mips_Assembler 0x8001 /* MIPS */
-#define DW_LANG_Upc 0x8765 /* UPC, use
- DW_LANG_UPC instead. */
-/* ALTIUM extension */
-#define DW_LANG_ALTIUM_Assembler 0x9101 /* ALTIUM */
-
-/* Sun extensions */
-#define DW_LANG_SUN_Assembler 0x9001 /* SUN */
-
-#define DW_LANG_hi_user 0xffff
-
-/* Identifier case name. */
-#define DW_ID_case_sensitive 0x00
-#define DW_ID_up_case 0x01
-#define DW_ID_down_case 0x02
-#define DW_ID_case_insensitive 0x03
-
-/* Calling Convention Name. */
-#define DW_CC_normal 0x01
-#define DW_CC_program 0x02
-#define DW_CC_nocall 0x03
-#define DW_CC_lo_user 0x40
-
-/* ALTIUM extensions. */
-/* Function is an interrupt handler, return address on system stack. */
-#define DW_CC_ALTIUM_interrupt 0x65 /* ALTIUM*/
-
-/* Near function model, return address on system stack. */
-#define DW_CC_ALTIUM_near_system_stack 0x66 /*ALTIUM */
-
-/* Near function model, return address on user stack. */
-#define DW_CC_ALTIUM_near_user_stack 0x67 /* ALTIUM */
-
-/* Huge function model, return address on user stack. */
-#define DW_CC_ALTIUM_huge_user_stack 0x68 /* ALTIUM */
-
-
-#define DW_CC_hi_user 0xff
-
-/* Inline Code Name. */
-#define DW_INL_not_inlined 0x00
-#define DW_INL_inlined 0x01
-#define DW_INL_declared_not_inlined 0x02
-#define DW_INL_declared_inlined 0x03
-
-/* Ordering Name. */
-#define DW_ORD_row_major 0x00
-#define DW_ORD_col_major 0x01
-
-/* Discriminant Descriptor Name. */
-#define DW_DSC_label 0x00
-#define DW_DSC_range 0x01
-
-/* Line number standard opcode name. */
-#define DW_LNS_copy 0x01
-#define DW_LNS_advance_pc 0x02
-#define DW_LNS_advance_line 0x03
-#define DW_LNS_set_file 0x04
-#define DW_LNS_set_column 0x05
-#define DW_LNS_negate_stmt 0x06
-#define DW_LNS_set_basic_block 0x07
-#define DW_LNS_const_add_pc 0x08
-#define DW_LNS_fixed_advance_pc 0x09
-#define DW_LNS_set_prologue_end 0x0a /* DWARF3 */
-#define DW_LNS_set_epilogue_begin 0x0b /* DWARF3 */
-#define DW_LNS_set_isa 0x0c /* DWARF3 */
-
-/* Line number extended opcode name. */
-#define DW_LNE_end_sequence 0x01
-#define DW_LNE_set_address 0x02
-#define DW_LNE_define_file 0x03
-#define DW_LNE_set_discriminator 0x04 /* DWARF4 */
-
-/* HP extensions. */
-#define DW_LNE_HP_negate_is_UV_update 0x11 /* 17 HP */
-#define DW_LNE_HP_push_context 0x12 /* 18 HP */
-#define DW_LNE_HP_pop_context 0x13 /* 19 HP */
-#define DW_LNE_HP_set_file_line_column 0x14 /* 20 HP */
-#define DW_LNE_HP_set_routine_name 0x15 /* 21 HP */
-#define DW_LNE_HP_set_sequence 0x16 /* 22 HP */
-#define DW_LNE_HP_negate_post_semantics 0x17 /* 23 HP */
-#define DW_LNE_HP_negate_function_exit 0x18 /* 24 HP */
-#define DW_LNE_HP_negate_front_end_logical 0x19 /* 25 HP */
-#define DW_LNE_HP_define_proc 0x20 /* 32 HP */
-
-#define DW_LNE_lo_user 0x80 /* DWARF3 */
-#define DW_LNE_hi_user 0xff /* DWARF3 */
-
-/* Macro information. */
-#define DW_MACINFO_define 0x01
-#define DW_MACINFO_undef 0x02
-#define DW_MACINFO_start_file 0x03
-#define DW_MACINFO_end_file 0x04
-#define DW_MACINFO_vendor_ext 0xff
-
-/* CFA operator compaction (a space saving measure, see
- the DWARF standard) means DW_CFA_extended and DW_CFA_nop
- have the same value here. */
-#define DW_CFA_advance_loc 0x40
-#define DW_CFA_offset 0x80
-#define DW_CFA_restore 0xc0
-#define DW_CFA_extended 0
-
-#define DW_CFA_nop 0x00
-#define DW_CFA_set_loc 0x01
-#define DW_CFA_advance_loc1 0x02
-#define DW_CFA_advance_loc2 0x03
-#define DW_CFA_advance_loc4 0x04
-#define DW_CFA_offset_extended 0x05
-#define DW_CFA_restore_extended 0x06
-#define DW_CFA_undefined 0x07
-#define DW_CFA_same_value 0x08
-#define DW_CFA_register 0x09
-#define DW_CFA_remember_state 0x0a
-#define DW_CFA_restore_state 0x0b
-#define DW_CFA_def_cfa 0x0c
-#define DW_CFA_def_cfa_register 0x0d
-#define DW_CFA_def_cfa_offset 0x0e
-#define DW_CFA_def_cfa_expression 0x0f /* DWARF3 */
-#define DW_CFA_expression 0x10 /* DWARF3 */
-#define DW_CFA_offset_extended_sf 0x11 /* DWARF3 */
-#define DW_CFA_def_cfa_sf 0x12 /* DWARF3 */
-#define DW_CFA_def_cfa_offset_sf 0x13 /* DWARF3 */
-#define DW_CFA_val_offset 0x14 /* DWARF3f */
-#define DW_CFA_val_offset_sf 0x15 /* DWARF3f */
-#define DW_CFA_val_expression 0x16 /* DWARF3f */
-
-#define DW_CFA_lo_user 0x1c
-#define DW_CFA_low_user 0x1c /* Incorrect spelling, do not use. */
-
-/* SGI/MIPS extension. */
-#define DW_CFA_MIPS_advance_loc8 0x1d /* MIPS */
-
-/* GNU extensions. */
-#define DW_CFA_GNU_window_save 0x2d /* GNU */
-#define DW_CFA_GNU_args_size 0x2e /* GNU */
-#define DW_CFA_GNU_negative_offset_extended 0x2f /* GNU */
-
-#define DW_CFA_high_user 0x3f
-
-/* GNU exception header encoding. See the Generic
- Elf Specification of the Linux Standard Base (LSB).
- http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/dwarfext.html
- The upper 4 bits indicate how the value is to be applied.
- The lower 4 bits indicate the format of the data.
-*/
-#define DW_EH_PE_absptr 0x00 /* GNU */
-#define DW_EH_PE_uleb128 0x01 /* GNU */
-#define DW_EH_PE_udata2 0x02 /* GNU */
-#define DW_EH_PE_udata4 0x03 /* GNU */
-#define DW_EH_PE_udata8 0x04 /* GNU */
-#define DW_EH_PE_sleb128 0x09 /* GNU */
-#define DW_EH_PE_sdata2 0x0A /* GNU */
-#define DW_EH_PE_sdata4 0x0B /* GNU */
-#define DW_EH_PE_sdata8 0x0C /* GNU */
-
-#define DW_EH_PE_pcrel 0x10 /* GNU */
-#define DW_EH_PE_textrel 0x20 /* GNU */
-#define DW_EH_PE_datarel 0x30 /* GNU */
-#define DW_EH_PE_funcrel 0x40 /* GNU */
-#define DW_EH_PE_aligned 0x50 /* GNU */
-
-#define DW_EH_PE_omit 0xff /* GNU. Means no value present. */
-
-
-/* Mapping from machine registers and pseudo-regs into the .debug_frame table.
- DW_FRAME entries are machine specific. These describe
- MIPS/SGI R3000, R4K, R4400 and all later MIPS/SGI IRIX machines.
- They describe a mapping from hardware register number to
- the number used in the table to identify that register.
-
- The CFA (Canonical Frame Address) described in DWARF is called
- the Virtual Frame Pointer on MIPS/SGI machines.
-
- The DW_FRAME* names here are MIPS/SGI specfic.
- Libdwarf interfaces defined in 2008 make the
- frame definitions
- here (and the fixed table sizes they imply) obsolete.
- They are left here for compatibility.
-*/
-/* Default column used for CFA in the libdwarf reader client.
- Assumes reg 0 never appears as
- a register in DWARF information. Usable for MIPS,
- but never a good idea, really. */
-#define DW_FRAME_CFA_COL 0
-
-#define DW_FRAME_REG1 1 /* integer reg 1 */
-#define DW_FRAME_REG2 2 /* integer reg 2 */
-#define DW_FRAME_REG3 3 /* integer reg 3 */
-#define DW_FRAME_REG4 4 /* integer reg 4 */
-#define DW_FRAME_REG5 5 /* integer reg 5 */
-#define DW_FRAME_REG6 6 /* integer reg 6 */
-#define DW_FRAME_REG7 7 /* integer reg 7 */
-#define DW_FRAME_REG8 8 /* integer reg 8 */
-#define DW_FRAME_REG9 9 /* integer reg 9 */
-#define DW_FRAME_REG10 10 /* integer reg 10 */
-#define DW_FRAME_REG11 11 /* integer reg 11 */
-#define DW_FRAME_REG12 12 /* integer reg 12 */
-#define DW_FRAME_REG13 13 /* integer reg 13 */
-#define DW_FRAME_REG14 14 /* integer reg 14 */
-#define DW_FRAME_REG15 15 /* integer reg 15 */
-#define DW_FRAME_REG16 16 /* integer reg 16 */
-#define DW_FRAME_REG17 17 /* integer reg 17 */
-#define DW_FRAME_REG18 18 /* integer reg 18 */
-#define DW_FRAME_REG19 19 /* integer reg 19 */
-#define DW_FRAME_REG20 20 /* integer reg 20 */
-#define DW_FRAME_REG21 21 /* integer reg 21 */
-#define DW_FRAME_REG22 22 /* integer reg 22 */
-#define DW_FRAME_REG23 23 /* integer reg 23 */
-#define DW_FRAME_REG24 24 /* integer reg 24 */
-#define DW_FRAME_REG25 25 /* integer reg 25 */
-#define DW_FRAME_REG26 26 /* integer reg 26 */
-#define DW_FRAME_REG27 27 /* integer reg 27 */
-#define DW_FRAME_REG28 28 /* integer reg 28 */
-#define DW_FRAME_REG29 29 /* integer reg 29 */
-#define DW_FRAME_REG30 30 /* integer reg 30 */
-#define DW_FRAME_REG31 31 /* integer reg 31, aka ra */
-
- /* MIPS1, 2 have only some of these 64-bit registers.
- ** MIPS1 save/restore takes 2 instructions per 64-bit reg, and
- ** in that case, the register is considered stored after the second
- ** swc1.
- */
-#define DW_FRAME_FREG0 32 /* 64-bit floating point reg 0 */
-#define DW_FRAME_FREG1 33 /* 64-bit floating point reg 1 */
-#define DW_FRAME_FREG2 34 /* 64-bit floating point reg 2 */
-#define DW_FRAME_FREG3 35 /* 64-bit floating point reg 3 */
-#define DW_FRAME_FREG4 36 /* 64-bit floating point reg 4 */
-#define DW_FRAME_FREG5 37 /* 64-bit floating point reg 5 */
-#define DW_FRAME_FREG6 38 /* 64-bit floating point reg 6 */
-#define DW_FRAME_FREG7 39 /* 64-bit floating point reg 7 */
-#define DW_FRAME_FREG8 40 /* 64-bit floating point reg 8 */
-#define DW_FRAME_FREG9 41 /* 64-bit floating point reg 9 */
-#define DW_FRAME_FREG10 42 /* 64-bit floating point reg 10 */
-#define DW_FRAME_FREG11 43 /* 64-bit floating point reg 11 */
-#define DW_FRAME_FREG12 44 /* 64-bit floating point reg 12 */
-#define DW_FRAME_FREG13 45 /* 64-bit floating point reg 13 */
-#define DW_FRAME_FREG14 46 /* 64-bit floating point reg 14 */
-#define DW_FRAME_FREG15 47 /* 64-bit floating point reg 15 */
-#define DW_FRAME_FREG16 48 /* 64-bit floating point reg 16 */
-#define DW_FRAME_FREG17 49 /* 64-bit floating point reg 17 */
-#define DW_FRAME_FREG18 50 /* 64-bit floating point reg 18 */
-#define DW_FRAME_FREG19 51 /* 64-bit floating point reg 19 */
-#define DW_FRAME_FREG20 52 /* 64-bit floating point reg 20 */
-#define DW_FRAME_FREG21 53 /* 64-bit floating point reg 21 */
-#define DW_FRAME_FREG22 54 /* 64-bit floating point reg 22 */
-#define DW_FRAME_FREG23 55 /* 64-bit floating point reg 23 */
-#define DW_FRAME_FREG24 56 /* 64-bit floating point reg 24 */
-#define DW_FRAME_FREG25 57 /* 64-bit floating point reg 25 */
-#define DW_FRAME_FREG26 58 /* 64-bit floating point reg 26 */
-#define DW_FRAME_FREG27 59 /* 64-bit floating point reg 27 */
-#define DW_FRAME_FREG28 60 /* 64-bit floating point reg 28 */
-#define DW_FRAME_FREG29 61 /* 64-bit floating point reg 29 */
-#define DW_FRAME_FREG30 62 /* 64-bit floating point reg 30 */
-#define DW_FRAME_FREG31 63 /* 64-bit floating point reg 31 */
-
-/* ***IMPORTANT NOTE, TARGET DEPENDENCY ****
- The following 4 #defines are dependent on
- the target cpu(s) that you apply libdwarf to.
- Ensure that DW_FRAME_UNDEFINED_VAL and DW_FRAME_SAME_VAL
- do not conflict with the range [0-DW_FRAME_STATIC_LINK].
- The value 63 works for MIPS cpus at least up to the R16000.
-
- For a cpu with more than 63 real registers
- DW_FRAME_HIGHEST_NORMAL_REGISTER
- must be increased for things to work properly!
- Also ensure that DW_FRAME_UNDEFINED_VAL DW_FRAME_SAME_VAL
- are not in the range [0-DW_FRAME_STATIC_LINK]
-
- Having DW_FRAME_HIGHEST_NORMAL_REGISTER be higher than
- is strictly needed is safe.
-
-*/
-
-#ifndef DW_FRAME_HIGHEST_NORMAL_REGISTER
-#define DW_FRAME_HIGHEST_NORMAL_REGISTER 63
-#endif
-/* This is the number of columns in the Frame Table.
- This constant should
- be kept in sync with DW_REG_TABLE_SIZE defined in libdwarf.h
- It must also be large enough to be beyond the highest
- compiler-defined-register (meaning DW_FRAME_RA_COL DW_FRAME_STATIC_LINK
- in the MIPS/IRIX case */
-#ifndef DW_FRAME_LAST_REG_NUM
-#define DW_FRAME_LAST_REG_NUM (DW_FRAME_HIGHEST_NORMAL_REGISTER + 3)
-#endif
-
-
-/* Column recording ra (return address from a function call).
- This is common to many architectures, but as a 'simple register'
- is not necessarily adequate for all architectures.
- For MIPS/IRIX this register number is actually recorded on disk
- in the .debug_frame section.
- */
-#define DW_FRAME_RA_COL (DW_FRAME_HIGHEST_NORMAL_REGISTER + 1)
-
-/* Column recording static link applicable to up-level
- addressing, as in IRIX mp code, pascal, etc.
- This is common to many architectures but
- is not necessarily adequate for all architectures.
- For MIPS/IRIX this register number is actually recorded on disk
- in the .debug_frame section.
-*/
-#define DW_FRAME_STATIC_LINK (DW_FRAME_HIGHEST_NORMAL_REGISTER + 2)
-
-
-
-/*
- DW_FRAME_UNDEFINED_VAL and DW_FRAME_SAME_VAL are
- never on disk, just generated by libdwarf. See libdwarf.h
- for their values.
-*/
-
-
-
-#define DW_CHILDREN_no 0x00
-#define DW_CHILDREN_yes 0x01
-
-#define DW_ADDR_none 0
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* __DWARF_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_abbrev.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_abbrev.h
deleted file mode 100644
index b525924c8..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_abbrev.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-
- Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2008-2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-/* In a given CU, one of these is (eventually) set up
- for every abbreviation we need to find (and for all.
- those ealier in the abbreviations for that CU).
- So we don't want elements needlessly big.
-*/
-struct Dwarf_Abbrev_s {
- /* No TAG should exceed DW_TAG_hi_user, 0xffff, but
- we do allow a larger value here. */
- Dwarf_Word ab_tag;
- /* Abbreviations are numbered (normally sequentially from
- 1 and so 16 bits is not enough! */
- Dwarf_Word ab_code;
- Dwarf_Small ab_has_child;
- Dwarf_Byte_Ptr ab_abbrev_ptr;
- Dwarf_Debug ab_dbg;
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_addr_finder.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_addr_finder.h
deleted file mode 100644
index 0eda6d1c4..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_addr_finder.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- dwarf_addr_finder.h
- $Source: /plroot/cmplrs.src/v7.4.5m/.RCS/PL/include/cmplrs/RCS/dwarf_addr_finder.h,v $
- $Date: 2002/06/11 17:49:06 $
-
- Defines user interface.
-
-*/
-
-/* return codes for functions
-*/
-#define DW_DLV_NO_ENTRY -1
-#define DW_DLV_OK 0
-#define DW_DLV_ERROR 1
-
-
-/* the following are the 'section' number passed to the called-back
- function.
- The called-back application must translate this to the
- appropriate elf section number/pointer.
-
- Putting this burden on the application avoids having to store
- the numbers in the Dwarf_Debug structure (thereby saving space
- for most consumers).
-*/
-#define DW_SECTION_INFO 0
-#define DW_SECTION_FRAME 1
-#define DW_SECTION_ARANGES 2
-#define DW_SECTION_LINE 3
-#define DW_SECTION_LOC 4 /* .debug_loc */
-
-/* section is one of the above codes: it specifies a section.
- secoff is the offset in the dwarf section.
- existingAddr is the value at the specified offset (so the
- called back routine can sanity check the proceedings).
- It's up to the caller to know the size of an address (4 or 8)
- and update the right number of bytes.
-*/
-typedef int (*Dwarf_addr_callback_func) (int /*section*/,
- Dwarf_Off /*secoff*/, Dwarf_Addr /*existingAddr*/);
-
-/* call this to do the work: it calls back thru cb_func
- once per each address to be modified.
- Once this returns you are done.
- Returns DW_DLV_OK if finished ok.
- Returns DW_DLV_ERROR if there was some kind of error, in which
- the dwarf error number was passed back thu the dwerr ptr.
- Returns DW_DLV_NO_ENTRY if there are no relevant dwarf sections,
- so there were no addresses to be modified (and none
- called back).
-*/
-int _dwarf_addr_finder(dwarf_elf_handle elf_file_ptr,
- Dwarf_addr_callback_func cb_func,
- int *dwerr);
-
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_alloc.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_alloc.h
deleted file mode 100644
index 3a61c692c..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_alloc.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-
- Copyright (C) 2000,2005 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2008-2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-/* #define DWARF_SIMPLE_MALLOC 1 */
-
-Dwarf_Ptr _dwarf_get_alloc(Dwarf_Debug, Dwarf_Small, Dwarf_Unsigned);
-Dwarf_Debug _dwarf_get_debug(void);
-Dwarf_Debug _dwarf_setup_debug(Dwarf_Debug);
-int _dwarf_free_all_of_one_debug(Dwarf_Debug);
-
-typedef struct Dwarf_Alloc_Area_s *Dwarf_Alloc_Area;
-typedef struct Dwarf_Free_List_s *Dwarf_Free_List;
-
-/* ALLOC_AREA_INDEX_TABLE_MAX is the size of the
- struct ial_s index_into_allocated array in dwarf_alloc.c
-*/
-#define ALLOC_AREA_INDEX_TABLE_MAX 45
-/* ALLOC_AREA_REAL_TABLE_MAX is the size of the array needed
- to hold pointers to dwarf alloc chunk areas.
- It's smaller as some of the index_into_allocated
- entries (they look like {0,1,1,0,0} )
- are treated specially and don't use 'chunks'.
-*/
-#define ALLOC_AREA_REAL_TABLE_MAX 32
-
-/*
- This struct is used to chain all the deallocated
- structs on the free list of each chain. The structs
- are chained internally, by using the memory they
- contain.
-*/
-struct Dwarf_Free_List_s {
- Dwarf_Free_List fl_next;
-};
-
-
-/*
- This struct is used to manage all the chunks malloc'ed
- for a particular alloc_type. Many of the fields are
- initialized by dwarf_init().
-*/
-struct Dwarf_Alloc_Hdr_s {
-
- /* Count of actual number of structs user app holds pointers to
- currently. */
- Dwarf_Sword ah_struct_user_holds;
-
- /*
- Size of each struct that will be allocated for this alloc_type.
- Initialized by dwarf_init(). */
- Dwarf_Half ah_bytes_one_struct;
-
- /*
- Number of structs of this alloc_type that will be contained in
- each chunk that is malloc'ed. Initialized by dwarf_init(). */
- Dwarf_Word ah_structs_per_chunk;
-
- /*
- Number of bytes malloc'ed per chunk which is basically
- (ah_bytes_one_struct+_DWARF_RESERVE) * ah_alloc_num. */
- Dwarf_Word ah_bytes_malloc_per_chunk;
-
- /* Count of chunks currently allocated for type. */
- Dwarf_Sword ah_chunks_allocated;
-
- /*
- Points to a chain of Dwarf_Alloc_Area_s structs that represent
- all the chunks currently allocated for the alloc_type. */
- Dwarf_Alloc_Area ah_alloc_area_head;
-
- /* Last Alloc Area that was allocated by malloc. The
- free-space-search area looks here first and only if it is full
- goes thru the list pointed to by ah_alloc_area_head. */
- Dwarf_Alloc_Area ah_last_alloc_area;
-};
-
-
-/*
- This struct is used to manage each chunk that is
- malloc'ed for a particular alloc_type. For each
- allocation type, the allocation header points to
- a list of all the chunks malloc'ed for that type.
-*/
-struct Dwarf_Alloc_Area_s {
-
- /* Points to the free list of structs in the chunk. */
- Dwarf_Ptr aa_free_list;
-
- /*
- Count of the number of free structs in the chunk. This includes
- both those on the free list, and in the blob. */
- Dwarf_Sword aa_free_structs_in_chunk;
-
- /*
- Points to the first byte of the blob from which struct will be
- allocated. A struct is put on the free_list only when it
- dwarf_deallocated. Initial allocations are from the blob. */
- Dwarf_Small *aa_blob_start;
-
- /* Points just past the last byte of the blob. */
- Dwarf_Small *aa_blob_end;
-
- /* Points to alloc_hdr this alloc_area is linked to: The owner, in
- other words. */
- Dwarf_Alloc_Hdr aa_alloc_hdr;
-
- /*
- Used for chaining Dwarf_Alloc_Area_s atructs. Alloc areas are
- doubly linked to enable deletion from the list in constant time. */
- Dwarf_Alloc_Area aa_next;
- Dwarf_Alloc_Area aa_prev;
-};
-
-struct Dwarf_Error_s *_dwarf_special_no_dbg_error_malloc(void);
-
-#ifdef DWARF_SIMPLE_MALLOC
-/*
- DWARF_SIMPLE_MALLOC is for testing the hypothesis that the existing
- complex malloc scheme in libdwarf is pointless complexity.
-
- DWARF_SIMPLE_MALLOC also makes it easy for a malloc-tracing
- tool to verify libdwarf malloc has no botches (though of course
- such does not test the complicated standard-libdwarf-alloc code).
-
-*/
-
-struct simple_malloc_entry_s {
- Dwarf_Small *se_addr;
- unsigned long se_size;
- short se_type;
-};
-#define DSM_BLOCK_COUNT (1000)
-#define DSM_BLOCK_SIZE (sizeof(struct simple_malloc_entry_s)*DSM_BLOCK_COUNT)
-
-/* we do this so dwarf_dealloc can really free everything */
-struct simple_malloc_record_s {
- struct simple_malloc_record_s *sr_next;
- int sr_used;
- struct simple_malloc_entry_s sr_entry[DSM_BLOCK_COUNT];
-};
-
-
-
-#endif /* DWARF_SIMPLE_MALLOC */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_arange.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_arange.h
deleted file mode 100644
index d6c537c45..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_arange.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-
- Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-/* This structure is used to read an arange into. */
-struct Dwarf_Arange_s {
-
- /* The segment selector. Only non-zero if Dwarf4, only
- meaningful if ar_segment_selector_size non-zero */
- Dwarf_Unsigned ar_segment_selector;
-
- /* Starting address of the arange, ie low-pc. */
- Dwarf_Addr ar_address;
-
- /* Length of the arange. */
- Dwarf_Unsigned ar_length;
-
-
- /*
- Offset into .debug_info of the start of the compilation-unit
- containing this set of aranges. */
- Dwarf_Off ar_info_offset;
-
- /* Corresponding Dwarf_Debug. */
- Dwarf_Debug ar_dbg;
-
- Dwarf_Half ar_segment_selector_size;
-};
-
-
-
-int
- _dwarf_get_aranges_addr_offsets(Dwarf_Debug dbg,
- Dwarf_Addr ** addrs,
- Dwarf_Off ** offsets,
- Dwarf_Signed * count,
- Dwarf_Error * error);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_base_types.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_base_types.h
deleted file mode 100644
index 00e2700a8..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_base_types.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-
- Copyright (C) 2000,2005 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2008-2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-#include "libdwarfdefs.h"
-
-#define true 1
-#define false 0
-
-/* to identify a cie */
-#define DW_CIE_ID ~(0x0)
-#define DW_CIE_VERSION 1 /* DWARF2 */
-#define DW_CIE_VERSION3 3 /* DWARF3 */
-#define DW_CIE_VERSION4 4 /* DWARF4 */
-
-#define DW_CU_VERSION2 2
-#define DW_CU_VERSION3 3
-#define DW_CU_VERSION4 4
-
-/* DWARF2,3 and 4 */
-#define DW_ARANGES_VERSION2 2
-
-#define DW_LINE_VERSION2 2
-#define DW_LINE_VERSION3 3
-#define DW_LINE_VERSION4 4
-
-
-/*
- These are allocation type codes for structs that
- are internal to the Libdwarf Consumer library.
-*/
-#define DW_DLA_ABBREV_LIST DW_DLA_RANGES + 1
-#define DW_DLA_CHAIN DW_DLA_RANGES + 2
-#define DW_DLA_CU_CONTEXT DW_DLA_RANGES + 3
-#define DW_DLA_FRAME DW_DLA_RANGES + 4
-#define DW_DLA_GLOBAL_CONTEXT DW_DLA_RANGES + 5
-#define DW_DLA_FILE_ENTRY DW_DLA_RANGES + 6
-#define DW_DLA_LINE_CONTEXT DW_DLA_RANGES + 7
-#define DW_DLA_LOC_CHAIN DW_DLA_RANGES + 8
-#define DW_DLA_HASH_TABLE DW_DLA_RANGES + 9
-#define DW_DLA_FUNC_CONTEXT DW_DLA_RANGES + 10
-#define DW_DLA_TYPENAME_CONTEXT DW_DLA_RANGES + 11
-#define DW_DLA_VAR_CONTEXT DW_DLA_RANGES + 12
-#define DW_DLA_WEAK_CONTEXT DW_DLA_RANGES + 13
-#define DW_DLA_PUBTYPES_CONTEXT DW_DLA_RANGES + 14 /* DWARF3 */
-#define DW_DLA_HASH_TABLE_ENTRY DW_DLA_RANGES + 15
-
-/* Maximum number of allocation types for allocation routines. */
-#define MAX_DW_DLA DW_DLA_HASH_TABLE_ENTRY
-
-/*Dwarf_Word is unsigned word usable for index, count in memory */
-/*Dwarf_Sword is signed word usable for index, count in memory */
-/* The are 32 or 64 bits depending if 64 bit longs or not, which
-** fits the ILP32 and LP64 models
-** These work equally well with ILP64.
-*/
-
-typedef unsigned long Dwarf_Word;
-typedef signed long Dwarf_Sword;
-
-typedef signed char Dwarf_Sbyte;
-typedef unsigned char Dwarf_Ubyte;
-typedef signed short Dwarf_Shalf;
-typedef Dwarf_Small *Dwarf_Byte_Ptr;
-
-/* these 2 are fixed sizes which must not vary with the
-** ILP32/LP64 model. Between these two, stay at 32 bit.
-*/
-typedef __uint32_t Dwarf_ufixed;
-typedef __int32_t Dwarf_sfixed;
-
-/*
- In various places the code mistakenly associates
- forms 8 bytes long with Dwarf_Signed or Dwarf_Unsigned
- This is not a very portable assumption.
- The following should be used instead for 64 bit integers.
-*/
-typedef __uint64_t Dwarf_ufixed64;
-typedef __int64_t Dwarf_sfixed64;
-
-
-typedef struct Dwarf_Abbrev_List_s *Dwarf_Abbrev_List;
-typedef struct Dwarf_File_Entry_s *Dwarf_File_Entry;
-typedef struct Dwarf_CU_Context_s *Dwarf_CU_Context;
-typedef struct Dwarf_Hash_Table_s *Dwarf_Hash_Table;
-typedef struct Dwarf_Hash_Table_Entry_s *Dwarf_Hash_Table_Entry;
-
-
-typedef struct Dwarf_Alloc_Hdr_s *Dwarf_Alloc_Hdr;
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_die_deliv.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_die_deliv.h
deleted file mode 100644
index f1ecb153b..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_die_deliv.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2008-2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-/*
- This struct holds information about a abbreviation.
- It is put in the hash table for abbreviations for
- a compile-unit.
-*/
-struct Dwarf_Abbrev_List_s {
-
- Dwarf_Unsigned ab_code;
- Dwarf_Half ab_tag;
- Dwarf_Half ab_has_child;
-
- /*
- Points to start of attribute and form pairs in the .debug_abbrev
- section for the abbrev. */
- Dwarf_Byte_Ptr ab_abbrev_ptr;
-
- struct Dwarf_Abbrev_List_s *ab_next;
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_elf_access.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_elf_access.h
deleted file mode 100644
index fd52c1793..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_elf_access.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#ifndef _DWARF_ELF_PORT_H
-#define _DWARF_ELF_PORT_H
-/*
-
- Copyright (C) 2008-2010 David Anderson. All rights reserved.
- Portions Copyright 2008-2010 Arxan Technologies, Inc. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-/* ELF (usually libelf) object access for the generic object file interface */
-
-int
-dwarf_elf_object_access_init(dwarf_elf_handle elf ,
- int libdwarf_owns_elf,
- Dwarf_Obj_Access_Interface** ret_obj,
- int *err );
-
-void
-dwarf_elf_object_access_finish(Dwarf_Obj_Access_Interface* obj );
-
-/* End ELF object access for the generic object file interface */
-
-
-#endif
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_error.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_error.h
deleted file mode 100644
index 27acf70db..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_error.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-
- Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-void _dwarf_error(Dwarf_Debug dbg, Dwarf_Error * error,
- Dwarf_Sword errval);
-
-struct Dwarf_Error_s {
- Dwarf_Sword er_errval;
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_frame.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_frame.h
deleted file mode 100644
index ceb686335..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_frame.h
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
-
- Copyright (C) 2000, 2004, 2006 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-/* The dwarf 2.0 standard dictates that only the following
- * fields can be read when an unexpected augmentation string
- * (in the cie) is encountered: CIE length, CIE_id, version and
- * augmentation; FDE: length, CIE pointer, initial location and
- * address range. Unfortunately, with the above restrictions, it
- * is impossible to read the instruction table from a CIE or a FDE
- * when a new augmentation string is encountered.
- * To fix this problem, the following layout is used, if the
- * augmentation string starts with the string "z".
- * CIE FDE
- * length length
- * CIE_id CIE_pointer
- * version initial_location
- * augmentation address_range
- * length_of_augmented_fields (*NEW*)
- * code_alignment_factor Any new fields as necessary
- * data_alignment_factor instruction_table
- * return_address
- * length_of_augmented fields
- * Any new fields as necessary
- * initial_instructions
- *
- * The type of all the old data items are the same as what is
- * described in dwarf 2.0 standard. The length_of_augmented_fields
- * is an LEB128 data item that denotes the size (in bytes) of
- * the augmented fields (not including the size of
- * "length_of_augmented_fields" itself).
-
- * Handling of cie augmentation strings is necessarly a heuristic.
- * See dwarf_frame.c for the currently known augmentation strings.
-
-
- ---START SGI-ONLY COMMENT:
- * SGI-IRIX versions of cie or fde were intended to use "z1", "z2" as the
- * augmenter strings if required for new augmentation.
- * However, that never happened (as of March 2005).
- *
- * The fde's augmented by the string "z" have a new field
- * (signed constant, 4 byte field)
- * called offset_into_exception_tables, following the
- * length_of_augmented field. This field contains an offset
- * into the "_MIPS_eh_region", which describes
- * the IRIX CC exception handling tables.
- ---END SGI-ONLY COMMENT
-
-
- * GNU .eh_frame has an augmentation string of z[RLP]* (gcc 3.4)
- * The similarity to IRIX 'z' (and proposed but never
- * implemented IRIX z1, z2 etc) was confusing things.
- * If the section is .eh_frame then 'z' means GNU exception
- * information 'Augmentation Data' not IRIX 'z'.
- * See The Linux Standard Base Core Specification version 3.0
- */
-
-#define DW_DEBUG_FRAME_VERSION 1 /* DWARF2 */
-#define DW_DEBUG_FRAME_VERSION3 3 /* DWARF3 */
-#define DW_DEBUG_FRAME_VERSION4 4 /* DWARF4 */
-/* The following is SGI/IRIX specific, and probably no longer
- in use anywhere. */
-#define DW_DEBUG_FRAME_AUGMENTER_STRING "mti v1"
-
-/* The value of the offset field for Cie's. */
-#define DW_CIE_OFFSET ~(0x0)
-
-/* The augmentation string may be NULL. */
-#define DW_EMPTY_STRING ""
-
-#define DW_FRAME_INSTR_OPCODE_SHIFT 6
-#define DW_FRAME_INSTR_OFFSET_MASK 0x3f
-
-/*
- This struct denotes the rule for a register in a row of
- the frame table. In other words, it is one element of
- the table.
-*/
-struct Dwarf_Reg_Rule_s {
-
- /*
- Is a flag indicating whether the rule includes the offset
- field, ie whether the ru_offset field is valid or not.
- Applies only if DW_EXPR_OFFSET or DW_EXPR_VAL_OFFSET.
- It is important, since reg+offset (offset of 0) is different from
- just 'register' since the former means 'read memory at address
- given by the sum of register contents plus offset to get the
- value'. whereas the latter means 'the value is in the register'.
-
- The 'register' numbers are either real registers (ie, table
- columns defined as real registers) or defined entries that are
- not really hardware registers, such as DW_FRAME_SAME_VAL or
- DW_FRAME_CFA_COL.
-
- */
- Dwarf_Sbyte ru_is_off;
-
- /* DW_EXPR_OFFSET (0, DWARF2)
- DW_EXPR_VAL_OFFSET 1 (dwarf2/3)
- DW_EXPR_EXPRESSION 2 (dwarf2/3)
- DW_EXPR_VAL_EXPRESSION 3 (dwarf2/3)
- See dwarf_frame.h. */
- Dwarf_Sbyte ru_value_type;
-
- /* Register involved in this rule. */
- Dwarf_Half ru_register;
-
- /* Offset to add to register, if indicated by ru_is_offset
- and if DW_EXPR_OFFSET or DW_EXPR_VAL_OFFSET.
- If DW_EXPR_EXPRESSION or DW_EXPR_VAL_EXPRESSION
- this is DW_FORM_block block-length, not offset. */
- Dwarf_Unsigned ru_offset_or_block_len;
-
- /* For DW_EXPR_EXPRESSION DW_EXPR_VAL_EXPRESSION these is set,
- else 0. */
- Dwarf_Small *ru_block;
-};
-
-typedef struct Dwarf_Frame_s *Dwarf_Frame;
-
-/*
- This structure represents a row of the frame table.
- Fr_loc is the pc value for this row, and Fr_reg
- contains the rule for each column.
-
- Entry DW_FRAME_CFA_COL of fr_reg was the tradional MIPS
- way of setting CFA. cfa_rule is the new one.
-*/
-struct Dwarf_Frame_s {
-
- /* Pc value corresponding to this row of the frame table. */
- Dwarf_Addr fr_loc;
-
- /* Rules for all the registers in this row. */
- struct Dwarf_Reg_Rule_s fr_cfa_rule;
-
- /* fr_reg_count is the the number of
- entries of the fr_reg array. */
- unsigned long fr_reg_count;
- struct Dwarf_Reg_Rule_s *fr_reg;
-
- Dwarf_Frame fr_next;
-};
-
-typedef struct Dwarf_Frame_Op_List_s *Dwarf_Frame_Op_List;
-
-/* This is used to chain together Dwarf_Frame_Op structures. */
-struct Dwarf_Frame_Op_List_s {
- Dwarf_Frame_Op *fl_frame_instr;
- Dwarf_Frame_Op_List fl_next;
-};
-
-/* See dwarf_frame.c for the heuristics used to set the
- Dwarf_Cie ci_augmentation_type.
-
- This succinctly helps interpret the size and meaning of .debug_frame
- and (for gcc) .eh_frame.
-
- In the case of gcc .eh_frame (gcc 3.3, 3.4)
- z may be followed by one or more of
- L R P.
-
-*/
-enum Dwarf_augmentation_type {
- aug_empty_string, /* Default empty augmentation string. */
- aug_irix_exception_table, /* IRIX plain "z",
- for exception handling, IRIX CC compiler.
- Proposed z1 z2 ... never implemented. */
- aug_gcc_eh_z, /* gcc z augmentation, (including
- L R P variations). gcc 3.3 3.4 exception
- handling in eh_frame. */
- aug_irix_mti_v1, /* IRIX "mti v1" augmentation string. Probably
- never in any released SGI-IRIX compiler. */
- aug_eh, /* For gcc .eh_frame, "eh" is the string.,
- gcc 1,2, egcs. Older values. */
- aug_armcc, /* "armcc+" meaning the cfa calculation
- is corrected to be standard (output by
- Arm C RVCT 3.0 SP1 and later). See
- http://sourceware.org/ml/gdb-patches/2006-12/msg00249.html
- for details. */
- aug_unknown, /* Unknown augmentation, we cannot do much. */
- aug_past_last
-};
-
-
-/*
- This structure contains all the pertinent info for a Cie. Most
- of the fields are taken straight from the definition of a Cie.
- Ci_cie_start points to the address (in .debug_frame) where this
- Cie begins. Ci_cie_instr_start points to the first byte of the
- frame instructions for this Cie. Ci_dbg points to the associated
- Dwarf_Debug structure. Ci_initial_table is a pointer to the table
- row generated by the instructions for this Cie.
-*/
-struct Dwarf_Cie_s {
- Dwarf_Unsigned ci_length;
- char *ci_augmentation;
- Dwarf_Small ci_code_alignment_factor;
- Dwarf_Sbyte ci_data_alignment_factor;
- Dwarf_Small ci_return_address_register;
- Dwarf_Small *ci_cie_start;
- Dwarf_Small *ci_cie_instr_start;
- Dwarf_Debug ci_dbg;
- Dwarf_Frame ci_initial_table;
- Dwarf_Cie ci_next;
- Dwarf_Small ci_length_size;
- Dwarf_Small ci_extension_size;
- Dwarf_Half ci_cie_version_number;
- enum Dwarf_augmentation_type ci_augmentation_type;
-
- /* The following 2 for GNU .eh_frame exception handling
- Augmentation Data. Set if ci_augmentation_type
- is aug_gcc_eh_z. Zero if unused. */
- Dwarf_Unsigned ci_gnu_eh_augmentation_len;
- Dwarf_Ptr ci_gnu_eh_augmentation_bytes;
-
- /* These are extracted from the gnu eh_frame
- augmentation if the
- augmentation begins with 'z'. See Linux LSB documents.
- Otherwize these are zero. */
- unsigned char ci_gnu_personality_handler_encoding;
- unsigned char ci_gnu_lsda_encoding;
- unsigned char ci_gnu_fde_begin_encoding;
-
- /* If 'P' augmentation present, is handler addr. Else
- is zero. */
- Dwarf_Addr ci_gnu_personality_handler_addr;
-
-
- /* In creating list of cie's (which will become an array)
- record the position so fde can get it on fde creation. */
- Dwarf_Unsigned ci_index;
- Dwarf_Small * ci_section_ptr;
- /* DWARF4 adds address size and segment size to the CIE: the .debug_info
- section may not always be present to allow libdwarf to
- find address_size from the compilation-unit. */
- Dwarf_Half ci_address_size;
- Dwarf_Half ci_segment_size;
-
-};
-
-/*
- This structure contains all the pertinent info for a Fde.
- Most of the fields are taken straight from the definition.
- fd_cie_index is the index of the Cie associated with this
- Fde in the list of Cie's for this debug_frame. Fd_cie
- points to the corresponsing Dwarf_Cie structure. Fd_fde_start
- points to the start address of the Fde. Fd_fde_instr_start
- points to the start of the instructions for this Fde. Fd_dbg
- points to the associated Dwarf_Debug structure.
-*/
-struct Dwarf_Fde_s {
- Dwarf_Unsigned fd_length;
- Dwarf_Addr fd_cie_offset;
- Dwarf_Unsigned fd_cie_index;
- Dwarf_Cie fd_cie;
- Dwarf_Addr fd_initial_location;
- Dwarf_Small *fd_initial_loc_pos;
- Dwarf_Addr fd_address_range;
- Dwarf_Small *fd_fde_start;
- Dwarf_Small *fd_fde_instr_start;
- Dwarf_Debug fd_dbg;
-
- /* fd_offset_into_exception_tables is SGI/IRIX exception table
- offset. Unused and zero if not IRIX .debug_frame. */
- Dwarf_Signed fd_offset_into_exception_tables;
-
- Dwarf_Fde fd_next;
- Dwarf_Small fd_length_size;
- Dwarf_Small fd_extension_size;
- /* So we know from an fde which 'count' of fde-s in
- Dwarf_Debug applies: eh or standard. */
- Dwarf_Small fd_is_eh;
- /* The following 2 for GNU .eh_frame exception handling
- Augmentation Data. Set if CIE ci_augmentation_type
- is aug_gcc_eh_z. Zero if unused. */
- Dwarf_Unsigned fd_gnu_eh_augmentation_len;
- Dwarf_Ptr fd_gnu_eh_augmentation_bytes;
- Dwarf_Addr fd_gnu_eh_lsda; /* If 'L' augmentation letter
- present: is address of the
- Language Specific Data Area (LSDA). If not 'L" is zero. */
-
- /* The following 3 are about the Elf section the FDEs come from. */
- Dwarf_Small * fd_section_ptr;
- Dwarf_Unsigned fd_section_length;
- Dwarf_Unsigned fd_section_index;
-
-};
-
-
-int
- _dwarf_frame_address_offsets(Dwarf_Debug dbg, Dwarf_Addr ** addrlist,
- Dwarf_Off ** offsetlist,
- Dwarf_Signed * returncount,
- Dwarf_Error * err);
-
-int
-_dwarf_get_fde_list_internal(Dwarf_Debug dbg,
- Dwarf_Cie ** cie_data,
- Dwarf_Signed * cie_element_count,
- Dwarf_Fde ** fde_data,
- Dwarf_Signed * fde_element_count,
- Dwarf_Small * section_ptr,
- Dwarf_Unsigned section_index,
- Dwarf_Unsigned section_length,
- Dwarf_Unsigned cie_id_value,
- int use_gnu_cie_calc, /* If non-zero,
- this is gcc eh_frame. */
- Dwarf_Error * error);
-
-enum Dwarf_augmentation_type
-_dwarf_get_augmentation_type(Dwarf_Debug dbg,
- Dwarf_Small *augmentation_string,
- int is_gcc_eh_frame);
-
-Dwarf_Unsigned _dwarf_get_return_address_reg(Dwarf_Small *frame_ptr,
- int version,
- unsigned long *size);
-
-/* Temporary recording of crucial cie/fde prefix data.
- * Vastly simplifies some argument lists.
- */
-struct cie_fde_prefix_s {
- /* cf_start_addr is a pointer to the first byte of this fde/cie
- we are reading now. */
- Dwarf_Small * cf_start_addr;
- Dwarf_Small * cf_addr_after_prefix;
- Dwarf_Unsigned cf_length;
- int cf_local_length_size;
- int cf_local_extension_size;
- Dwarf_Unsigned cf_cie_id;
- Dwarf_Small * cf_cie_id_addr; /* used for eh_frame calculations. */
-
- /* Simplifies passing around these values to create fde having
- these here. */
- /* cf_section_ptr is a pointer to the first byte
- of the object section the prefix is read from. */
- Dwarf_Small * cf_section_ptr;
- Dwarf_Unsigned cf_section_index;
- Dwarf_Unsigned cf_section_length;
-};
-
-int
-_dwarf_exec_frame_instr(Dwarf_Bool make_instr,
- Dwarf_Frame_Op ** ret_frame_instr,
- Dwarf_Bool search_pc,
- Dwarf_Addr search_pc_val,
- Dwarf_Addr initial_loc,
- Dwarf_Small * start_instr_ptr,
- Dwarf_Small * final_instr_ptr,
- Dwarf_Frame table,
- Dwarf_Cie cie,
- Dwarf_Debug dbg,
- Dwarf_Half reg_num_of_cfa,
- Dwarf_Sword * returned_count,
- int *returned_error);
-
-
-int dwarf_read_cie_fde_prefix(Dwarf_Debug dbg,
- Dwarf_Small *frame_ptr_in,
- Dwarf_Small *section_ptr_in,
- Dwarf_Unsigned section_index_in,
- Dwarf_Unsigned section_length_in,
- struct cie_fde_prefix_s *prefix_out,
- Dwarf_Error *error);
-
-int dwarf_create_fde_from_after_start(Dwarf_Debug dbg,
- struct cie_fde_prefix_s * prefix,
- Dwarf_Small *section_pointer,
- Dwarf_Small *frame_ptr,
- int use_gnu_cie_calc,
- Dwarf_Cie cie_ptr_in,
- Dwarf_Fde *fde_ptr_out,
- Dwarf_Error *error);
-
-int dwarf_create_cie_from_after_start(Dwarf_Debug dbg,
- struct cie_fde_prefix_s *prefix,
- Dwarf_Small* section_pointer,
- Dwarf_Small* frame_ptr,
- Dwarf_Unsigned cie_count,
- int use_gnu_cie_calc,
- Dwarf_Cie *cie_ptr_out,
- Dwarf_Error *error);
-
-
-int _dwarf_frame_constructor(Dwarf_Debug dbg,void * );
-void _dwarf_frame_destructor (void *);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_funcs.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_funcs.h
deleted file mode 100644
index bf91c3215..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_funcs.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-
- Copyright (C) 2000, 2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-typedef struct Dwarf_Func_Context_s *Dwarf_Func_Context;
-
-
-/* struct never completed: see dwarf_global.h */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_global.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_global.h
deleted file mode 100644
index c2bc2cdcc..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_global.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-
- Copyright (C) 2000,2004,2005 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-typedef struct Dwarf_Global_Context_s *Dwarf_Global_Context;
-
-/*
- This struct contains header information for a set of pubnames.
- Essentially, they contain the context for a set of pubnames
- belonging to a compilation-unit.
-
- This is also used for the sgi-specific
- weaknames, typenames, varnames, funcnames data:
- the structs for those are incomplete and
- instances of this are used instead.
-
- Also used for DWARF3 .debug_pubtypes.
-
-*/
-struct Dwarf_Global_Context_s {
-
- /* Length in .debug_pubnames (etc) of a set of names for a
- compilation-unit. Dwarf_Word pu_length; The value is not made
- available outside libdwarf and not used inside, so no need to
- record it. */
-
- /* For this context, size of a length. 4 or 8 */
- unsigned char pu_length_size;
-
- /* For this CU, size of the extension 0 except for dwarf2 extension
- 64bit, in which case is 4. */
- unsigned char pu_extension_size;
-
- /*
- Offset into .debug_info of the compilation-unit header (not DIE)
- for this set of pubnames. */
- Dwarf_Off pu_offset_of_cu_header;
-
- /* Size of compilation-unit that these pubnames are in. */
- Dwarf_Unsigned pu_info_length;
-
- Dwarf_Debug pu_dbg;
-};
-
-
-/* This struct contains information for a single pubname. */
-struct Dwarf_Global_s {
-
- /*
- Offset from the start of the corresponding compilation-unit of
- the DIE for the given pubname CU. */
- Dwarf_Off gl_named_die_offset_within_cu;
-
- /* Points to the given pubname. */
- Dwarf_Small *gl_name;
-
- /* Context for this pubname. */
- Dwarf_Global_Context gl_context;
-};
-
-int _dwarf_internal_get_pubnames_like_data(Dwarf_Debug dbg,
- Dwarf_Small *
- section_data_ptr,
- Dwarf_Unsigned
- section_length,
- Dwarf_Global ** globals,
- Dwarf_Signed * return_count,
- Dwarf_Error * error,
- int context_code,
- int global_code,
- int length_err_num,
- int version_err_num);
-
-void
-_dwarf_internal_globals_dealloc( Dwarf_Debug dbg, Dwarf_Global *dwgl,
- Dwarf_Signed count,
- int context_code,
- int global_code,
- int list_code);
-
-
-#ifdef __sgi /* __sgi should only be defined for IRIX/MIPS. */
-void _dwarf_fix_up_offset_irix(Dwarf_Debug dbg,
- Dwarf_Unsigned *varp,
- char *caller_site_name);
-#define FIX_UP_OFFSET_IRIX_BUG(ldbg,var,name) _dwarf_fix_up_offset_irix(ldbg,&var,name)
-#else
-#define FIX_UP_OFFSET_IRIX_BUG(ldbg,var,name)
-#endif
-
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_harmless.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_harmless.h
deleted file mode 100644
index 3d4d910ce..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_harmless.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-
- Copyright (C) 2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
-*/
-
-
-
-void dwarf_harmless_init(struct Dwarf_Harmless_s *dhp,unsigned size);
-void dwarf_harmless_cleanout(struct Dwarf_Harmless_s *dhp);
-
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_incl.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_incl.h
deleted file mode 100644
index df2fbf334..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_incl.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-
- Copyright (C) 2000, 2002, 2004 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2008-2010 David Anderson. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-#ifndef DWARF_INCL_H
-#define DWARF_INCL_H
-#if (!defined(HAVE_RAW_LIBELF_OK) && defined(HAVE_LIBELF_OFF64_OK) )
-/* At a certain point libelf.h requires _GNU_SOURCE.
- here we assume the criteria in configure determine that
- usefully.
-*/
-#define _GNU_SOURCE 1
-#endif
-
-
-#include "libdwarfdefs.h"
-#include
-
-#ifdef HAVE_ELF_H
-#include
-#endif
-
-#include
-#include
-#include
-
-#include "dwarf_base_types.h"
-#include "dwarf_alloc.h"
-#include "dwarf_opaque.h"
-#include "dwarf_error.h"
-#include "dwarf_util.h"
-#endif /* DWARF_INCL_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_line.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_line.h
deleted file mode 100644
index 66d606275..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_line.h
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
-
- Copyright (C) 2000, 2004, 2006 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2009-2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-#define DW_EXTENDED_OPCODE 0
-
-/*
- This is used as the starting value for an algorithm
- to get the minimum difference between 2 values.
- UINT_MAX is used as our approximation to infinity.
-*/
-#define MAX_LINE_DIFF UINT_MAX
-
-/* This is for a sanity check on line
- table extended opcodes.
- It is entirely arbitrary, and 100 is surely too small if
- someone was inserting strings in the opcode. */
-#define DW_LNE_LEN_MAX 100
-
-
-/*
- This structure is used to build a list of all the
- files that are used in the current compilation unit.
- All of the fields execpt fi_next have meanings that
- are obvious from section 6.2.4 of the Libdwarf Doc.
-*/
-struct Dwarf_File_Entry_s {
- /* Points to string naming the file. */
- Dwarf_Small *fi_file_name;
-
- /*
- Index into the list of directories of the directory in which
- this file exits. */
- Dwarf_Sword fi_dir_index;
-
- /* Time of last modification of the file. */
- Dwarf_Unsigned fi_time_last_mod;
-
- /* Length in bytes of the file. */
- Dwarf_Unsigned fi_file_length;
-
- /* Pointer for chaining file entries. */
- Dwarf_File_Entry fi_next;
-};
-
-
-typedef struct Dwarf_Line_Context_s *Dwarf_Line_Context;
-
-/*
- This structure provides the context in which the fields of
- a Dwarf_Line structure are interpreted. They come from the
- statement program prologue. **Updated by dwarf_srclines in
- dwarf_line.c.
-*/
-struct Dwarf_Line_Context_s {
- /*
- Points to a chain of entries providing info about source files
- for the current set of Dwarf_Line structures. File number
- 'li_file 1' is last on the list, the first list entry is the
- file numbered lc_file_entry_count. The numbering of the file
- names matches the dwarf2/3 line table specification file table
- and DW_LNE_define_file numbering rules. */
- Dwarf_File_Entry lc_file_entries;
- /*
- Count of number of source files for this set of Dwarf_Line
- structures. */
- Dwarf_Sword lc_file_entry_count;
- /*
- Points to the portion of .debug_line section that contains a
- list of strings naming the included directories. */
- Dwarf_Small *lc_include_directories;
-
- /* Count of the number of included directories. */
- Dwarf_Sword lc_include_directories_count;
-
- /* Count of the number of lines for this cu. */
- Dwarf_Sword lc_line_count;
-
- /* Points to name of compilation directory. */
- Dwarf_Small *lc_compilation_directory;
-
- Dwarf_Debug lc_dbg;
-
- Dwarf_Half lc_version_number; /* DWARF2/3 version number, 2
- for DWARF2, 3 for DWARF3. */
-};
-
-
-/*
- This structure defines a row of the line table.
- All of the fields except li_offset have the exact
- same meaning that is defined in Section 6.2.2
- of the Libdwarf Document.
-
- li_offset is used by _dwarf_addr_finder() which is called
- by rqs(1), an sgi utility for 'moving' shared libraries
- as if the static linker (ld) had linked the shared library
- at the newly-specified address. Most libdwarf-using
- apps will ignore li_offset and _dwarf_addr_finder().
-
-*/
-struct Dwarf_Line_s {
- Dwarf_Addr li_address; /* pc value of machine instr */
- union addr_or_line_s {
- struct li_inner_s {
- Dwarf_Sword li_file; /* int identifying src file */
- /* li_file is a number 1-N, indexing into a conceptual
- source file table as described in dwarf2/3 spec line
- table doc. (see Dwarf_File_Entry lc_file_entries; and
- Dwarf_Sword lc_file_entry_count;) */
-
- Dwarf_Sword li_line; /* source file line number. */
- Dwarf_Half li_column; /* source file column number */
- Dwarf_Small li_isa;
-
- /* To save space, use bit flags. */
- /* indicate start of stmt */
- unsigned char li_is_stmt:1;
-
- /* indicate start basic block */
- unsigned char li_basic_block:1;
-
- /* first post sequence instr */
- unsigned char li_end_sequence:1;
-
- unsigned char li_prologue_end:1;
- unsigned char li_epilogue_begin:1;
- } li_l_data;
- Dwarf_Off li_offset; /* for rqs */
- } li_addr_line;
- Dwarf_Line_Context li_context; /* assoc Dwarf_Line_Context_s */
-};
-
-
-int _dwarf_line_address_offsets(Dwarf_Debug dbg,
- Dwarf_Die die,
- Dwarf_Addr ** addrs,
- Dwarf_Off ** offs,
- Dwarf_Unsigned * returncount,
- Dwarf_Error * err);
-int _dwarf_internal_srclines(Dwarf_Die die,
- Dwarf_Line ** linebuf,
- Dwarf_Signed * count,
- Dwarf_Bool doaddrs,
- Dwarf_Bool dolines, Dwarf_Error * error);
-
-
-
-/* The LOP, WHAT_IS_OPCODE stuff is here so it can
- be reused in 3 places. Seemed hard to keep
- the 3 places the same without an inline func or
- a macro.
-
- Handling the line section where the header and the
- file being processed do not match (unusual, but
- planned for in the design of .debug_line)
- is too tricky to recode this several times and keep
- it right.
-
- As it is the code starting up line-reading is duplicated
- and that is just wrong to do. FIXME!
-*/
-#define LOP_EXTENDED 1
-#define LOP_DISCARD 2
-#define LOP_STANDARD 3
-#define LOP_SPECIAL 4
-
-#define WHAT_IS_OPCODE(type,opcode,base,opcode_length,line_ptr,highest_std) \
- if( (opcode) < (base) ) { \
- /* we know we must treat as a standard op \
- or a special case. \
- */ \
- if((opcode) == DW_EXTENDED_OPCODE) { \
- type = LOP_EXTENDED; \
- } else if( ((highest_std)+1) >= (base)) { \
- /* == Standard case: compile of \
- dwarf_line.c and object \
- have same standard op codes set. \
- \
- > Special case: compile of dwarf_line.c\
- has things in standard op codes list \
- in dwarf.h header not \
- in the object: handle this as a standard\
- op code in switch below. \
- The header special ops overlap the \
- object standard ops. \
- The new standard op codes will not \
- appear in the object. \
- */ \
- type = LOP_STANDARD; \
- } else { \
- /* These are standard opcodes in the object\
- ** that were not defined in the header \
- ** at the time dwarf_line.c \
- ** was compiled. Provides the ability of \
- ** out-of-date dwarf reader to read newer \
- ** line table data transparently. \
- */ \
- type = LOP_DISCARD; \
- } \
- \
- } else { \
- /* Is a special op code. \
- */ \
- type = LOP_SPECIAL; \
- }
-
-/* The following is from the dwarf definition of 'ubyte'
- and is specifically mentioned in section 6.2.5.1, page 54
- of the Rev 2.0.0 dwarf specification.
-*/
-
-#define MAX_LINE_OP_CODE 255
-
-
-/* The following structs (Line_Table_File_Entry_s,Line_Table_Prefix_s)
- and functions allow refactoring common code into a single
- reader routine.
-*/
-/* There can be zero of more of these needed for 1 line prologue. */
-struct Line_Table_File_Entry_s {
- Dwarf_Small *lte_filename;
- Dwarf_Unsigned lte_directory_index;
- Dwarf_Unsigned lte_last_modification_time;
- Dwarf_Unsigned lte_length_of_file;
-};
-
-/* Data picked up from the line table prologue for a single
-CU. */
-struct Line_Table_Prefix_s {
-
- /* pf_total_length is the value of the length field for the line
- table of this CU. So it does not count the length of itself (the
- length value) for consistency with the say lenghts recorded in
- DWARF2/3. */
- Dwarf_Unsigned pf_total_length;
-
- /* Length of the initial length field itself. */
- Dwarf_Half pf_length_field_length;
-
- /* The version is 2 for DWARF2, 3 for DWARF3 */
- Dwarf_Half pf_version;
-
- Dwarf_Unsigned pf_prologue_length;
- Dwarf_Small pf_minimum_instruction_length;
-
- /* Start and end of this CU line area. pf_line_ptr_start +
- pf_total_length + pf_length_field_length == pf_line_ptr_end.
- Meaning pf_line_ptr_start is before the length info. */
- Dwarf_Small *pf_line_ptr_start;
- Dwarf_Small *pf_line_ptr_end;
-
- /* Used to check that decoding of the line prologue is done right. */
- Dwarf_Small *pf_line_prologue_start;
-
- Dwarf_Small pf_default_is_stmt;
- Dwarf_Sbyte pf_line_base;
- Dwarf_Small pf_line_range;
-
- /* Highest std opcode (+1). */
- Dwarf_Small pf_opcode_base;
-
- /* pf_opcode_base -1 entries (each a count, normally the value of
- each entry is 0 or 1). */
- Dwarf_Small *pf_opcode_length_table;
-
- Dwarf_Unsigned pf_include_directories_count;
- /* Array of pointers to dir strings. pf_include_directories_count
- entriesin the array. */
- Dwarf_Small **pf_include_directories;
-
- /* Count of entries in line_table_file_entries array. */
- Dwarf_Unsigned pf_files_count;
- struct Line_Table_File_Entry_s *pf_line_table_file_entries;
-
- /* The number to treat as standard ops. This is a special
- accomodation of gcc using the new standard opcodes but not
- updating the version number. It's legal dwarf2, but much better
- for the user to understand as dwarf3 when 'it looks ok'. */
- Dwarf_Bool pf_std_op_count;
-
-};
-
-void dwarf_init_line_table_prefix(struct Line_Table_Prefix_s *pf);
-void dwarf_free_line_table_prefix(struct Line_Table_Prefix_s *pf);
-
-int dwarf_read_line_table_prefix(Dwarf_Debug dbg,
- Dwarf_Small * data_start,
- Dwarf_Unsigned data_length,
- Dwarf_Small ** updated_data_start_out,
- struct Line_Table_Prefix_s *prefix_out,
- /* The following 2 arguments are solely for warning users
- * when there is a surprising 'gap' in the .debug_line info. */
- Dwarf_Small ** bogus_bytes_ptr,
- Dwarf_Unsigned * bogus_bytes_count,
- Dwarf_Error * err,
- int * err_count_out);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_loc.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_loc.h
deleted file mode 100644
index 685d199f2..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_loc.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
- Copyright (C) 2000, 2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-typedef struct Dwarf_Loc_Chain_s *Dwarf_Loc_Chain;
-
-struct Dwarf_Loc_Chain_s {
- Dwarf_Small lc_atom;
- Dwarf_Unsigned lc_number;
- Dwarf_Unsigned lc_number2;
- Dwarf_Unsigned lc_offset;
- Dwarf_Loc_Chain lc_next;
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_macro.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_macro.h
deleted file mode 100644
index 31ea2e6e6..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_macro.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
- Copyright (C) 2000, 2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-/*
-
-
- dwarf_macro.h
-
- $Revision: 1.4 $ $Date: 2004/10/28 22:19:14 $
-
-*/
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_opaque.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_opaque.h
deleted file mode 100644
index b235a9c7b..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_opaque.h
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
-
- Copyright (C) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2007-2010 David Anderson. All Rights Reserved.
- Portions Copyright (C) 2008-2010 Arxan Technologies, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-/* The versions applicable by section are:
- DWARF2 DWARF3 DWARF4
- .debug_abbrev - - -
- .debug_aranges 2 2 2
- .debug_frame 1 3 4
- .debug_info 2 3 4
- .debug_line 2 3 4
- .debug_loc - - -
- .debug_macinfo - - -
- .debug_pubtypes x 2 2
- .debug_pubnames 2 2 2
- .debug_ranges x - -
- .debug_str - - -
- .debug_types x x 4
-*/
-
-#include
-
-
-struct Dwarf_Die_s {
- Dwarf_Byte_Ptr di_debug_info_ptr;
- Dwarf_Abbrev_List di_abbrev_list;
- Dwarf_CU_Context di_cu_context;
- int di_abbrev_code;
-};
-
-struct Dwarf_Attribute_s {
- Dwarf_Half ar_attribute; /* Attribute Value. */
- Dwarf_Half ar_attribute_form; /* Attribute Form. */
- Dwarf_Half ar_attribute_form_direct;
- /* Identical to ar_attribute_form except that if
- the original form uleb was DW_FORM_indirect,
- ar_attribute_form_direct contains DW_FORM_indirect
- but ar_attribute_form contains the true form. */
-
- Dwarf_CU_Context ar_cu_context;
- Dwarf_Small *ar_debug_info_ptr;
- Dwarf_Attribute ar_next;
-};
-
-/*
- This structure provides the context for a compilation unit.
- Thus, it contains the Dwarf_Debug, cc_dbg, that this cu
- belongs to. It contains the information in the compilation
- unit header, cc_length, cc_version_stamp, cc_abbrev_offset,
- and cc_address_size, in the .debug_info section for that cu.
- In addition, it contains the count, cc_count_cu, of the cu
- number of that cu in the list of cu's in the .debug_info.
- The count starts at 1, ie cc_count_cu is 1 for the first cu,
- 2 for the second and so on. This struct also contains a
- pointer, cc_abbrev_table, to a list of pairs of abbrev code
- and a pointer to the start of that abbrev
- in the .debug_abbrev section.
-
- Each die will also contain a pointer to such a struct to
- record the context for that die.
-
- Notice that a pointer to the CU DIE itself is
- Dwarf_Off off2 = cu_context->cc_debug_info_offset;
- cu_die_info_ptr = dbg->de_debug_info.dss_data +
- off2 + _dwarf_length_of_cu_header(dbg, off2);
-
- **Updated by dwarf_next_cu_header in dwarf_die_deliv.c
-*/
-struct Dwarf_CU_Context_s {
- Dwarf_Debug cc_dbg;
- /* The sum of cc_length, cc_length_size, and cc_extension_size
- is the total length of the CU including its header. */
- Dwarf_Word cc_length;
- /* cc_length_size is the size in bytes of an offset.
- 4 for 32bit dwarf, 8 for 64bit dwarf (whether MIPS/IRIX
- 64bit dwarf or standard 64bit dwarf using the extension
- mechanism). */
- Dwarf_Small cc_length_size;
- /* cc_extension_size is zero unless this is standard
- DWARF3 and later 64bit dwarf using the extension mechanism.
- If it is the DWARF3 and later 64bit dwarf cc_extension
- size is 4. So for 32bit dwarf and MIPS/IRIX 64bit dwarf
- cc_extension_size is zero. */
- Dwarf_Small cc_extension_size;
- Dwarf_Half cc_version_stamp;
- Dwarf_Sword cc_abbrev_offset;
- Dwarf_Small cc_address_size;
- /* cc_debug_info_offset is the offset in the section
- of the CU header of this CU. Dwarf_Word
- should be large enough. */
- Dwarf_Word cc_debug_info_offset;
- Dwarf_Byte_Ptr cc_last_abbrev_ptr;
- Dwarf_Hash_Table cc_abbrev_hash_table;
- Dwarf_CU_Context cc_next;
- /*unsigned char cc_offset_length; */
-};
-
-/* Consolidates section-specific data in one place.
- Section is an Elf specific term, intended as a general
- term (for non-Elf objects some code must synthesize the
- values somehow).
- Makes adding more section-data much simpler. */
-struct Dwarf_Section_s {
- Dwarf_Small * dss_data;
- Dwarf_Unsigned dss_size;
- Dwarf_Word dss_index;
- /* dss_addr is the 'section address' which is only
- non-zero for a GNU eh section.
- Purpose: to handle DW_EH_PE_pcrel encoding. Leaving
- it zero is fine for non-elf. */
- Dwarf_Addr dss_addr;
- Dwarf_Small dss_data_was_malloc;
-
- /* For non-elf, leaving the following fields zero
- will mean they are ignored. */
- /* dss_link should be zero unless a section has a link
- to another (sh_link). Used to access relocation data for
- a section (and for symtab section, access its strtab). */
- Dwarf_Word dss_link;
- /* The following is used when reading .rela sections
- (such sections appear in some .o files). */
- Dwarf_Half dss_reloc_index; /* Zero means ignore the reloc fields. */
- Dwarf_Small * dss_reloc_data;
- Dwarf_Unsigned dss_reloc_size;
- Dwarf_Addr dss_reloc_addr;
- /* dss_reloc_symtab is the sh_link of a .rela to its .symtab, leave
- it 0 if non-meaningful. */
- Dwarf_Addr dss_reloc_symtab;
- /* dss_reloc_link should be zero unless a reloc section has a link
- to another (sh_link). Used to access the symtab for relocations
- a section. */
- Dwarf_Word dss_reloc_link;
- /* Pointer to the elf symtab, used for elf .rela. Leave it 0
- if not relevant. */
- struct Dwarf_Section_s *dss_symtab;
-};
-
-/* Overview: if next_to_use== first, no error slots are used.
- If next_to_use+1 (mod maxcount) == first the slots are all used
-*/
-struct Dwarf_Harmless_s {
- unsigned dh_maxcount;
- unsigned dh_next_to_use;
- unsigned dh_first;
- unsigned dh_errs_count;
- char ** dh_errors;
-};
-
-struct Dwarf_Debug_s {
- /* All file access methods and support data
- are hidden in this structure.
- We get a pointer, callers control the lifetime of the
- structure and contents. */
- struct Dwarf_Obj_Access_Interface_s *de_obj_file;
-
- Dwarf_Handler de_errhand;
- Dwarf_Ptr de_errarg;
-
- /*
- Context for the compilation_unit just read by a call to
- dwarf_next_cu_header. **Updated by dwarf_next_cu_header in
- dwarf_die_deliv.c */
- Dwarf_CU_Context de_cu_context;
-
- /*
- Points to linked list of CU Contexts for the CU's already read.
- These are only CU's read by dwarf_next_cu_header(). */
- Dwarf_CU_Context de_cu_context_list;
-
- /*
- Points to the last CU Context added to the list by
- dwarf_next_cu_header(). */
- Dwarf_CU_Context de_cu_context_list_end;
-
- /*
- This is the list of CU contexts read for dwarf_offdie(). These
- may read ahead of dwarf_next_cu_header(). */
- Dwarf_CU_Context de_offdie_cu_context;
- Dwarf_CU_Context de_offdie_cu_context_end;
-
- /* Offset of last byte of last CU read. */
- Dwarf_Word de_info_last_offset;
-
- /*
- Number of bytes in the length, and offset field in various
- .debug_* sections. It's not very meaningful, and is
- only used in one 'approximate' calculation. */
- Dwarf_Small de_length_size;
-
- /* number of bytes in a pointer of the target in various .debug_
- sections. 4 in 32bit, 8 in MIPS 64, ia64. */
- Dwarf_Small de_pointer_size;
-
- /* set at creation of a Dwarf_Debug to say if form_string should be
- checked for valid length at every call. 0 means do the check.
- non-zero means do not do the check. */
- Dwarf_Small de_assume_string_in_bounds;
-
- /*
- Dwarf_Alloc_Hdr_s structs used to manage chunks that are
- malloc'ed for each allocation type for structs. */
- struct Dwarf_Alloc_Hdr_s de_alloc_hdr[ALLOC_AREA_REAL_TABLE_MAX];
-#ifdef DWARF_SIMPLE_MALLOC
- struct simple_malloc_record_s * de_simple_malloc_base;
-#endif
-
-
- /*
- These fields are used to process debug_frame section. **Updated
- by dwarf_get_fde_list in dwarf_frame.h */
- /*
- Points to contiguous block of pointers to Dwarf_Cie_s structs. */
- Dwarf_Cie *de_cie_data;
- /* Count of number of Dwarf_Cie_s structs. */
- Dwarf_Signed de_cie_count;
- /* Keep eh (GNU) separate!. */
- Dwarf_Cie *de_cie_data_eh;
- Dwarf_Signed de_cie_count_eh;
- /*
- Points to contiguous block of pointers to Dwarf_Fde_s structs. */
- Dwarf_Fde *de_fde_data;
- /* Count of number of Dwarf_Fde_s structs. */
- Dwarf_Signed de_fde_count;
- /* Keep eh (GNU) separate!. */
- Dwarf_Fde *de_fde_data_eh;
- Dwarf_Signed de_fde_count_eh;
-
- struct Dwarf_Section_s de_debug_info;
- struct Dwarf_Section_s de_debug_abbrev;
- struct Dwarf_Section_s de_debug_line;
- struct Dwarf_Section_s de_debug_loc;
- struct Dwarf_Section_s de_debug_aranges;
- struct Dwarf_Section_s de_debug_macinfo;
- struct Dwarf_Section_s de_debug_pubnames;
- struct Dwarf_Section_s de_debug_str;
- struct Dwarf_Section_s de_debug_frame;
-
- /* gnu: the g++ eh_frame section */
- struct Dwarf_Section_s de_debug_frame_eh_gnu;
-
- struct Dwarf_Section_s de_debug_pubtypes; /* DWARF3 .debug_pubtypes */
-
- struct Dwarf_Section_s de_debug_funcnames;
- struct Dwarf_Section_s de_debug_typenames; /* SGI IRIX extension essentially
- identical to DWARF3 .debug_pubtypes. */
- struct Dwarf_Section_s de_debug_varnames;
- struct Dwarf_Section_s de_debug_weaknames;
- struct Dwarf_Section_s de_debug_ranges;
-
- /* For non-elf, simply leave the following two structs zeroed and
- they will be ignored. */
- struct Dwarf_Section_s de_elf_symtab;
- struct Dwarf_Section_s de_elf_strtab;
-
-
- void *(*de_copy_word) (void *, const void *, size_t);
- unsigned char de_same_endian;
- unsigned char de_elf_must_close; /* if non-zero, then
- it was dwarf_init (not dwarf_elf_init)
- so must elf_end() */
-
- /* Default is DW_FRAME_INITIAL_VALUE from header. */
- Dwarf_Half de_frame_rule_initial_value;
-
- /* Default is DW_FRAME_LAST_REG_NUM. */
- Dwarf_Half de_frame_reg_rules_entry_count;
-
- Dwarf_Half de_frame_cfa_col_number;
- Dwarf_Half de_frame_same_value_number;
- Dwarf_Half de_frame_undefined_value_number;
-
- unsigned char de_big_endian_object; /* non-zero if big-endian
- object opened. */
-
- struct Dwarf_Harmless_s de_harmless_errors;
-};
-
-typedef struct Dwarf_Chain_s *Dwarf_Chain;
-struct Dwarf_Chain_s {
- void *ch_item;
- Dwarf_Chain ch_next;
-};
-
-
-#define CURRENT_VERSION_STAMP 2 /* DWARF2 */
-#define CURRENT_VERSION_STAMP3 3 /* DWARF3 */
-#define CURRENT_VERSION_STAMP4 4 /* DWARF4 */
-
- /* Size of cu header version stamp field. */
-#define CU_VERSION_STAMP_SIZE sizeof(Dwarf_Half)
-
- /* Size of cu header address size field. */
-#define CU_ADDRESS_SIZE_SIZE sizeof(Dwarf_Small)
-
-void *_dwarf_memcpy_swap_bytes(void *s1, const void *s2, size_t len);
-
-#define ORIGINAL_DWARF_OFFSET_SIZE 4
-#define DISTINGUISHED_VALUE 0xffffffff
-#define DISTINGUISHED_VALUE_OFFSET_SIZE 8
-
-/*
- We don't load the sections until they are needed. This function is
- used to load the section.
- */
-int _dwarf_load_section(Dwarf_Debug,
- struct Dwarf_Section_s *,
- Dwarf_Error *);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_types.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_types.h
deleted file mode 100644
index ebd31c6c7..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_types.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-typedef struct Dwarf_Type_Context_s *Dwarf_Type_Context;
-
-/* type never completed see dwarf_global.h */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_util.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_util.h
deleted file mode 100644
index 4046bb247..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_util.h
+++ /dev/null
@@ -1,311 +0,0 @@
-#ifndef DWARF_UTIL_H
-#define DWARF_UTIL_H
-/*
-
- Copyright (C) 2000,2003,2004 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright (C) 2007-2010 David Anderson. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-/* The address of the Free Software Foundation is
- Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA 02110-1301, USA.
- SGI has moved from the Crittenden Lane address.
-*/
-
-
-
-
-/*
- Decodes unsigned leb128 encoded numbers.
- Make sure ptr is a pointer to a 1-byte type.
- In 2003 and earlier this was a hand-inlined
- version of _dwarf_decode_u_leb128() which did
- not work correctly if Dwarf_Word was 64 bits.
-*/
-#define DECODE_LEB128_UWORD(ptr, value) \
- do { \
- Dwarf_Word uleblen; \
- value = _dwarf_decode_u_leb128(ptr,&uleblen); \
- ptr += uleblen; \
- } while (0)
-
-/*
- Decodes signed leb128 encoded numbers.
- Make sure ptr is a pointer to a 1-byte type.
- In 2003 and earlier this was a hand-inlined
- version of _dwarf_decode_s_leb128() which did
- not work correctly if Dwarf_Word was 64 bits.
-
-*/
-#define DECODE_LEB128_SWORD(ptr, value) \
- do { \
- Dwarf_Word sleblen; \
- value = _dwarf_decode_s_leb128(ptr,&sleblen); \
- ptr += sleblen; \
- } while(0)
-
-
-/*
- Skips leb128_encoded numbers that are guaranteed
- to be no more than 4 bytes long. Same for both
- signed and unsigned numbers.
-*/
-#define SKIP_LEB128_WORD(ptr) \
- do{ if ((*(ptr++) & 0x80) != 0) { \
- if ((*(ptr++) & 0x80) != 0) { \
- if ((*(ptr++) & 0x80) != 0) { \
- if ((*(ptr++) & 0x80) != 0) { \
- } \
- } \
- } \
- } } while (0)
-
-
-#define CHECK_DIE(die, error_ret_value) \
-do {if (die == NULL) { \
- _dwarf_error(NULL, error, DW_DLE_DIE_NULL); \
- return(error_ret_value); \
- } \
- if (die->di_cu_context == NULL) { \
- _dwarf_error(NULL, error, DW_DLE_DIE_NO_CU_CONTEXT); \
- return(error_ret_value); \
- } \
- if (die->di_cu_context->cc_dbg == NULL) { \
- _dwarf_error(NULL, error, DW_DLE_DBG_NULL); \
- return(error_ret_value); \
- } \
-} while (0)
-
-
-/*
- Reads 'source' for 'length' bytes from unaligned addr.
-
- Avoids any constant-in-conditional warnings and
- avoids a test in the generated code (for non-const cases,
- which are in the majority.)
- Uses a temp to avoid the test.
- The decl here should avoid any problem of size in the temp.
- This code is ENDIAN DEPENDENT
- The memcpy args are the endian issue.
-*/
-typedef Dwarf_Unsigned BIGGEST_UINT;
-
-#ifdef WORDS_BIGENDIAN
-#define READ_UNALIGNED(dbg,dest,desttype, source, length) \
- do { \
- BIGGEST_UINT _ltmp = 0; \
- dbg->de_copy_word( (((char *)(&_ltmp)) + sizeof(_ltmp) - length), \
- source, length) ; \
- dest = (desttype)_ltmp; \
- } while (0)
-
-
-/*
- This macro sign-extends a variable depending on the length.
- It fills the bytes between the size of the destination and
- the length with appropriate padding.
- This code is ENDIAN DEPENDENT but dependent only
- on host endianness, not object file endianness.
- The memcpy args are the issue.
-*/
-#define SIGN_EXTEND(dest, length) \
- do {if (*(Dwarf_Sbyte *)((char *)&dest + sizeof(dest) - length) < 0) {\
- memcpy((char *)&dest, "\xff\xff\xff\xff\xff\xff\xff\xff", \
- sizeof(dest) - length); \
- } \
- } while (0)
-#else /* LITTLE ENDIAN */
-
-#define READ_UNALIGNED(dbg,dest,desttype, source, length) \
- do { \
- BIGGEST_UINT _ltmp = 0; \
- dbg->de_copy_word( (char *)(&_ltmp) , \
- source, length) ; \
- dest = (desttype)_ltmp; \
- } while (0)
-
-
-/*
- This macro sign-extends a variable depending on the length.
- It fills the bytes between the size of the destination and
- the length with appropriate padding.
- This code is ENDIAN DEPENDENT but dependent only
- on host endianness, not object file endianness.
- The memcpy args are the issue.
-*/
-#define SIGN_EXTEND(dest, length) \
- do {if (*(Dwarf_Sbyte *)((char *)&dest + (length-1)) < 0) {\
- memcpy((char *)&dest+length, \
- "\xff\xff\xff\xff\xff\xff\xff\xff", \
- sizeof(dest) - length); \
- } \
- } while (0)
-
-#endif /* ! LITTLE_ENDIAN */
-
-
-
-/*
- READ_AREA LENGTH reads the length (the older way
- of pure 32 or 64 bit
- or the new proposed dwarfv2.1 64bit-extension way)
-
- It reads the bits from where rw_src_data_p points to
- and updates the rw_src_data_p to point past what was just read.
-
- It updates w_length_size (to the size of an offset, either 4 or 8)
- and w_exten_size (set 0 unless this frame has the DWARF3,4 64bit
- extension, in which case w_exten_size is set to 4).
-
- r_dbg is just the current dbg pointer.
- w_target is the output length field.
- r_targtype is the output type. Always Dwarf_Unsigned so far.
-
-*/
-/* This one handles the v2.1 64bit extension
- and 32bit (and MIPS fixed 64 bit via the
- dwarf_init-set r_dbg->de_length_size)..
- It does not recognize any but the one distingushed value
- (the only one with defined meaning).
- It assumes that no CU will have a length
- 0xffffffxx (32bit length)
- or
- 0xffffffxx xxxxxxxx (64bit length)
- which makes possible auto-detection of the extension.
-
- This depends on knowing that only a non-zero length
- is legitimate (AFAICT), and for IRIX non-standard -64
- dwarf that the first 32 bits of the 64bit offset will be
- zero (because the compiler could not handle a truly large
- value as of Jan 2003 and because no app has that much debug
- info anyway, at least not in the IRIX case).
-
- At present not testing for '64bit elf' here as that
- does not seem necessary (none of the 64bit length seems
- appropriate unless it's ident[EI_CLASS] == ELFCLASS64).
-*/
-# define READ_AREA_LENGTH(r_dbg,w_target,r_targtype, \
- rw_src_data_p,w_length_size,w_exten_size) \
-do { READ_UNALIGNED(r_dbg,w_target,r_targtype, \
- rw_src_data_p, ORIGINAL_DWARF_OFFSET_SIZE); \
- if(w_target == DISTINGUISHED_VALUE) { \
- /* dwarf3 64bit extension */ \
- w_length_size = DISTINGUISHED_VALUE_OFFSET_SIZE; \
- rw_src_data_p += ORIGINAL_DWARF_OFFSET_SIZE; \
- w_exten_size = ORIGINAL_DWARF_OFFSET_SIZE; \
- READ_UNALIGNED(r_dbg,w_target,r_targtype, \
- rw_src_data_p, DISTINGUISHED_VALUE_OFFSET_SIZE);\
- rw_src_data_p += DISTINGUISHED_VALUE_OFFSET_SIZE; \
- } else { \
- if(w_target == 0 && r_dbg->de_big_endian_object) { \
- /* IRIX 64 bit, big endian. This test */ \
- /* is not a truly precise test, a precise test */ \
- /* would check if the target was IRIX. */ \
- READ_UNALIGNED(r_dbg,w_target,r_targtype, \
- rw_src_data_p, DISTINGUISHED_VALUE_OFFSET_SIZE); \
- w_length_size = DISTINGUISHED_VALUE_OFFSET_SIZE; \
- rw_src_data_p += DISTINGUISHED_VALUE_OFFSET_SIZE; \
- w_exten_size = 0; \
- } else { \
- /* standard 32 bit dwarf2/dwarf3 */ \
- w_exten_size = 0; \
- w_length_size = ORIGINAL_DWARF_OFFSET_SIZE; \
- rw_src_data_p += w_length_size; \
- } \
- } } while(0)
-
-Dwarf_Unsigned
-_dwarf_decode_u_leb128(Dwarf_Small * leb128,
- Dwarf_Word * leb128_length);
-
-Dwarf_Signed
-_dwarf_decode_s_leb128(Dwarf_Small * leb128,
- Dwarf_Word * leb128_length);
-
-Dwarf_Unsigned
-_dwarf_get_size_of_val(Dwarf_Debug dbg,
- Dwarf_Unsigned form,
- Dwarf_Half address_size,
- Dwarf_Small * val_ptr,
- int v_length_size);
-
-struct Dwarf_Hash_Table_Entry_s;
-/* This single struct is the base for the hash table.
- The intent is that once the total_abbrev_count across
- all the entries is greater than 10*current_table_entry_count
- one should build a new Dwarf_Hash_Table_Base_s, rehash
- all the existing entries, and delete the old table and entries.
- (10 is a heuristic, nothing magic about it, but once the
- count gets to 30 or 40 times current_table_entry_count
- things really slow down a lot. One (500MB) application had
- 127000 abbreviations in one compilation unit)
- The incoming 'code' is an abbrev number and those simply
- increase linearly so the hashing is perfect always.
-*/
-struct Dwarf_Hash_Table_s {
- unsigned long tb_table_entry_count;
- unsigned long tb_total_abbrev_count;
- /* Each table entry is a list of abbreviations. */
- struct Dwarf_Hash_Table_Entry_s *tb_entries;
-};
-
-/*
- This struct is used to build a hash table for the
- abbreviation codes for a compile-unit.
-*/
-struct Dwarf_Hash_Table_Entry_s {
- Dwarf_Abbrev_List at_head;
-};
-
-
-
-Dwarf_Abbrev_List
-_dwarf_get_abbrev_for_code(Dwarf_CU_Context cu_context,
- Dwarf_Unsigned code);
-
-
-/* return 1 if string ends before 'endptr' else
-** return 0 meaning string is not properly terminated.
-** Presumption is the 'endptr' pts to end of some dwarf section data.
-*/
-int _dwarf_string_valid(void *startptr, void *endptr);
-
-Dwarf_Unsigned _dwarf_length_of_cu_header(Dwarf_Debug,
- Dwarf_Unsigned offset);
-Dwarf_Unsigned _dwarf_length_of_cu_header_simple(Dwarf_Debug);
-
-int _dwarf_load_debug_info(Dwarf_Debug dbg, Dwarf_Error *error);
-void _dwarf_free_abbrev_hash_table_contents(Dwarf_Debug dbg,
- struct Dwarf_Hash_Table_s* hash_table);
-int _dwarf_get_address_size(Dwarf_Debug dbg, Dwarf_Die die);
-
-#endif /* DWARF_UTIL_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_vars.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_vars.h
deleted file mode 100644
index bd5f967e4..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_vars.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-typedef struct Dwarf_Var_Context_s *Dwarf_Var_Context;
-
-/* struct never completed: see dwarf_global.h */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_weaks.h b/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_weaks.h
deleted file mode 100644
index d38f5f118..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/dwarf_weaks.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-typedef struct Dwarf_Weak_Context_s *Dwarf_Weak_Context;
-
-/* struct never completed: see dwarf_global.h */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/libdwarf.h b/desmume/src/windows/libelf_libdwarf/libdwarf/libdwarf.h
deleted file mode 100644
index 7e59d32f4..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/libdwarf.h
+++ /dev/null
@@ -1,2727 +0,0 @@
-/*
-
- Copyright (C) 2000-2010 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2007-2010 Sun Microsystems, Inc. All rights reserved.
- Portions Copyright 2008-2010 David Anderson. All rights reserved.
- Portions Copyright 2008-2010 Arxan Technologies, Inc. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-#ifndef _LIBDWARF_H
-#define _LIBDWARF_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-/*
- libdwarf.h
- $Revision: #9 $ $Date: 2008/01/17 $
-
- For libdwarf producers and consumers
-
- The interface is defined as having 8-byte signed and unsigned
- values so it can handle 64-or-32bit target on 64-or-32bit host.
- Addr is the native size: it represents pointers on
- the host machine (not the target!).
-
- This contains declarations for types and all producer
- and consumer functions.
-
- Function declarations are written on a single line each here
- so one can use grep to each declaration in its entirety.
- The declarations are a little harder to read this way, but...
-
-*/
-
-struct Elf;
-typedef struct Elf* dwarf_elf_handle;
-
-/* To enable printing with printf regardless of the
- actual underlying data type, we define the DW_PR_xxx macros. */
-#if (_MIPS_SZLONG == 64)
-/* Special case for MIPS, so -64 (LP64) build gets simple -long-.
- Non-MIPS LP64 or ILP64 environments should probably ensure
- _MIPS_SZLONG set to 64 everywhere this header is #included.
-*/
-typedef int Dwarf_Bool; /* boolean type */
-typedef unsigned long Dwarf_Off; /* 4 or 8 byte file offset */
-typedef unsigned long Dwarf_Unsigned; /* 4 or 8 byte unsigned value */
-typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */
-typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */
-typedef signed long Dwarf_Signed; /* 4 or 8 byte signed value */
-typedef unsigned long Dwarf_Addr; /* target memory address */
-#define DW_PR_DUx "lx"
-#define DW_PR_DSx "lx"
-#define DW_PR_DUu "lu"
-#define DW_PR_DSd "ld"
-
-#else /* 32-bit */
-/* This is for ILP32, allowing i/o of 64bit dwarf info.
- Also should be fine for LP64 and ILP64 cases.
-*/
-typedef int Dwarf_Bool; /* boolean type */
-typedef unsigned long long Dwarf_Off; /* 8 byte file offset */
-typedef unsigned long long Dwarf_Unsigned; /* 8 byte unsigned value*/
-typedef unsigned short Dwarf_Half; /* 2 byte unsigned value */
-typedef unsigned char Dwarf_Small; /* 1 byte unsigned value */
-typedef signed long long Dwarf_Signed; /* 8 byte signed value */
-typedef unsigned long long Dwarf_Addr; /* target memory address */
-#define DW_PR_DUx "llx"
-#define DW_PR_DSx "llx"
-#define DW_PR_DUu "llu"
-#define DW_PR_DSd "lld"
-#endif
-#ifdef HAVE_NONSTANDARD_PRINTF_64_FORMAT
-/* Windows does not use std C formatting, so allow it. */
-#undef DW_PR_DUx
-#undef DW_PR_DSx
-#undef DW_PR_DUu
-#undef DW_PR_DSd
-#define DW_PR_DUx "I64x"
-#define DW_PR_DSx "I64x"
-#define DW_PR_DUu "I64u"
-#define DW_PR_DSd "I64d"
-#endif /* HAVE_NONSTANDARD_FORMAT */
-
-typedef void* Dwarf_Ptr; /* host machine pointer */
-
-/* Used for DW_FORM_ref_sig8. It is not a string, it
- is 8 bytes of a signature one would use to find
- a type unit. See dwarf_formsig8()
-*/
-typedef struct {
- char signature[8];
-} Dwarf_Sig8;
-
-/* Contains info on an uninterpreted block of data
-*/
-typedef struct {
- Dwarf_Unsigned bl_len; /* length of block */
- Dwarf_Ptr bl_data; /* uninterpreted data */
- Dwarf_Small bl_from_loclist; /*non-0 if loclist, else debug_info*/
- Dwarf_Unsigned bl_section_offset; /* Section (not CU) offset
- which 'data' comes from. */
-} Dwarf_Block;
-
-
-/* location record
-*/
-typedef struct {
- Dwarf_Small lr_atom; /* location operation */
- Dwarf_Unsigned lr_number; /* operand */
- Dwarf_Unsigned lr_number2; /* for OP_BREGx */
- Dwarf_Unsigned lr_offset; /* offset in locexpr for OP_BRA etc */
-} Dwarf_Loc;
-
-
-/* location description
-*/
-typedef struct {
- Dwarf_Addr ld_lopc; /* beginning of active range */
- Dwarf_Addr ld_hipc; /* end of active range */
- Dwarf_Half ld_cents; /* count of location records */
- Dwarf_Loc* ld_s; /* pointer to list of same */
- Dwarf_Small ld_from_loclist;
- /* non-0 if loclist, else debug_info*/
-
- Dwarf_Unsigned ld_section_offset; /* Section (not CU) offset
- where loc-expr begins*/
-} Dwarf_Locdesc;
-
-/* First appears in DWARF3.
- The dwr_addr1/addr2 data is either an offset (DW_RANGES_ENTRY)
- or an address (dwr_addr2 in DW_RANGES_ADDRESS_SELECTION) or
- both are zero (DW_RANGES_END).
-*/
-enum Dwarf_Ranges_Entry_Type { DW_RANGES_ENTRY,
- DW_RANGES_ADDRESS_SELECTION,
- DW_RANGES_END };
-typedef struct {
- Dwarf_Addr dwr_addr1;
- Dwarf_Addr dwr_addr2;
- enum Dwarf_Ranges_Entry_Type dwr_type;
-} Dwarf_Ranges;
-
-/* Frame description instructions expanded.
-*/
-typedef struct {
- Dwarf_Small fp_base_op;
- Dwarf_Small fp_extended_op;
- Dwarf_Half fp_register;
-
- /* Value may be signed, depends on op.
- Any applicable data_alignment_factor has
- not been applied, this is the raw offset. */
- Dwarf_Unsigned fp_offset;
- Dwarf_Off fp_instr_offset;
-} Dwarf_Frame_Op; /* DWARF2 */
-
-typedef struct {
- Dwarf_Small fp_base_op;
- Dwarf_Small fp_extended_op;
- Dwarf_Half fp_register;
-
- /* Value may be signed, depends on op.
- Any applicable data_alignment_factor has
- not been applied, this is the raw offset. */
- Dwarf_Unsigned fp_offset_or_block_len;
- Dwarf_Small *fp_expr_block;
-
- Dwarf_Off fp_instr_offset;
-} Dwarf_Frame_Op3; /* DWARF3 and DWARF2 compatible */
-
-/* ***IMPORTANT NOTE, TARGET DEPENDENCY ****
- DW_REG_TABLE_SIZE must be at least as large as
- the number of registers
- (DW_FRAME_LAST_REG_NUM) as defined in dwarf.h
- Preferably identical to DW_FRAME_LAST_REG_NUM.
- Ensure [0-DW_REG_TABLE_SIZE] does not overlap
- DW_FRAME_UNDEFINED_VAL or DW_FRAME_SAME_VAL.
- Also ensure DW_FRAME_REG_INITIAL_VALUE is set to what
- is appropriate to your cpu.
- For various CPUs DW_FRAME_UNDEFINED_VAL is correct
- as the value for DW_FRAME_REG_INITIAL_VALUE.
-
- For consumer apps, this can be set dynamically: see
- dwarf_set_frame_rule_table_size();
- */
-#ifndef DW_REG_TABLE_SIZE
-#define DW_REG_TABLE_SIZE 66
-#endif
-
-/* For MIPS, DW_FRAME_SAME_VAL is the correct default value
- for a frame register value. For other CPUS another value
- may be better, such as DW_FRAME_UNDEFINED_VAL.
- See dwarf_set_frame_rule_table_size
-*/
-#ifndef DW_FRAME_REG_INITIAL_VALUE
-#define DW_FRAME_REG_INITIAL_VALUE DW_FRAME_SAME_VAL
-#endif
-
-/* Taken as meaning 'undefined value', this is not
- a column or register number.
- Only present at libdwarf runtime in the consumer
- interfaces. Never on disk.
- DW_FRAME_* Values present on disk are in dwarf.h
- Ensure this is > DW_REG_TABLE_SIZE (the reg table
- size is changeable at runtime with the *reg3() interfaces,
- and this value must be greater than the reg table size).
-*/
-#define DW_FRAME_UNDEFINED_VAL 1034
-
-/* Taken as meaning 'same value' as caller had, not a column
- or register number.
- Only present at libdwarf runtime in the consumer
- interfaces. Never on disk.
- DW_FRAME_* Values present on disk are in dwarf.h
- Ensure this is > DW_REG_TABLE_SIZE (the reg table
- size is changeable at runtime with the *reg3() interfaces,
- and this value must be greater than the reg table size).
-*/
-#define DW_FRAME_SAME_VAL 1035
-
-/* For DWARF3 consumer interfaces, make the CFA a column with no
- real table number. This is what should have been done
- for the DWARF2 interfaces. This actually works for
- both DWARF2 and DWARF3, but see the libdwarf documentation
- on Dwarf_Regtable3 and dwarf_get_fde_info_for_reg3()
- and dwarf_get_fde_info_for_all_regs3()
- Do NOT use this with the older dwarf_get_fde_info_for_reg()
- or dwarf_get_fde_info_for_all_regs() consumer interfaces.
- Must be higher than any register count for *any* ABI
- (ensures maximum applicability with minimum effort).
- Ensure this is > DW_REG_TABLE_SIZE (the reg table
- size is changeable at runtime with the *reg3() interfaces,
- and this value must be greater than the reg table size).
- Only present at libdwarf runtime in the consumer
- interfaces. Never on disk.
-*/
-#define DW_FRAME_CFA_COL3 1436
-
-/* The following are all needed to evaluate DWARF3 register rules.
-*/
-#define DW_EXPR_OFFSET 0 /* DWARF2 only sees this. */
-#define DW_EXPR_VAL_OFFSET 1
-#define DW_EXPR_EXPRESSION 2
-#define DW_EXPR_VAL_EXPRESSION 3
-
-typedef struct Dwarf_Regtable_Entry_s {
- /* For each index i (naming a hardware register with dwarf number
- i) the following is true and defines the value of that register:
-
- If dw_regnum is Register DW_FRAME_UNDEFINED_VAL
- it is not DWARF register number but
- a place holder indicating the register has no defined value.
- If dw_regnum is Register DW_FRAME_SAME_VAL
- it is not DWARF register number but
- a place holder indicating the register has the same
- value in the previous frame.
- DW_FRAME_UNDEFINED_VAL, DW_FRAME_SAME_VAL are
- only present at libdwarf runtime. Never on disk.
- DW_FRAME_* Values present on disk are in dwarf.h
-
- Otherwise: the register number is a DWARF register number
- (see ABI documents for how this translates to hardware/
- software register numbers in the machine hardware)
- and the following applies:
-
- if dw_value_type == DW_EXPR_OFFSET (the only case for dwarf2):
- If dw_offset_relevant is non-zero, then
- the value is stored at at the address CFA+N where
- N is a signed offset.
- Rule: Offset(N)
- If dw_offset_relevant is zero, then the value of the register
- is the value of (DWARF) register number dw_regnum.
- Rule: register(F)
- Other values of dw_value_type are an error.
- */
- Dwarf_Small dw_offset_relevant;
-
- /* For DWARF2, always 0 */
- Dwarf_Small dw_value_type;
-
- Dwarf_Half dw_regnum;
-
- /* The data type here should the larger of Dwarf_Addr
- and Dwarf_Unsigned and Dwarf_Signed. */
- Dwarf_Addr dw_offset;
-} Dwarf_Regtable_Entry;
-
-typedef struct Dwarf_Regtable_s {
- struct Dwarf_Regtable_Entry_s rules[DW_REG_TABLE_SIZE];
-} Dwarf_Regtable;
-
-/* opaque type. Functional interface shown later. */
-struct Dwarf_Reg_value3_s;
-typedef struct Dwarf_Reg_value3_s Dwarf_Reg_Value3;
-
-typedef struct Dwarf_Regtable_Entry3_s {
- /* For each index i (naming a hardware register with dwarf number
- i) the following is true and defines the value of that register:
-
- If dw_regnum is Register DW_FRAME_UNDEFINED_VAL
- it is not DWARF register number but
- a place holder indicating the register has no defined value.
- If dw_regnum is Register DW_FRAME_SAME_VAL
- it is not DWARF register number but
- a place holder indicating the register has the same
- value in the previous frame.
- DW_FRAME_UNDEFINED_VAL, DW_FRAME_SAME_VAL and
- DW_FRAME_CFA_COL3 are only present at libdwarf runtime.
- Never on disk.
- DW_FRAME_* Values present on disk are in dwarf.h
- Because DW_FRAME_SAME_VAL and DW_FRAME_UNDEFINED_VAL
- and DW_FRAME_CFA_COL3 are defineable at runtime
- consider the names symbolic in this comment, not absolute.
-
- Otherwise: the register number is a DWARF register number
- (see ABI documents for how this translates to hardware/
- software register numbers in the machine hardware)
- and the following applies:
-
- In a cfa-defining entry (rt3_cfa_rule) the regnum is the
- CFA 'register number'. Which is some 'normal' register,
- not DW_FRAME_CFA_COL3, nor DW_FRAME_SAME_VAL, nor
- DW_FRAME_UNDEFINED_VAL.
-
- If dw_value_type == DW_EXPR_OFFSET (the only possible case for
- dwarf2):
- If dw_offset_relevant is non-zero, then
- the value is stored at at the address
- CFA+N where N is a signed offset.
- dw_regnum is the cfa register rule which means
- one ignores dw_regnum and uses the CFA appropriately.
- So dw_offset_or_block_len is a signed value, really,
- and must be printed/evaluated as such.
- Rule: Offset(N)
- If dw_offset_relevant is zero, then the value of the register
- is the value of (DWARF) register number dw_regnum.
- Rule: register(R)
- If dw_value_type == DW_EXPR_VAL_OFFSET
- the value of this register is CFA +N where N is a signed offset.
- dw_regnum is the cfa register rule which means
- one ignores dw_regnum and uses the CFA appropriately.
- Rule: val_offset(N)
- If dw_value_type == DW_EXPR_EXPRESSION
- The value of the register is the value at the address
- computed by evaluating the DWARF expression E.
- Rule: expression(E)
- The expression E byte stream is pointed to by dw_block_ptr.
- The expression length in bytes is given by
- dw_offset_or_block_len.
- If dw_value_type == DW_EXPR_VAL_EXPRESSION
- The value of the register is the value
- computed by evaluating the DWARF expression E.
- Rule: val_expression(E)
- The expression E byte stream is pointed to by dw_block_ptr.
- The expression length in bytes is given by
- dw_offset_or_block_len.
- Other values of dw_value_type are an error.
- */
- Dwarf_Small dw_offset_relevant;
- Dwarf_Small dw_value_type;
- Dwarf_Half dw_regnum;
- Dwarf_Unsigned dw_offset_or_block_len;
- Dwarf_Ptr dw_block_ptr;
-
-}Dwarf_Regtable_Entry3;
-
-/* For the DWARF3 version, moved the DW_FRAME_CFA_COL
- out of the array and into its own struct.
- Having it part of the array is not very easy to work
- with from a portability point of view: changing
- the number for every architecture is a pain (if one fails
- to set it correctly a register rule gets clobbered when
- setting CFA). With MIPS it just happened to be easy to use
- DW_FRAME_CFA_COL (it was wrong conceptually but it was easy...).
-
- rt3_rules and rt3_reg_table_size must be filled in before
- calling libdwarf. Filled in with a pointer to an array
- (pointer and array set up by the calling application)
- of rt3_reg_table_size Dwarf_Regtable_Entry3_s structs.
- libdwarf does not allocate or deallocate space for the
- rules, you must do so. libdwarf will initialize the
- contents rules array, you do not need to do so (though
- if you choose to initialize the array somehow that is ok:
- libdwarf will overwrite your initializations with its own).
-
-*/
-typedef struct Dwarf_Regtable3_s {
- struct Dwarf_Regtable_Entry3_s rt3_cfa_rule;
-
- Dwarf_Half rt3_reg_table_size;
- struct Dwarf_Regtable_Entry3_s * rt3_rules;
-} Dwarf_Regtable3;
-
-
-/* Use for DW_EPXR_STANDARD., DW_EXPR_VAL_OFFSET.
- Returns DW_DLV_OK if the value is available.
- If DW_DLV_OK returns the regnum and offset thru the pointers
- (which the consumer must use appropriately).
-*/
-int dwarf_frame_get_reg_register(struct Dwarf_Regtable_Entry3_s *reg_in,
- Dwarf_Small *offset_relevant,
- Dwarf_Half *regnum_out,
- Dwarf_Signed *offset_out);
-
-/* Use for DW_EXPR_EXPRESSION, DW_EXPR_VAL_EXPRESSION.
- Returns DW_DLV_OK if the value is available.
- The caller must pass in the address of a valid
- Dwarf_Block (the caller need not initialize it).
-*/
-int dwarf_frame_get_reg_expression(struct Dwarf_Regtable_Entry3_s *reg_in,
- Dwarf_Block *block_out);
-
-
-/* For DW_DLC_SYMBOLIC_RELOCATIONS output to caller
- v2, adding drd_length: some relocations are 4 and
- some 8 bytes (pointers are 8, section offsets 4) in
- some dwarf environments. (MIPS relocations are all one
- size in any given ABI.) Changing drd_type to an unsigned char
- to keep struct size down.
-*/
-enum Dwarf_Rel_Type {
- dwarf_drt_none, /* Should not get to caller */
- dwarf_drt_data_reloc, /* Simple normal relocation. */
- dwarf_drt_segment_rel, /* Special reloc, exceptions. */
- /* dwarf_drt_first_of_length_pair and drt_second
- are for for the .word end - begin case. */
- dwarf_drt_first_of_length_pair,
- dwarf_drt_second_of_length_pair
-};
-
-typedef struct Dwarf_P_Marker_s * Dwarf_P_Marker;
-struct Dwarf_P_Marker_s {
- Dwarf_Unsigned ma_marker;
- Dwarf_Unsigned ma_offset;
-};
-
-typedef struct Dwarf_Relocation_Data_s * Dwarf_Relocation_Data;
-struct Dwarf_Relocation_Data_s {
- unsigned char drd_type; /* Cast to/from Dwarf_Rel_Type
- to keep size small in struct. */
- unsigned char drd_length; /* Length in bytes of data being
- relocated. 4 for 32bit data,
- 8 for 64bit data. */
- Dwarf_Unsigned drd_offset; /* Where the data to reloc is. */
- Dwarf_Unsigned drd_symbol_index;
-};
-
-typedef struct Dwarf_P_String_Attr_s * Dwarf_P_String_Attr;
-struct Dwarf_P_String_Attr_s {
- Dwarf_Unsigned sa_offset; /* Offset of string attribute data */
- Dwarf_Unsigned sa_nbytes;
-};
-
-
-/* Opaque types for Consumer Library. */
-typedef struct Dwarf_Debug_s* Dwarf_Debug;
-typedef struct Dwarf_Die_s* Dwarf_Die;
-typedef struct Dwarf_Line_s* Dwarf_Line;
-typedef struct Dwarf_Global_s* Dwarf_Global;
-typedef struct Dwarf_Func_s* Dwarf_Func;
-typedef struct Dwarf_Type_s* Dwarf_Type;
-typedef struct Dwarf_Var_s* Dwarf_Var;
-typedef struct Dwarf_Weak_s* Dwarf_Weak;
-typedef struct Dwarf_Error_s* Dwarf_Error;
-typedef struct Dwarf_Attribute_s* Dwarf_Attribute;
-typedef struct Dwarf_Abbrev_s* Dwarf_Abbrev;
-typedef struct Dwarf_Fde_s* Dwarf_Fde;
-typedef struct Dwarf_Cie_s* Dwarf_Cie;
-typedef struct Dwarf_Arange_s* Dwarf_Arange;
-
-/* Opaque types for Producer Library. */
-typedef struct Dwarf_P_Debug_s* Dwarf_P_Debug;
-typedef struct Dwarf_P_Die_s* Dwarf_P_Die;
-typedef struct Dwarf_P_Attribute_s* Dwarf_P_Attribute;
-typedef struct Dwarf_P_Fde_s* Dwarf_P_Fde;
-typedef struct Dwarf_P_Expr_s* Dwarf_P_Expr;
-typedef Dwarf_Unsigned Dwarf_Tag;
-
-
-/* error handler function
-*/
-typedef void (*Dwarf_Handler)(Dwarf_Error /*error*/, Dwarf_Ptr /*errarg*/);
-
-
-/* Begin libdwarf Object File Interface declarations.
-
-As of February 2008 there are multiple dwarf_reader object access
-initialization methods available:
-The traditional dwarf_elf_init() and dwarf_init() and dwarf_finish()
- which assume libelf and POSIX file access.
-An object-file and library agnostic dwarf_object_init() and dwarf_object_finish()
- which allow the coder to provide object access routines
- abstracting away the elf interface. So there is no dependence in the
- reader code on the object format and no dependence on libelf.
- See the code in dwarf_elf_access.c and dwarf_original_elf_init.c
- to see an example of initializing the structures mentioned below.
-
-Projects using dwarf_elf_init() or dwarf_init() can ignore
-the Dwarf_Obj_Access* structures entirely as all these details
-are completed for you.
-
-*/
-
-typedef struct Dwarf_Obj_Access_Interface_s Dwarf_Obj_Access_Interface;
-typedef struct Dwarf_Obj_Access_Methods_s Dwarf_Obj_Access_Methods;
-typedef struct Dwarf_Obj_Access_Section_s Dwarf_Obj_Access_Section;
-
-
-/* Used in the get_section interface function
- in Dwarf_Obj_Access_Section_s. Since libdwarf
- depends on standard DWARF section names an object
- format that has no such names (but has some
- method of setting up 'sections equivalents')
- must arrange to return standard DWARF section
- names in the 'name' field. libdwarf does
- not free the strings in 'name'. */
-struct Dwarf_Obj_Access_Section_s {
- Dwarf_Addr addr;
- Dwarf_Unsigned size;
- const char* name;
- /* Set link to zero if it is meaningless. If non-zero
- it should be a link to a rela section or from symtab
- to strtab. In Elf it is sh_link. */
- Dwarf_Unsigned link;
-};
-
-/* Returned by the get_endianness function in
- Dwarf_Obj_Access_Methods_s. */
-typedef enum {
- DW_OBJECT_MSB,
- DW_OBJECT_LSB
-} Dwarf_Endianness;
-
-/* The functions we need to access object data from libdwarf are declared here.
-
- In these function pointer declarations
- 'void *obj' is intended to be a pointer (the object field in
- Dwarf_Obj_Access_Interface_s)
- that hides the library-specific and object-specific data that makes
- it possible to handle multiple object formats and multiple libraries.
- It's not required that one handles multiple such in a single libdwarf
- archive/shared-library (but not ruled out either).
- See dwarf_elf_object_access_internals_t and dwarf_elf_access.c
- for an example.
-
-*/
-struct Dwarf_Obj_Access_Methods_s {
- /**
- * get_section_info
- *
- * Get address, size, and name info about a section.
- *
- * Parameters
- * section_index - Zero-based index.
- * return_section - Pointer to a structure in which section info
- * will be placed. Caller must provide a valid pointer to a
- * structure area. The structure's contents will be overwritten
- * by the call to get_section_info.
- * error - A pointer to an integer in which an error code may be stored.
- *
- * Return
- * DW_DLV_OK - Everything ok.
- * DW_DLV_ERROR - Error occurred. Use 'error' to determine the
- * libdwarf defined error.
- * DW_DLV_NO_ENTRY - No such section.
- */
- int (*get_section_info)(void* obj, Dwarf_Half section_index,
- Dwarf_Obj_Access_Section* return_section, int* error);
- /**
- * get_byte_order
- *
- * Get whether the object file represented by this interface is big-endian
- * (DW_OBJECT_MSB) or little endian (DW_OBJECT_LSB).
- *
- * Parameters
- * obj - Equivalent to 'this' in OO languages.
- *
- * Return
- * Endianness of object. Cannot fail.
- */
- Dwarf_Endianness (*get_byte_order)(void* obj);
- /**
- * get_length_size
- *
- * Get the size of a length field in the underlying object file.
- * libdwarf currently supports * 4 and 8 byte sizes, but may
- * support larger in the future.
- * Perhaps the return type should be an enumeration?
- *
- * Parameters
- * obj - Equivalent to 'this' in OO languages.
- *
- * Return
- * Size of length. Cannot fail.
- */
- Dwarf_Small (*get_length_size)(void* obj);
- /**
- * get_pointer_size
- *
- * Get the size of a pointer field in the underlying object file.
- * libdwarf currently supports 4 and 8 byte sizes.
- * Perhaps the return type should be an enumeration?
-
- * Return
- * Size of pointer. Cannot fail.
- */
- Dwarf_Small (*get_pointer_size)(void* obj);
- /**
- * get_section_count
- *
- * Get the number of sections in the object file.
- *
- * Parameters
- *
- * Return
- * Number of sections
- */
- Dwarf_Unsigned (*get_section_count)(void* obj);
- /**
- * load_section
- *
- * Get a pointer to an array of bytes that represent the section.
- *
- * Parameters
- * section_index - Zero-based index.
- * return_data - The address of a pointer to which the section data block
- * will be assigned.
- * error - Pointer to an integer for returning libdwarf-defined
- * error numbers.
- *
- * Return
- * DW_DLV_OK - No error.
- * DW_DLV_ERROR - Error. Use 'error' to indicate a libdwarf-defined
- * error number.
- * DW_DLV_NO_ENTRY - No such section.
- */
- int (*load_section)(void* obj, Dwarf_Half section_index,
- Dwarf_Small** return_data, int* error);
-
- /**
- * relocate_a_section
- * If relocations are not supported leave this pointer NULL.
- *
- * Get a pointer to an array of bytes that represent the section.
- *
- * Parameters
- * section_index - Zero-based index of the section to be relocated.
- * error - Pointer to an integer for returning libdwarf-defined
- * error numbers.
- *
- * Return
- * DW_DLV_OK - No error.
- * DW_DLV_ERROR - Error. Use 'error' to indicate a libdwarf-defined
- * error number.
- * DW_DLV_NO_ENTRY - No such section.
- */
- int (*relocate_a_section)(void* obj, Dwarf_Half section_index,
- Dwarf_Debug dbg,
- int* error);
-
-};
-
-
-
-/* These structures are allocated and deallocated by your code
- when you are using the libdwarf Object File Interface
- [dwarf_object_init() and dwarf_object_finish()] directly.
- dwarf_object_finish() does not free
- struct Dwarf_Obj_Access_Interface_s or its content.
- (libdwarf does record a pointer to this struct: you must
- ensure that pointer remains valid for as long as
- a libdwarf instance is open (meaning
- after dwarf_init() and before dwarf_finish()).
-
- If you are reading Elf objects and libelf use dwarf_init()
- or dwarf_elf_init() which take care of these details.
-*/
-struct Dwarf_Obj_Access_Interface_s {
- /* object is a void* as it hides the data the object access routines
- need (which varies by library in use and object format).
- */
- void* object;
- const Dwarf_Obj_Access_Methods * methods;
-};
-
-/* End libdwarf Object File Interface */
-
-/*
- Dwarf_dealloc() alloc_type arguments.
- Argument points to:
-*/
-#define DW_DLA_STRING 0x01 /* char* */
-#define DW_DLA_LOC 0x02 /* Dwarf_Loc */
-#define DW_DLA_LOCDESC 0x03 /* Dwarf_Locdesc */
-#define DW_DLA_ELLIST 0x04 /* Dwarf_Ellist (not used)*/
-#define DW_DLA_BOUNDS 0x05 /* Dwarf_Bounds (not used) */
-#define DW_DLA_BLOCK 0x06 /* Dwarf_Block */
-#define DW_DLA_DEBUG 0x07 /* Dwarf_Debug */
-#define DW_DLA_DIE 0x08 /* Dwarf_Die */
-#define DW_DLA_LINE 0x09 /* Dwarf_Line */
-#define DW_DLA_ATTR 0x0a /* Dwarf_Attribute */
-#define DW_DLA_TYPE 0x0b /* Dwarf_Type (not used) */
-#define DW_DLA_SUBSCR 0x0c /* Dwarf_Subscr (not used) */
-#define DW_DLA_GLOBAL 0x0d /* Dwarf_Global */
-#define DW_DLA_ERROR 0x0e /* Dwarf_Error */
-#define DW_DLA_LIST 0x0f /* a list */
-#define DW_DLA_LINEBUF 0x10 /* Dwarf_Line* (not used) */
-#define DW_DLA_ARANGE 0x11 /* Dwarf_Arange */
-#define DW_DLA_ABBREV 0x12 /* Dwarf_Abbrev */
-#define DW_DLA_FRAME_OP 0x13 /* Dwarf_Frame_Op */
-#define DW_DLA_CIE 0x14 /* Dwarf_Cie */
-#define DW_DLA_FDE 0x15 /* Dwarf_Fde */
-#define DW_DLA_LOC_BLOCK 0x16 /* Dwarf_Loc Block (not used) */
-#define DW_DLA_FRAME_BLOCK 0x17 /* Dwarf_Frame Block (not used) */
-#define DW_DLA_FUNC 0x18 /* Dwarf_Func */
-#define DW_DLA_TYPENAME 0x19 /* Dwarf_Type */
-#define DW_DLA_VAR 0x1a /* Dwarf_Var */
-#define DW_DLA_WEAK 0x1b /* Dwarf_Weak */
-#define DW_DLA_ADDR 0x1c /* Dwarf_Addr sized entries */
-#define DW_DLA_RANGES 0x1d /* Dwarf_Ranges */
-
-/* The augmenter string for CIE */
-#define DW_CIE_AUGMENTER_STRING_V0 "z"
-
-/* dwarf_init() access arguments
-*/
-#define DW_DLC_READ 0 /* read only access */
-#define DW_DLC_WRITE 1 /* write only access */
-#define DW_DLC_RDWR 2 /* read/write access NOT SUPPORTED*/
-
-/* pro_init() access flag modifiers
- If HAVE_DWARF2_99_EXTENSION is defined at libdwarf build time
- and DW_DLC_OFFSET_SIZE_64 is passed in pro_init() flags then the DWARF3
- 64 bit offset extension is used to generate 64 bit offsets.
-*/
-#define DW_DLC_SIZE_64 0x40000000 /* 32-bit address-size target */
-#define DW_DLC_SIZE_32 0x20000000 /* 64-bit address-size target */
-#define DW_DLC_OFFSET_SIZE_64 0x10000000 /* 64-bit offset-size DWARF */
-
-/* dwarf_pro_init() access flag modifiers
-*/
-#define DW_DLC_ISA_MIPS 0x00000000 /* MIPS target */
-#define DW_DLC_ISA_IA64 0x01000000 /* IA64 target */
-#define DW_DLC_STREAM_RELOCATIONS 0x02000000 /* Old style binary relocs */
-
- /* Usable with assembly output because it is up to the producer to
- deal with locations in whatever manner the producer code wishes.
- Possibly emitting text an assembler will recognize. */
-#define DW_DLC_SYMBOLIC_RELOCATIONS 0x04000000
-
-#define DW_DLC_TARGET_BIGENDIAN 0x08000000 /* Big endian target */
-#define DW_DLC_TARGET_LITTLEENDIAN 0x00100000 /* Little endian target */
-
-#if 0
- /*
- The libdwarf producer interfaces jumble these two semantics together in
- confusing ways. We *should* have flags like these...
- But changing the code means a lot of diffs. So for now,
- we leave things as they are
- */
- #define DW_DLC_SUN_OFFSET32 0x00010000 /* use 32-bit sec offsets */
- #define DW_DLC_SUN_OFFSET64 0x00020000 /* use 64-bit sec offsets */
- #define DW_DLC_SUN_POINTER32 0x00040000 /* use 4 for address_size */
- #define DW_DLC_SUN_POINTER64 0x00080000 /* use 8 for address_size */
-#endif
-
-/* dwarf_pcline() slide arguments
-*/
-#define DW_DLS_BACKWARD -1 /* slide backward to find line */
-#define DW_DLS_NOSLIDE 0 /* match exactly without sliding */
-#define DW_DLS_FORWARD 1 /* slide forward to find line */
-
-/* libdwarf error numbers
-*/
-#define DW_DLE_NE 0 /* no error */
-#define DW_DLE_VMM 1 /* dwarf format/library version mismatch */
-#define DW_DLE_MAP 2 /* memory map failure */
-#define DW_DLE_LEE 3 /* libelf error */
-#define DW_DLE_NDS 4 /* no debug section */
-#define DW_DLE_NLS 5 /* no line section */
-#define DW_DLE_ID 6 /* invalid descriptor for query */
-#define DW_DLE_IOF 7 /* I/O failure */
-#define DW_DLE_MAF 8 /* memory allocation failure */
-#define DW_DLE_IA 9 /* invalid argument */
-#define DW_DLE_MDE 10 /* mangled debugging entry */
-#define DW_DLE_MLE 11 /* mangled line number entry */
-#define DW_DLE_FNO 12 /* file not open */
-#define DW_DLE_FNR 13 /* file not a regular file */
-#define DW_DLE_FWA 14 /* file open with wrong access */
-#define DW_DLE_NOB 15 /* not an object file */
-#define DW_DLE_MOF 16 /* mangled object file header */
-#define DW_DLE_EOLL 17 /* end of location list entries */
-#define DW_DLE_NOLL 18 /* no location list section */
-#define DW_DLE_BADOFF 19 /* Invalid offset */
-#define DW_DLE_EOS 20 /* end of section */
-#define DW_DLE_ATRUNC 21 /* abbreviations section appears truncated*/
-#define DW_DLE_BADBITC 22 /* Address size passed to dwarf bad*/
- /* It is not an allowed size (64 or 32) */
- /* Error codes defined by the current Libdwarf Implementation. */
-#define DW_DLE_DBG_ALLOC 23
-#define DW_DLE_FSTAT_ERROR 24
-#define DW_DLE_FSTAT_MODE_ERROR 25
-#define DW_DLE_INIT_ACCESS_WRONG 26
-#define DW_DLE_ELF_BEGIN_ERROR 27
-#define DW_DLE_ELF_GETEHDR_ERROR 28
-#define DW_DLE_ELF_GETSHDR_ERROR 29
-#define DW_DLE_ELF_STRPTR_ERROR 30
-#define DW_DLE_DEBUG_INFO_DUPLICATE 31
-#define DW_DLE_DEBUG_INFO_NULL 32
-#define DW_DLE_DEBUG_ABBREV_DUPLICATE 33
-#define DW_DLE_DEBUG_ABBREV_NULL 34
-#define DW_DLE_DEBUG_ARANGES_DUPLICATE 35
-#define DW_DLE_DEBUG_ARANGES_NULL 36
-#define DW_DLE_DEBUG_LINE_DUPLICATE 37
-#define DW_DLE_DEBUG_LINE_NULL 38
-#define DW_DLE_DEBUG_LOC_DUPLICATE 39
-#define DW_DLE_DEBUG_LOC_NULL 40
-#define DW_DLE_DEBUG_MACINFO_DUPLICATE 41
-#define DW_DLE_DEBUG_MACINFO_NULL 42
-#define DW_DLE_DEBUG_PUBNAMES_DUPLICATE 43
-#define DW_DLE_DEBUG_PUBNAMES_NULL 44
-#define DW_DLE_DEBUG_STR_DUPLICATE 45
-#define DW_DLE_DEBUG_STR_NULL 46
-#define DW_DLE_CU_LENGTH_ERROR 47
-#define DW_DLE_VERSION_STAMP_ERROR 48
-#define DW_DLE_ABBREV_OFFSET_ERROR 49
-#define DW_DLE_ADDRESS_SIZE_ERROR 50
-#define DW_DLE_DEBUG_INFO_PTR_NULL 51
-#define DW_DLE_DIE_NULL 52
-#define DW_DLE_STRING_OFFSET_BAD 53
-#define DW_DLE_DEBUG_LINE_LENGTH_BAD 54
-#define DW_DLE_LINE_PROLOG_LENGTH_BAD 55
-#define DW_DLE_LINE_NUM_OPERANDS_BAD 56
-#define DW_DLE_LINE_SET_ADDR_ERROR 57 /* No longer used. */
-#define DW_DLE_LINE_EXT_OPCODE_BAD 58
-#define DW_DLE_DWARF_LINE_NULL 59
-#define DW_DLE_INCL_DIR_NUM_BAD 60
-#define DW_DLE_LINE_FILE_NUM_BAD 61
-#define DW_DLE_ALLOC_FAIL 62
-#define DW_DLE_NO_CALLBACK_FUNC 63
-#define DW_DLE_SECT_ALLOC 64
-#define DW_DLE_FILE_ENTRY_ALLOC 65
-#define DW_DLE_LINE_ALLOC 66
-#define DW_DLE_FPGM_ALLOC 67
-#define DW_DLE_INCDIR_ALLOC 68
-#define DW_DLE_STRING_ALLOC 69
-#define DW_DLE_CHUNK_ALLOC 70
-#define DW_DLE_BYTEOFF_ERR 71
-#define DW_DLE_CIE_ALLOC 72
-#define DW_DLE_FDE_ALLOC 73
-#define DW_DLE_REGNO_OVFL 74
-#define DW_DLE_CIE_OFFS_ALLOC 75
-#define DW_DLE_WRONG_ADDRESS 76
-#define DW_DLE_EXTRA_NEIGHBORS 77
-#define DW_DLE_WRONG_TAG 78
-#define DW_DLE_DIE_ALLOC 79
-#define DW_DLE_PARENT_EXISTS 80
-#define DW_DLE_DBG_NULL 81
-#define DW_DLE_DEBUGLINE_ERROR 82
-#define DW_DLE_DEBUGFRAME_ERROR 83
-#define DW_DLE_DEBUGINFO_ERROR 84
-#define DW_DLE_ATTR_ALLOC 85
-#define DW_DLE_ABBREV_ALLOC 86
-#define DW_DLE_OFFSET_UFLW 87
-#define DW_DLE_ELF_SECT_ERR 88
-#define DW_DLE_DEBUG_FRAME_LENGTH_BAD 89
-#define DW_DLE_FRAME_VERSION_BAD 90
-#define DW_DLE_CIE_RET_ADDR_REG_ERROR 91
-#define DW_DLE_FDE_NULL 92
-#define DW_DLE_FDE_DBG_NULL 93
-#define DW_DLE_CIE_NULL 94
-#define DW_DLE_CIE_DBG_NULL 95
-#define DW_DLE_FRAME_TABLE_COL_BAD 96
-#define DW_DLE_PC_NOT_IN_FDE_RANGE 97
-#define DW_DLE_CIE_INSTR_EXEC_ERROR 98
-#define DW_DLE_FRAME_INSTR_EXEC_ERROR 99
-#define DW_DLE_FDE_PTR_NULL 100
-#define DW_DLE_RET_OP_LIST_NULL 101
-#define DW_DLE_LINE_CONTEXT_NULL 102
-#define DW_DLE_DBG_NO_CU_CONTEXT 103
-#define DW_DLE_DIE_NO_CU_CONTEXT 104
-#define DW_DLE_FIRST_DIE_NOT_CU 105
-#define DW_DLE_NEXT_DIE_PTR_NULL 106
-#define DW_DLE_DEBUG_FRAME_DUPLICATE 107
-#define DW_DLE_DEBUG_FRAME_NULL 108
-#define DW_DLE_ABBREV_DECODE_ERROR 109
-#define DW_DLE_DWARF_ABBREV_NULL 110
-#define DW_DLE_ATTR_NULL 111
-#define DW_DLE_DIE_BAD 112
-#define DW_DLE_DIE_ABBREV_BAD 113
-#define DW_DLE_ATTR_FORM_BAD 114
-#define DW_DLE_ATTR_NO_CU_CONTEXT 115
-#define DW_DLE_ATTR_FORM_SIZE_BAD 116
-#define DW_DLE_ATTR_DBG_NULL 117
-#define DW_DLE_BAD_REF_FORM 118
-#define DW_DLE_ATTR_FORM_OFFSET_BAD 119
-#define DW_DLE_LINE_OFFSET_BAD 120
-#define DW_DLE_DEBUG_STR_OFFSET_BAD 121
-#define DW_DLE_STRING_PTR_NULL 122
-#define DW_DLE_PUBNAMES_VERSION_ERROR 123
-#define DW_DLE_PUBNAMES_LENGTH_BAD 124
-#define DW_DLE_GLOBAL_NULL 125
-#define DW_DLE_GLOBAL_CONTEXT_NULL 126
-#define DW_DLE_DIR_INDEX_BAD 127
-#define DW_DLE_LOC_EXPR_BAD 128
-#define DW_DLE_DIE_LOC_EXPR_BAD 129
-#define DW_DLE_ADDR_ALLOC 130
-#define DW_DLE_OFFSET_BAD 131
-#define DW_DLE_MAKE_CU_CONTEXT_FAIL 132
-#define DW_DLE_REL_ALLOC 133
-#define DW_DLE_ARANGE_OFFSET_BAD 134
-#define DW_DLE_SEGMENT_SIZE_BAD 135
-#define DW_DLE_ARANGE_LENGTH_BAD 136
-#define DW_DLE_ARANGE_DECODE_ERROR 137
-#define DW_DLE_ARANGES_NULL 138
-#define DW_DLE_ARANGE_NULL 139
-#define DW_DLE_NO_FILE_NAME 140
-#define DW_DLE_NO_COMP_DIR 141
-#define DW_DLE_CU_ADDRESS_SIZE_BAD 142
-#define DW_DLE_INPUT_ATTR_BAD 143
-#define DW_DLE_EXPR_NULL 144
-#define DW_DLE_BAD_EXPR_OPCODE 145
-#define DW_DLE_EXPR_LENGTH_BAD 146
-#define DW_DLE_MULTIPLE_RELOC_IN_EXPR 147
-#define DW_DLE_ELF_GETIDENT_ERROR 148
-#define DW_DLE_NO_AT_MIPS_FDE 149
-#define DW_DLE_NO_CIE_FOR_FDE 150
-#define DW_DLE_DIE_ABBREV_LIST_NULL 151
-#define DW_DLE_DEBUG_FUNCNAMES_DUPLICATE 152
-#define DW_DLE_DEBUG_FUNCNAMES_NULL 153
-#define DW_DLE_DEBUG_FUNCNAMES_VERSION_ERROR 154
-#define DW_DLE_DEBUG_FUNCNAMES_LENGTH_BAD 155
-#define DW_DLE_FUNC_NULL 156
-#define DW_DLE_FUNC_CONTEXT_NULL 157
-#define DW_DLE_DEBUG_TYPENAMES_DUPLICATE 158
-#define DW_DLE_DEBUG_TYPENAMES_NULL 159
-#define DW_DLE_DEBUG_TYPENAMES_VERSION_ERROR 160
-#define DW_DLE_DEBUG_TYPENAMES_LENGTH_BAD 161
-#define DW_DLE_TYPE_NULL 162
-#define DW_DLE_TYPE_CONTEXT_NULL 163
-#define DW_DLE_DEBUG_VARNAMES_DUPLICATE 164
-#define DW_DLE_DEBUG_VARNAMES_NULL 165
-#define DW_DLE_DEBUG_VARNAMES_VERSION_ERROR 166
-#define DW_DLE_DEBUG_VARNAMES_LENGTH_BAD 167
-#define DW_DLE_VAR_NULL 168
-#define DW_DLE_VAR_CONTEXT_NULL 169
-#define DW_DLE_DEBUG_WEAKNAMES_DUPLICATE 170
-#define DW_DLE_DEBUG_WEAKNAMES_NULL 171
-#define DW_DLE_DEBUG_WEAKNAMES_VERSION_ERROR 172
-#define DW_DLE_DEBUG_WEAKNAMES_LENGTH_BAD 173
-#define DW_DLE_WEAK_NULL 174
-#define DW_DLE_WEAK_CONTEXT_NULL 175
-#define DW_DLE_LOCDESC_COUNT_WRONG 176
-#define DW_DLE_MACINFO_STRING_NULL 177
-#define DW_DLE_MACINFO_STRING_EMPTY 178
-#define DW_DLE_MACINFO_INTERNAL_ERROR_SPACE 179
-#define DW_DLE_MACINFO_MALLOC_FAIL 180
-#define DW_DLE_DEBUGMACINFO_ERROR 181
-#define DW_DLE_DEBUG_MACRO_LENGTH_BAD 182
-#define DW_DLE_DEBUG_MACRO_MAX_BAD 183
-#define DW_DLE_DEBUG_MACRO_INTERNAL_ERR 184
-#define DW_DLE_DEBUG_MACRO_MALLOC_SPACE 185
-#define DW_DLE_DEBUG_MACRO_INCONSISTENT 186
-#define DW_DLE_DF_NO_CIE_AUGMENTATION 187
-#define DW_DLE_DF_REG_NUM_TOO_HIGH 188
-#define DW_DLE_DF_MAKE_INSTR_NO_INIT 189
-#define DW_DLE_DF_NEW_LOC_LESS_OLD_LOC 190
-#define DW_DLE_DF_POP_EMPTY_STACK 191
-#define DW_DLE_DF_ALLOC_FAIL 192
-#define DW_DLE_DF_FRAME_DECODING_ERROR 193
-#define DW_DLE_DEBUG_LOC_SECTION_SHORT 194
-#define DW_DLE_FRAME_AUGMENTATION_UNKNOWN 195
-#define DW_DLE_PUBTYPE_CONTEXT 196 /* Unused. */
-#define DW_DLE_DEBUG_PUBTYPES_LENGTH_BAD 197
-#define DW_DLE_DEBUG_PUBTYPES_VERSION_ERROR 198
-#define DW_DLE_DEBUG_PUBTYPES_DUPLICATE 199
-#define DW_DLE_FRAME_CIE_DECODE_ERROR 200
-#define DW_DLE_FRAME_REGISTER_UNREPRESENTABLE 201
-#define DW_DLE_FRAME_REGISTER_COUNT_MISMATCH 202
-#define DW_DLE_LINK_LOOP 203
-#define DW_DLE_STRP_OFFSET_BAD 204
-#define DW_DLE_DEBUG_RANGES_DUPLICATE 205
-#define DW_DLE_DEBUG_RANGES_OFFSET_BAD 206
-#define DW_DLE_DEBUG_RANGES_MISSING_END 207
-#define DW_DLE_DEBUG_RANGES_OUT_OF_MEM 208
-#define DW_DLE_DEBUG_SYMTAB_ERR 209
-#define DW_DLE_DEBUG_STRTAB_ERR 210
-#define DW_DLE_RELOC_MISMATCH_INDEX 211
-#define DW_DLE_RELOC_MISMATCH_RELOC_INDEX 212
-#define DW_DLE_RELOC_MISMATCH_STRTAB_INDEX 213
-#define DW_DLE_RELOC_SECTION_MISMATCH 214
-#define DW_DLE_RELOC_SECTION_MISSING_INDEX 215
-#define DW_DLE_RELOC_SECTION_LENGTH_ODD 216
-#define DW_DLE_RELOC_SECTION_PTR_NULL 217
-#define DW_DLE_RELOC_SECTION_MALLOC_FAIL 218
-#define DW_DLE_NO_ELF64_SUPPORT 219
-#define DW_DLE_MISSING_ELF64_SUPPORT 220
-#define DW_DLE_ORPHAN_FDE 221
-#define DW_DLE_DUPLICATE_INST_BLOCK 222
-#define DW_DLE_BAD_REF_SIG8_FORM 223
-#define DW_DLE_ATTR_EXPRLOC_FORM_BAD 224
-#define DW_DLE_FORM_SEC_OFFSET_LENGTH_BAD 225
-#define DW_DLE_NOT_REF_FORM 226
-#define DW_DLE_DEBUG_FRAME_LENGTH_NOT_MULTIPLE 227
-
-
-
- /* DW_DLE_LAST MUST EQUAL LAST ERROR NUMBER */
-#define DW_DLE_LAST 227
-#define DW_DLE_LO_USER 0x10000
-
- /* Taken as meaning 'undefined value', this is not
- a column or register number.
- Only present at libdwarf runtime. Never on disk.
- DW_FRAME_* Values present on disk are in dwarf.h
- */
-#define DW_FRAME_UNDEFINED_VAL 1034
-
- /* Taken as meaning 'same value' as caller had, not a column
- or register number
- Only present at libdwarf runtime. Never on disk.
- DW_FRAME_* Values present on disk are in dwarf.h
- */
-#define DW_FRAME_SAME_VAL 1035
-
-
-
-/* error return values
-*/
-#define DW_DLV_BADADDR (~(Dwarf_Addr)0)
- /* for functions returning target address */
-
-#define DW_DLV_NOCOUNT ((Dwarf_Signed)-1)
- /* for functions returning count */
-
-#define DW_DLV_BADOFFSET (~(Dwarf_Off)0)
- /* for functions returning offset */
-
-/* standard return values for functions */
-#define DW_DLV_NO_ENTRY -1
-#define DW_DLV_OK 0
-#define DW_DLV_ERROR 1
-
-/* Special values for offset_into_exception_table field of dwarf fde's. */
-/* The following value indicates that there is no Exception table offset
- associated with a dwarf frame. */
-#define DW_DLX_NO_EH_OFFSET (-1LL)
-/* The following value indicates that the producer was unable to analyse the
- source file to generate Exception tables for this function. */
-#define DW_DLX_EH_OFFSET_UNAVAILABLE (-2LL)
-
-
-/*===========================================================================*/
-/* Dwarf consumer interface initialization and termination operations */
-
-/* Initialization based on Unix open fd (using libelf internally). */
-int dwarf_init(int /*fd*/,
- Dwarf_Unsigned /*access*/,
- Dwarf_Handler /*errhand*/,
- Dwarf_Ptr /*errarg*/,
- Dwarf_Debug* /*dbg*/,
- Dwarf_Error* /*error*/);
-
-/* Initialization based on libelf/sgi-fastlibelf open pointer. */
-int dwarf_elf_init(dwarf_elf_handle /*elf*/,
- Dwarf_Unsigned /*access*/,
- Dwarf_Handler /*errhand*/,
- Dwarf_Ptr /*errarg*/,
- Dwarf_Debug* /*dbg*/,
- Dwarf_Error* /*error*/);
-
-/* Undocumented function for memory allocator. */
-void dwarf_print_memory_stats(Dwarf_Debug /*dbg*/);
-
-int dwarf_get_elf(Dwarf_Debug /*dbg*/,
- dwarf_elf_handle* /*return_elfptr*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_finish(Dwarf_Debug /*dbg*/, Dwarf_Error* /*error*/);
-
-
-int dwarf_object_init(Dwarf_Obj_Access_Interface* /* obj */,
- Dwarf_Handler /* errhand */,
- Dwarf_Ptr /* errarg */,
- Dwarf_Debug* /* dbg */,
- Dwarf_Error* /* error */);
-
-int dwarf_object_finish(Dwarf_Debug /* dbg */,
- Dwarf_Error* /* error */);
-
-/* die traversal operations */
-int dwarf_next_cu_header_b(Dwarf_Debug /*dbg*/,
- Dwarf_Unsigned* /*cu_header_length*/,
- Dwarf_Half* /*version_stamp*/,
- Dwarf_Off* /*abbrev_offset*/,
- Dwarf_Half* /*address_size*/,
- Dwarf_Half* /*length_size*/,
- Dwarf_Half* /*extension_size*/,
- Dwarf_Unsigned* /*next_cu_header_offset*/,
- Dwarf_Error* /*error*/);
-/* The following is now obsolete, though supported. November 2009. */
-int dwarf_next_cu_header(Dwarf_Debug /*dbg*/,
- Dwarf_Unsigned* /*cu_header_length*/,
- Dwarf_Half* /*version_stamp*/,
- Dwarf_Off* /*abbrev_offset*/,
- Dwarf_Half* /*address_size*/,
- Dwarf_Unsigned* /*next_cu_header_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_siblingof(Dwarf_Debug /*dbg*/,
- Dwarf_Die /*die*/,
- Dwarf_Die* /*return_siblingdie*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_child(Dwarf_Die /*die*/,
- Dwarf_Die* /*return_childdie*/,
- Dwarf_Error* /*error*/);
-
-/* Finding die given global (not CU-relative) offset */
-int dwarf_offdie(Dwarf_Debug /*dbg*/,
- Dwarf_Off /*offset*/,
- Dwarf_Die* /*return_die*/,
- Dwarf_Error* /*error*/);
-
-/* Higher level functions (Unimplemented) */
-int dwarf_pcfile(Dwarf_Debug /*dbg*/,
- Dwarf_Addr /*pc*/,
- Dwarf_Die* /*return_die*/,
- Dwarf_Error* /*error*/);
-
-/* Unimplemented */
-int dwarf_pcsubr(Dwarf_Debug /*dbg*/,
- Dwarf_Addr /*pc*/,
- Dwarf_Die* /*return_die*/,
- Dwarf_Error* /*error*/);
-
-/* Unimplemented */
-int dwarf_pcscope(Dwarf_Debug /*dbg*/,
- Dwarf_Addr /*pc*/,
- Dwarf_Die* /*return_die*/,
- Dwarf_Error* /*error*/);
-
-/* operations on DIEs */
-int dwarf_tag(Dwarf_Die /*die*/,
- Dwarf_Half* /*return_tag*/,
- Dwarf_Error* /*error*/);
-
-/* utility? */
-/* dwarf_dieoffset returns the global debug_info
- section offset, not the CU relative offset. */
-int dwarf_dieoffset(Dwarf_Die /*die*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-/* dwarf_CU_dieoffset_given_die returns
- the global debug_info section offset of the CU die
- that is the CU containing the given_die
- (the passed in DIE can be any DIE).
- This information makes it possible for a consumer to
- find and print CU context information for any die.
- See also dwarf_get_cu_die_offset_given_cu_header_offset(). */
-int dwarf_CU_dieoffset_given_die(Dwarf_Die /*given_die*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-/* dwarf_die_CU_offset returns the CU relative offset
- not the global debug_info section offset, given
- any DIE in the CU. See also dwarf_CU_dieoffset_given_die().
- */
-int dwarf_die_CU_offset(Dwarf_Die /*die*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_die_CU_offset_range(Dwarf_Die /*die*/,
- Dwarf_Off* /*return_CU_header_offset*/,
- Dwarf_Off* /*return_CU_length_bytes*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_attr (Dwarf_Die /*die*/,
- Dwarf_Half /*attr*/,
- Dwarf_Attribute * /*returned_attr*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_diename(Dwarf_Die /*die*/,
- char ** /*diename*/,
- Dwarf_Error* /*error*/);
-
-/* Returns the abbrev code of the die. Cannot fail. */
-int dwarf_die_abbrev_code(Dwarf_Die /*die */);
-
-
-/* convenience functions, alternative to using dwarf_attrlist() */
-int dwarf_hasattr(Dwarf_Die /*die*/,
- Dwarf_Half /*attr*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-/* dwarf_loclist_n preferred over dwarf_loclist */
-int dwarf_loclist_n(Dwarf_Attribute /*attr*/,
- Dwarf_Locdesc*** /*llbuf*/,
- Dwarf_Signed * /*locCount*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_loclist(Dwarf_Attribute /*attr*/, /* inflexible! */
- Dwarf_Locdesc** /*llbuf*/,
- Dwarf_Signed * /*locCount*/,
- Dwarf_Error* /*error*/);
-
-/* Extracts a dwarf expression from an expression byte stream.
- Useful to get expressions from DW_CFA_def_cfa_expression
- DW_CFA_expression DW_CFA_val_expression expression bytes.
- 27 April 2009: dwarf_loclist_from_expr() interface with
- no addr_size is obsolete but supported,
- use dwarf_loclist_from_expr_a() instead.
-*/
-int dwarf_loclist_from_expr(Dwarf_Debug dbg,
- Dwarf_Ptr expression_in,
- Dwarf_Unsigned expression_length,
- Dwarf_Locdesc ** llbuf,
- Dwarf_Signed * listlen, Dwarf_Error * error);
-
-/* dwarf_loclist_from_expr_a() new 27 Apr 2009: added addr_size argument. */
-int dwarf_loclist_from_expr_a(Dwarf_Debug dbg,
- Dwarf_Ptr expression_in,
- Dwarf_Unsigned expression_length,
- Dwarf_Half addr_size,
- Dwarf_Locdesc ** llbuf,
- Dwarf_Signed * listlen, Dwarf_Error * error);
-
-/* Unimplemented */
-int dwarf_stringlen(Dwarf_Die /*die*/,
- Dwarf_Locdesc ** /*returned_locdesc*/,
- Dwarf_Error* /*error*/);
-
-/* Unimplemented */
-int dwarf_subscrcnt(Dwarf_Die /*die*/,
- Dwarf_Signed * /*returned_count*/,
- Dwarf_Error* /*error*/);
-
-/* Unimplemented */
-int dwarf_nthsubscr(Dwarf_Die /*die*/,
- Dwarf_Unsigned /*ssndx*/,
- Dwarf_Die * /*returned_die*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_lowpc(Dwarf_Die /*die*/,
- Dwarf_Addr * /*returned_addr*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_highpc(Dwarf_Die /*die*/,
- Dwarf_Addr * /*returned_addr*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_bytesize(Dwarf_Die /*die*/,
- Dwarf_Unsigned * /*returned_size*/,
- Dwarf_Error* /*error*/);
-
-/* Unimplemented */
-int dwarf_isbitfield(Dwarf_Die /*die*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_bitsize(Dwarf_Die /*die*/,
- Dwarf_Unsigned * /*returned_size*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_bitoffset(Dwarf_Die /*die*/,
- Dwarf_Unsigned * /*returned_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_srclang(Dwarf_Die /*die*/,
- Dwarf_Unsigned * /*returned_lang*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_arrayorder(Dwarf_Die /*die*/,
- Dwarf_Unsigned * /*returned_order*/,
- Dwarf_Error* /*error*/);
-
-/* end of convenience function list */
-
-/* this is the main interface to attributes of a DIE */
-int dwarf_attrlist(Dwarf_Die /*die*/,
- Dwarf_Attribute** /*attrbuf*/,
- Dwarf_Signed * /*attrcount*/,
- Dwarf_Error* /*error*/);
-
-/* query operations for attributes */
-int dwarf_hasform(Dwarf_Attribute /*attr*/,
- Dwarf_Half /*form*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_whatform(Dwarf_Attribute /*attr*/,
- Dwarf_Half * /*returned_form*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_whatform_direct(Dwarf_Attribute /*attr*/,
- Dwarf_Half * /*returned_form*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_whatattr(Dwarf_Attribute /*attr*/,
- Dwarf_Half * /*returned_attr_num*/,
- Dwarf_Error* /*error*/);
-
-/*
- The following are concerned with the Primary Interface: getting
- the actual data values. One function per 'kind' of FORM.
-*/
-/* dwarf_formref returns, thru return_offset, a CU-relative offset
- and does not allow DW_FORM_ref_addr*/
-int dwarf_formref(Dwarf_Attribute /*attr*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-/* dwarf_global_formref returns, thru return_offset,
- a debug_info-relative offset and does allow all reference forms*/
-int dwarf_global_formref(Dwarf_Attribute /*attr*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-/* dwarf_formsig8 returns in the caller-provided 8 byte area
- the 8 bytes of a DW_FORM_ref_sig8. Not a string. */
-int dwarf_formsig8(Dwarf_Attribute /*attr*/,
- Dwarf_Sig8 * /*returned sig bytes*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formaddr(Dwarf_Attribute /*attr*/,
- Dwarf_Addr * /*returned_addr*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formflag(Dwarf_Attribute /*attr*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formudata(Dwarf_Attribute /*attr*/,
- Dwarf_Unsigned * /*returned_val*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formsdata(Dwarf_Attribute /*attr*/,
- Dwarf_Signed * /*returned_val*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formblock(Dwarf_Attribute /*attr*/,
- Dwarf_Block ** /*returned_block*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formstring(Dwarf_Attribute /*attr*/,
- char ** /*returned_string*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_formexprloc(Dwarf_Attribute /*attr*/,
- Dwarf_Unsigned * /*return_exprlen*/,
- Dwarf_Ptr * /*block_ptr*/,
- Dwarf_Error * /*error*/);
-
-
-/* end attribute query operations. */
-
-/* line number operations */
-/* dwarf_srclines is the normal interface */
-int dwarf_srclines(Dwarf_Die /*die*/,
- Dwarf_Line** /*linebuf*/,
- Dwarf_Signed * /*linecount*/,
- Dwarf_Error* /*error*/);
-
-/* dwarf_srclines_dealloc, created July 2005, is the new
- method for deallocating what dwarf_srclines returns.
- More complete free than using dwarf_dealloc directly. */
-void dwarf_srclines_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Line* /*linebuf*/,
- Dwarf_Signed /*count */);
-
-
-int dwarf_srcfiles(Dwarf_Die /*die*/,
- char*** /*srcfiles*/,
- Dwarf_Signed * /*filecount*/,
- Dwarf_Error* /*error*/);
-
-/* Unimplemented. */
-int dwarf_dieline(Dwarf_Die /*die*/,
- Dwarf_Line * /*returned_line*/,
- Dwarf_Error * /*error*/);
-
-int dwarf_linebeginstatement(Dwarf_Line /*line*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_lineendsequence(Dwarf_Line /*line*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_lineno(Dwarf_Line /*line*/,
- Dwarf_Unsigned * /*returned_lineno*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_line_srcfileno(Dwarf_Line /*line*/,
- Dwarf_Unsigned * /*ret_fileno*/,
- Dwarf_Error * /*error*/);
-
-int dwarf_lineaddr(Dwarf_Line /*line*/,
- Dwarf_Addr * /*returned_addr*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_lineoff(Dwarf_Line /*line*/,
- Dwarf_Signed * /*returned_lineoffset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_linesrc(Dwarf_Line /*line*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_lineblock(Dwarf_Line /*line*/,
- Dwarf_Bool * /*returned_bool*/,
- Dwarf_Error* /*error*/);
-
-/* tertiary interface to line info */
-/* Unimplemented */
-int dwarf_pclines(Dwarf_Debug /*dbg*/,
- Dwarf_Addr /*pc*/,
- Dwarf_Line** /*linebuf*/,
- Dwarf_Signed * /*linecount*/,
- Dwarf_Signed /*slide*/,
- Dwarf_Error* /*error*/);
-/* end line number operations */
-
-/* global name space operations (.debug_pubnames access) */
-int dwarf_get_globals(Dwarf_Debug /*dbg*/,
- Dwarf_Global** /*globals*/,
- Dwarf_Signed * /*number_of_globals*/,
- Dwarf_Error* /*error*/);
-void dwarf_globals_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Global* /*globals*/,
- Dwarf_Signed /*number_of_globals*/);
-
-int dwarf_globname(Dwarf_Global /*glob*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_global_die_offset(Dwarf_Global /*global*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error * /*error*/);
-
-/* This returns the CU die global offset if one knows the
- CU header global offset.
- See also dwarf_CU_dieoffset_given_die(). */
-int dwarf_get_cu_die_offset_given_cu_header_offset(
- Dwarf_Debug /*dbg*/,
- Dwarf_Off /*in_cu_header_offset*/,
- Dwarf_Off * /*out_cu_die_offset*/,
- Dwarf_Error * /*err*/);
-#ifdef __sgi /* pragma is sgi MIPS only */
-#pragma optional dwarf_get_cu_die_offset_given_cu_header_offset
-#endif
-
-int dwarf_global_cu_offset(Dwarf_Global /*global*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_global_name_offsets(Dwarf_Global /*global*/,
- char ** /*returned_name*/,
- Dwarf_Off* /*die_offset*/,
- Dwarf_Off* /*cu_offset*/,
- Dwarf_Error* /*error*/);
-
-/* Static function name operations. */
-int dwarf_get_funcs(Dwarf_Debug /*dbg*/,
- Dwarf_Func** /*funcs*/,
- Dwarf_Signed * /*number_of_funcs*/,
- Dwarf_Error* /*error*/);
-void dwarf_funcs_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Func* /*funcs*/,
- Dwarf_Signed /*number_of_funcs*/);
-
-int dwarf_funcname(Dwarf_Func /*func*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_func_die_offset(Dwarf_Func /*func*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_func_cu_offset(Dwarf_Func /*func*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_func_name_offsets(Dwarf_Func /*func*/,
- char ** /*returned_name*/,
- Dwarf_Off* /*die_offset*/,
- Dwarf_Off* /*cu_offset*/,
- Dwarf_Error* /*error*/);
-
-/* User-defined type name operations, SGI IRIX .debug_typenames section.
- Same content as DWARF3 .debug_pubtypes, but defined years before
- .debug_pubtypes was defined. SGI IRIX only. */
-int dwarf_get_types(Dwarf_Debug /*dbg*/,
- Dwarf_Type** /*types*/,
- Dwarf_Signed * /*number_of_types*/,
- Dwarf_Error* /*error*/);
-void dwarf_types_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Type* /*types*/,
- Dwarf_Signed /*number_of_types*/);
-
-
-int dwarf_typename(Dwarf_Type /*type*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_type_die_offset(Dwarf_Type /*type*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_type_cu_offset(Dwarf_Type /*type*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_type_name_offsets(Dwarf_Type /*type*/,
- char ** /*returned_name*/,
- Dwarf_Off* /*die_offset*/,
- Dwarf_Off* /*cu_offset*/,
- Dwarf_Error* /*error*/);
-
-/* User-defined type name operations, DWARF3 .debug_pubtypes section.
-*/
-int dwarf_get_pubtypes(Dwarf_Debug /*dbg*/,
- Dwarf_Type** /*types*/,
- Dwarf_Signed * /*number_of_types*/,
- Dwarf_Error* /*error*/);
-void dwarf_pubtypes_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Type* /*pubtypes*/,
- Dwarf_Signed /*number_of_pubtypes*/);
-
-
-int dwarf_pubtypename(Dwarf_Type /*type*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_pubtype_die_offset(Dwarf_Type /*type*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_pubtype_cu_offset(Dwarf_Type /*type*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_pubtype_name_offsets(Dwarf_Type /*type*/,
- char ** /*returned_name*/,
- Dwarf_Off* /*die_offset*/,
- Dwarf_Off* /*cu_offset*/,
- Dwarf_Error* /*error*/);
-
-/* File-scope static variable name operations. */
-int dwarf_get_vars(Dwarf_Debug /*dbg*/,
- Dwarf_Var** /*vars*/,
- Dwarf_Signed * /*number_of_vars*/,
- Dwarf_Error* /*error*/);
-void dwarf_vars_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Var* /*vars*/,
- Dwarf_Signed /*number_of_vars*/);
-
-
-int dwarf_varname(Dwarf_Var /*var*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_var_die_offset(Dwarf_Var /*var*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_var_cu_offset(Dwarf_Var /*var*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_var_name_offsets(Dwarf_Var /*var*/,
- char ** /*returned_name*/,
- Dwarf_Off* /*die_offset*/,
- Dwarf_Off* /*cu_offset*/,
- Dwarf_Error* /*error*/);
-
-/* weak name operations. */
-int dwarf_get_weaks(Dwarf_Debug /*dbg*/,
- Dwarf_Weak** /*weaks*/,
- Dwarf_Signed * /*number_of_weaks*/,
- Dwarf_Error* /*error*/);
-void dwarf_weaks_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Weak* /*weaks*/,
- Dwarf_Signed /*number_of_weaks*/);
-
-
-int dwarf_weakname(Dwarf_Weak /*weak*/,
- char ** /*returned_name*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_weak_die_offset(Dwarf_Weak /*weak*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_weak_cu_offset(Dwarf_Weak /*weak*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_weak_name_offsets(Dwarf_Weak /*weak*/,
- char ** /*returned_name*/,
- Dwarf_Off* /*die_offset*/,
- Dwarf_Off* /*cu_offset*/,
- Dwarf_Error* /*error*/);
-
-/* location list section operation. (.debug_loc access) */
-int dwarf_get_loclist_entry(Dwarf_Debug /*dbg*/,
- Dwarf_Unsigned /*offset*/,
- Dwarf_Addr* /*hipc*/,
- Dwarf_Addr* /*lopc*/,
- Dwarf_Ptr* /*data*/,
- Dwarf_Unsigned* /*entry_len*/,
- Dwarf_Unsigned* /*next_entry*/,
- Dwarf_Error* /*error*/);
-
-/* abbreviation section operations */
-int dwarf_get_abbrev(Dwarf_Debug /*dbg*/,
- Dwarf_Unsigned /*offset*/,
- Dwarf_Abbrev * /*returned_abbrev*/,
- Dwarf_Unsigned* /*length*/,
- Dwarf_Unsigned* /*attr_count*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_abbrev_tag(Dwarf_Abbrev /*abbrev*/,
- Dwarf_Half* /*return_tag_number*/,
- Dwarf_Error* /*error*/);
-int dwarf_get_abbrev_code(Dwarf_Abbrev /*abbrev*/,
- Dwarf_Unsigned* /*return_code_number*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_abbrev_children_flag(Dwarf_Abbrev /*abbrev*/,
- Dwarf_Signed* /*return_flag*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_abbrev_entry(Dwarf_Abbrev /*abbrev*/,
- Dwarf_Signed /*index*/,
- Dwarf_Half * /*returned_attr_num*/,
- Dwarf_Signed* /*form*/,
- Dwarf_Off* /*offset*/,
- Dwarf_Error* /*error*/);
-
-/* consumer string section operation */
-int dwarf_get_str(Dwarf_Debug /*dbg*/,
- Dwarf_Off /*offset*/,
- char** /*string*/,
- Dwarf_Signed * /*strlen_of_string*/,
- Dwarf_Error* /*error*/);
-
-/* Consumer op on gnu .eh_frame info */
-int dwarf_get_fde_list_eh(
- Dwarf_Debug /*dbg*/,
- Dwarf_Cie** /*cie_data*/,
- Dwarf_Signed* /*cie_element_count*/,
- Dwarf_Fde** /*fde_data*/,
- Dwarf_Signed* /*fde_element_count*/,
- Dwarf_Error* /*error*/);
-
-
-/* consumer operations on frame info: .debug_frame */
-int dwarf_get_fde_list(Dwarf_Debug /*dbg*/,
- Dwarf_Cie** /*cie_data*/,
- Dwarf_Signed* /*cie_element_count*/,
- Dwarf_Fde** /*fde_data*/,
- Dwarf_Signed* /*fde_element_count*/,
- Dwarf_Error* /*error*/);
-
-/* Release storage gotten by dwarf_get_fde_list_eh() or
- dwarf_get_fde_list() */
-void dwarf_fde_cie_list_dealloc(Dwarf_Debug dbg,
- Dwarf_Cie *cie_data,
- Dwarf_Signed cie_element_count,
- Dwarf_Fde *fde_data,
- Dwarf_Signed fde_element_count);
-
-
-
-int dwarf_get_fde_range(Dwarf_Fde /*fde*/,
- Dwarf_Addr* /*low_pc*/,
- Dwarf_Unsigned* /*func_length*/,
- Dwarf_Ptr* /*fde_bytes*/,
- Dwarf_Unsigned* /*fde_byte_length*/,
- Dwarf_Off* /*cie_offset*/,
- Dwarf_Signed* /*cie_index*/,
- Dwarf_Off* /*fde_offset*/,
- Dwarf_Error* /*error*/);
-
-/* Useful for IRIX only: see dwarf_get_cie_augmentation_data()
- dwarf_get_fde_augmentation_data() for GNU .eh_frame. */
-int dwarf_get_fde_exception_info(Dwarf_Fde /*fde*/,
- Dwarf_Signed* /* offset_into_exception_tables */,
- Dwarf_Error* /*error*/);
-
-
-int dwarf_get_cie_of_fde(Dwarf_Fde /*fde*/,
- Dwarf_Cie * /*cie_returned*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_cie_info(Dwarf_Cie /*cie*/,
- Dwarf_Unsigned * /*bytes_in_cie*/,
- Dwarf_Small* /*version*/,
- char ** /*augmenter*/,
- Dwarf_Unsigned* /*code_alignment_factor*/,
- Dwarf_Signed* /*data_alignment_factor*/,
- Dwarf_Half* /*return_address_register_rule*/,
- Dwarf_Ptr* /*initial_instructions*/,
- Dwarf_Unsigned* /*initial_instructions_length*/,
- Dwarf_Error* /*error*/);
-
-/* dwarf_get_cie_index new September 2009. */
-int dwarf_get_cie_index(
- Dwarf_Cie /*cie*/,
- Dwarf_Signed* /*index*/,
- Dwarf_Error* /*error*/ );
-
-
-int dwarf_get_fde_instr_bytes(Dwarf_Fde /*fde*/,
- Dwarf_Ptr * /*outinstrs*/, Dwarf_Unsigned * /*outlen*/,
- Dwarf_Error * /*error*/);
-
-int dwarf_get_fde_info_for_all_regs(Dwarf_Fde /*fde*/,
- Dwarf_Addr /*pc_requested*/,
- Dwarf_Regtable* /*reg_table*/,
- Dwarf_Addr* /*row_pc*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_fde_info_for_all_regs3(Dwarf_Fde /*fde*/,
- Dwarf_Addr /*pc_requested*/,
- Dwarf_Regtable3* /*reg_table*/,
- Dwarf_Addr* /*row_pc*/,
- Dwarf_Error* /*error*/);
-
-/* In this older interface DW_FRAME_CFA_COL is a meaningful
- column (which does not work well with DWARF3 or
- non-MIPS architectures). */
-int dwarf_get_fde_info_for_reg(Dwarf_Fde /*fde*/,
- Dwarf_Half /*table_column*/,
- Dwarf_Addr /*pc_requested*/,
- Dwarf_Signed* /*offset_relevant*/,
- Dwarf_Signed* /*register*/,
- Dwarf_Signed* /*offset*/,
- Dwarf_Addr* /*row_pc*/,
- Dwarf_Error* /*error*/);
-
-/* See discussion of dw_value_type, libdwarf.h.
- Use of DW_FRAME_CFA_COL is not meaningful in this interface.
- See dwarf_get_fde_info_for_cfa_reg3().
-*/
-/* dwarf_get_fde_info_for_reg3 is useful on a single column, but
- it is inefficient to iterate across all table_columns using this
- function. Instead call dwarf_get_fde_info_for_all_regs3() and index
- into the table it fills in. */
-int dwarf_get_fde_info_for_reg3(Dwarf_Fde /*fde*/,
- Dwarf_Half /*table_column*/,
- Dwarf_Addr /*pc_requested*/,
- Dwarf_Small * /*value_type*/,
- Dwarf_Signed * /*offset_relevant*/,
- Dwarf_Signed* /*register*/,
- Dwarf_Signed* /*offset_or_block_len*/,
- Dwarf_Ptr * /*block_ptr */,
- Dwarf_Addr* /*row_pc_out*/,
- Dwarf_Error* /*error*/);
-
-/* Use this to get the cfa. */
-int dwarf_get_fde_info_for_cfa_reg3(Dwarf_Fde /*fde*/,
- Dwarf_Addr /*pc_requested*/,
- Dwarf_Small * /*value_type*/,
- Dwarf_Signed * /*offset_relevant*/,
- Dwarf_Signed* /*register*/,
- Dwarf_Signed* /*offset_or_block_len*/,
- Dwarf_Ptr * /*block_ptr */,
- Dwarf_Addr* /*row_pc_out*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_fde_for_die(Dwarf_Debug /*dbg*/,
- Dwarf_Die /*subr_die */,
- Dwarf_Fde * /*returned_fde*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_fde_n(Dwarf_Fde* /*fde_data*/,
- Dwarf_Unsigned /*fde_index*/,
- Dwarf_Fde * /*returned_fde*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_fde_at_pc(Dwarf_Fde* /*fde_data*/,
- Dwarf_Addr /*pc_of_interest*/,
- Dwarf_Fde * /*returned_fde*/,
- Dwarf_Addr* /*lopc*/,
- Dwarf_Addr* /*hipc*/,
- Dwarf_Error* /*error*/);
-
-/* GNU .eh_frame augmentation information, raw form, see
- Linux Standard Base Core Specification version 3.0 . */
-int dwarf_get_cie_augmentation_data(Dwarf_Cie /* cie*/,
- Dwarf_Small ** /* augdata */,
- Dwarf_Unsigned * /* augdata_len */,
- Dwarf_Error* /*error*/);
-/* GNU .eh_frame augmentation information, raw form, see
- Linux Standard Base Core Specification version 3.0 . */
-int dwarf_get_fde_augmentation_data(Dwarf_Fde /* fde*/,
- Dwarf_Small ** /* augdata */,
- Dwarf_Unsigned * /* augdata_len */,
- Dwarf_Error* /*error*/);
-
-int dwarf_expand_frame_instructions(Dwarf_Cie /*cie*/,
- Dwarf_Ptr /*instruction*/,
- Dwarf_Unsigned /*i_length*/,
- Dwarf_Frame_Op** /*returned_op_list*/,
- Dwarf_Signed* /*op_count*/,
- Dwarf_Error* /*error*/);
-
-/* Operations on .debug_aranges. */
-int dwarf_get_aranges(Dwarf_Debug /*dbg*/,
- Dwarf_Arange** /*aranges*/,
- Dwarf_Signed * /*arange_count*/,
- Dwarf_Error* /*error*/);
-
-
-
-int dwarf_get_arange(
- Dwarf_Arange* /*aranges*/,
- Dwarf_Unsigned /*arange_count*/,
- Dwarf_Addr /*address*/,
- Dwarf_Arange * /*returned_arange*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_cu_die_offset(
- Dwarf_Arange /*arange*/,
- Dwarf_Off* /*return_offset*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_arange_cu_header_offset(
- Dwarf_Arange /*arange*/,
- Dwarf_Off* /*return_cu_header_offset*/,
- Dwarf_Error* /*error*/);
-#ifdef __sgi /* pragma is sgi MIPS only */
-#pragma optional dwarf_get_arange_cu_header_offset
-#endif
-
-/* DWARF2,3 interface. No longer really adequate (it was never
- right for segmented address spaces, please switch
- to using dwarf_get_arange_info_b instead.
- There is no effective difference between these
- functions if the address space
- of the target is not segmented. */
-int dwarf_get_arange_info(
- Dwarf_Arange /*arange*/,
- Dwarf_Addr* /*start*/,
- Dwarf_Unsigned* /*length*/,
- Dwarf_Off* /*cu_die_offset*/,
- Dwarf_Error* /*error*/ );
-
-/* New for DWARF4, entries may have segment information.
- *segment is only meaningful if *segment_entry_size is non-zero. */
-int dwarf_get_arange_info_b(
- Dwarf_Arange /*arange*/,
- Dwarf_Unsigned* /*segment*/,
- Dwarf_Unsigned* /*segment_entry_size*/,
- Dwarf_Addr * /*start*/,
- Dwarf_Unsigned* /*length*/,
- Dwarf_Off * /*cu_die_offset*/,
- Dwarf_Error * /*error*/ );
-
-
-/* consumer .debug_macinfo information interface.
-*/
-struct Dwarf_Macro_Details_s {
- Dwarf_Off dmd_offset; /* offset, in the section,
- of this macro info */
- Dwarf_Small dmd_type; /* the type, DW_MACINFO_define etc*/
- Dwarf_Signed dmd_lineno; /* the source line number where
- applicable and vend_def # if
- vendor_extension op
- */
-
- Dwarf_Signed dmd_fileindex;/* the source file index:
- applies to define undef start_file
- */
- char * dmd_macro; /* macro name (with value for defineop)
- string from vendor ext
- */
-};
-
-/* dwarf_print_lines is for use by dwarfdump: it prints
- line info to stdout.
- The _dwarf name is obsolete. Use dwarf_ instead.
- Added extra argnument 2/2009 for better checking.
-*/
-int _dwarf_print_lines(Dwarf_Die /*cu_die*/,Dwarf_Error * /*error*/);
-int dwarf_print_lines(Dwarf_Die /*cu_die*/,Dwarf_Error * /*error*/,
- int * /*error_count_out */);
-
-/* dwarf_check_lineheader lets dwarfdump get detailed messages
- about some compiler errors we detect.
- We return the count of detected errors throught the
- pointer.
-*/
-void dwarf_check_lineheader(Dwarf_Die /*cu_die*/,int *errcount_out);
-
-/* dwarf_ld_sort_lines helps SGI IRIX ld
- rearrange lines in .debug_line in a .o created with a text
- section per function.
- -OPT:procedure_reorder=ON
- where ld-cord (cord(1)ing by ld,
- not by cord(1)) may have changed the function order.
- The _dwarf name is obsolete. Use dwarf_ instead.
-*/
-int _dwarf_ld_sort_lines(
- void * /*orig_buffer*/,
- unsigned long /* buffer_len*/,
- int /*is_64_bit*/,
- int * /*any_change*/,
- int * /*err_code*/);
-int dwarf_ld_sort_lines(
- void * /*orig_buffer*/,
- unsigned long /*buffer_len*/,
- int /*is_64_bit*/,
- int * /*any_change*/,
- int * /*err_code*/);
-
-/* Used by dwarfdump -v to print fde offsets from debugging
- info.
- The _dwarf name is obsolete. Use dwarf_ instead.
-*/
-int _dwarf_fde_section_offset(Dwarf_Debug dbg,
- Dwarf_Fde /*in_fde*/,
- Dwarf_Off * /*fde_off*/,
- Dwarf_Off * /*cie_off*/,
- Dwarf_Error * /*err*/);
-int dwarf_fde_section_offset(Dwarf_Debug dbg,
- Dwarf_Fde /*in_fde*/,
- Dwarf_Off * /*fde_off*/,
- Dwarf_Off * /*cie_off*/,
- Dwarf_Error * /*err*/);
-
-/* Used by dwarfdump -v to print cie offsets from debugging
- info.
- The _dwarf name is obsolete. Use dwarf_ instead.
-*/
-int dwarf_cie_section_offset(Dwarf_Debug /*dbg*/,
- Dwarf_Cie /*in_cie*/,
- Dwarf_Off * /*cie_off */,
- Dwarf_Error * /*err*/);
-int _dwarf_cie_section_offset(Dwarf_Debug /*dbg*/,
- Dwarf_Cie /*in_cie*/,
- Dwarf_Off * /*cie_off*/,
- Dwarf_Error * /*err*/);
-
-typedef struct Dwarf_Macro_Details_s Dwarf_Macro_Details;
-
-int dwarf_get_macro(Dwarf_Debug /*dbg*/,
- char * /*requested_macro_name*/,
- Dwarf_Addr /*pc_of_request*/,
- char ** /*returned_macro_value*/,
- Dwarf_Error * /*error*/);
-
-int dwarf_get_all_defined_macros(Dwarf_Debug /*dbg*/,
- Dwarf_Addr /*pc_of_request*/,
- Dwarf_Signed * /*returned_count*/,
- char *** /*returned_pointers_to_macros*/,
- Dwarf_Error * /*error*/);
-
-char *dwarf_find_macro_value_start(char * /*macro_string*/);
-
-int dwarf_get_macro_details(Dwarf_Debug /*dbg*/,
- Dwarf_Off /*macro_offset*/,
- Dwarf_Unsigned /*maximum_count*/,
- Dwarf_Signed * /*entry_count*/,
- Dwarf_Macro_Details ** /*details*/,
- Dwarf_Error * /*err*/);
-
-
-int dwarf_get_address_size(Dwarf_Debug /*dbg*/,
- Dwarf_Half * /*addr_size*/,
- Dwarf_Error * /*error*/);
-
-/* The dwarf specification separates FORMs into
-different classes. To do the seperation properly
-requires 4 pieces of data as of DWARF4 (thus the
-function arguments listed here).
-The DWARF4 specification class definition suffices to
-describe all DWARF versions.
-See section 7.5.4, Attribute Encodings.
-A return of DW_FORM_CLASS_UNKNOWN means we could not properly figure
-out what form-class it is.
-
- DW_FORM_CLASS_FRAMEPTR is MIPS/IRIX only, and refers
- to the DW_AT_MIPS_fde attribute (a reference to the
- .debug_frame section).
-*/
-enum Dwarf_Form_Class {
- DW_FORM_CLASS_UNKNOWN, DW_FORM_CLASS_ADDRESS,
- DW_FORM_CLASS_BLOCK, DW_FORM_CLASS_CONSTANT,
- DW_FORM_CLASS_EXPRLOC, DW_FORM_CLASS_FLAG,
- DW_FORM_CLASS_LINEPTR, DW_FORM_CLASS_LOCLISTPTR,
- DW_FORM_CLASS_MACPTR, DW_FORM_CLASS_RANGELISTPTR,
- DW_FORM_CLASS_REFERENCE, DW_FORM_CLASS_STRING,
- DW_FORM_CLASS_FRAMEPTR
-};
-
-enum Dwarf_Form_Class dwarf_get_form_class(
- Dwarf_Half /* dwversion */,
- Dwarf_Half /* attrnum */,
- Dwarf_Half /*offset_size */,
- Dwarf_Half /*form*/);
-
-/* utility operations */
-Dwarf_Unsigned dwarf_errno(Dwarf_Error /*error*/);
-
-char* dwarf_errmsg(Dwarf_Error /*error*/);
-
-/* stringcheck zero is default and means do all
-** string length validity checks.
-** Call with parameter value 1 to turn off many such checks (and
-** increase performance).
-** Call with zero for safest running.
-** Actual value saved and returned is only 8 bits! Upper bits
-** ignored by libdwarf (and zero on return).
-** Returns previous value.
-*/
-int dwarf_set_stringcheck(int /*stringcheck*/);
-
-/* 'apply' defaults to 1 and means do all
- * 'rela' relocations on reading in a dwarf object section with
- * such relocations.
- * Call with parameter value 0 to turn off application of
- * such relocations.
- * Since the static linker leaves 'bogus' data in object sections
- * with a 'rela' relocation section such data cannot be read
- * sensibly without processing the relocations. Such relocations
- * do not exist in executables and shared objects (.so), the
- * relocations only exist in plain .o relocatable object files.
- * Actual value saved and returned is only 8 bits! Upper bits
- * ignored by libdwarf (and zero on return).
- * Returns previous value.
- * */
-int dwarf_set_reloc_application(int /*apply*/);
-
-
-/* Unimplemented */
-Dwarf_Handler dwarf_seterrhand(Dwarf_Debug /*dbg*/, Dwarf_Handler /*errhand*/);
-
-/* Unimplemented */
-Dwarf_Ptr dwarf_seterrarg(Dwarf_Debug /*dbg*/, Dwarf_Ptr /*errarg*/);
-
-void dwarf_dealloc(Dwarf_Debug /*dbg*/, void* /*space*/,
- Dwarf_Unsigned /*type*/);
-
-/* DWARF Producer Interface */
-
-typedef int (*Dwarf_Callback_Func)(
- char* /*name*/,
- int /*size*/,
- Dwarf_Unsigned /*type*/,
- Dwarf_Unsigned /*flags*/,
- Dwarf_Unsigned /*link*/,
- Dwarf_Unsigned /*info*/,
- int* /*sect name index*/,
- int* /*error*/);
-
-Dwarf_P_Debug dwarf_producer_init(
- Dwarf_Unsigned /*creation_flags*/,
- Dwarf_Callback_Func /*func*/,
- Dwarf_Handler /*errhand*/,
- Dwarf_Ptr /*errarg*/,
- Dwarf_Error* /*error*/);
-
-typedef int (*Dwarf_Callback_Func_b)(
- char* /*name*/,
- int /*size*/,
- Dwarf_Unsigned /*type*/,
- Dwarf_Unsigned /*flags*/,
- Dwarf_Unsigned /*link*/,
- Dwarf_Unsigned /*info*/,
- Dwarf_Unsigned* /*sect_name_index*/,
- int* /*error*/);
-
-
-Dwarf_P_Debug dwarf_producer_init_b(
- Dwarf_Unsigned /*flags*/,
- Dwarf_Callback_Func_b /*func*/,
- Dwarf_Handler /*errhand*/,
- Dwarf_Ptr /*errarg*/,
- Dwarf_Error * /*error*/);
-
-
-Dwarf_Signed dwarf_transform_to_disk_form(Dwarf_P_Debug /*dbg*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Ptr dwarf_get_section_bytes(Dwarf_P_Debug /*dbg*/,
- Dwarf_Signed /*dwarf_section*/,
- Dwarf_Signed* /*elf_section_index*/,
- Dwarf_Unsigned* /*length*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_relocation_info_count(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned * /*count_of_relocation_sections*/,
- int * /*drd_buffer_version*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_get_relocation_info(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_Signed * /*elf_section_index*/,
- Dwarf_Signed * /*elf_section_index_link*/,
- Dwarf_Unsigned * /*relocation_buffer_count*/,
- Dwarf_Relocation_Data * /*reldata_buffer*/,
- Dwarf_Error* /*error*/);
-
-/* v1: no drd_length field, enum explicit */
-/* v2: has the drd_length field, enum value in uchar member */
-#define DWARF_DRD_BUFFER_VERSION 2
-
-Dwarf_Signed dwarf_get_die_markers(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Marker * /*marker_list*/,
- Dwarf_Unsigned * /*marker_count*/,
- Dwarf_Error * /*error*/);
-
-int dwarf_get_string_attributes_count(Dwarf_P_Debug,
- Dwarf_Unsigned *,
- int *,
- Dwarf_Error *);
-
-int dwarf_get_string_attributes_info(Dwarf_P_Debug,
- Dwarf_Signed *,
- Dwarf_Unsigned *,
- Dwarf_P_String_Attr *,
- Dwarf_Error *);
-
-void dwarf_reset_section_bytes(Dwarf_P_Debug /*dbg*/);
-
-Dwarf_Unsigned dwarf_producer_finish(Dwarf_P_Debug /*dbg*/,
- Dwarf_Error* /*error*/);
-
-/* Producer attribute addition functions. */
-Dwarf_P_Attribute dwarf_add_AT_targ_address(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Unsigned /*pc_value*/,
- Dwarf_Signed /*sym_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_block(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Small* /*block_data*/,
- Dwarf_Unsigned /*block_len*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_targ_address_b(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Unsigned /*pc_value*/,
- Dwarf_Unsigned /*sym_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_ref_address(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Unsigned /*pc_value*/,
- Dwarf_Unsigned /*sym_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_unsigned_const(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Unsigned /*value*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_signed_const(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Signed /*value*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_reference(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_P_Die /*otherdie*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_dataref(
- Dwarf_P_Debug /* dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Unsigned /*pcvalue*/,
- Dwarf_Unsigned /*sym_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_const_value_string(Dwarf_P_Die /*ownerdie*/,
- char* /*string_value*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_location_expr(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_P_Expr /*loc_expr*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_string(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- char* /*string*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_flag(Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Half /*attr*/,
- Dwarf_Small /*flag*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_producer(Dwarf_P_Die /*ownerdie*/,
- char* /*producer_string*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_const_value_signedint(Dwarf_P_Die /*ownerdie*/,
- Dwarf_Signed /*signed_value*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_const_value_unsignedint(
- Dwarf_P_Die /*ownerdie*/,
- Dwarf_Unsigned /*unsigned_value*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_comp_dir(Dwarf_P_Die /*ownerdie*/,
- char* /*current_working_directory*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Attribute dwarf_add_AT_name(Dwarf_P_Die /*die*/,
- char* /*name*/,
- Dwarf_Error* /*error*/);
-
-/* Producer line creation functions (.debug_line) */
-Dwarf_Unsigned dwarf_add_directory_decl(Dwarf_P_Debug /*dbg*/,
- char* /*name*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_file_decl(Dwarf_P_Debug /*dbg*/,
- char* /*name*/,
- Dwarf_Unsigned /*dir_index*/,
- Dwarf_Unsigned /*time_last_modified*/,
- Dwarf_Unsigned /*length*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_line_entry(Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned /*file_index*/,
- Dwarf_Addr /*code_address*/,
- Dwarf_Unsigned /*lineno*/,
- Dwarf_Signed /*column_number*/,
- Dwarf_Bool /*is_source_stmt_begin*/,
- Dwarf_Bool /*is_basic_block_begin*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_lne_set_address(Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned /*offset*/,
- Dwarf_Unsigned /*symbol_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_lne_end_sequence(Dwarf_P_Debug /*dbg*/,
- Dwarf_Addr /*end_address*/,
- Dwarf_Error* /*error*/);
-
-/* Producer .debug_frame functions */
-Dwarf_Unsigned dwarf_add_frame_cie(Dwarf_P_Debug /*dbg*/,
- char* /*augmenter*/,
- Dwarf_Small /*code_alignent_factor*/,
- Dwarf_Small /*data_alignment_factor*/,
- Dwarf_Small /*return_address_reg*/,
- Dwarf_Ptr /*initialization_bytes*/,
- Dwarf_Unsigned /*init_byte_len*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_frame_fde(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Fde /*fde*/,
- Dwarf_P_Die /*corresponding subprogram die*/,
- Dwarf_Unsigned /*cie_to_use*/,
- Dwarf_Unsigned /*virt_addr_of_described_code*/,
- Dwarf_Unsigned /*length_of_code*/,
- Dwarf_Unsigned /*symbol_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_frame_fde_b(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Fde /*fde*/,
- Dwarf_P_Die /*die*/,
- Dwarf_Unsigned /*cie*/,
- Dwarf_Addr /*virt_addr*/,
- Dwarf_Unsigned /*code_len*/,
- Dwarf_Unsigned /*sym_idx*/,
- Dwarf_Unsigned /*sym_idx_of_end*/,
- Dwarf_Addr /*offset_from_end_sym*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_frame_info_b(
- Dwarf_P_Debug dbg /*dbg*/,
- Dwarf_P_Fde /*fde*/,
- Dwarf_P_Die /*die*/,
- Dwarf_Unsigned /*cie*/,
- Dwarf_Addr /*virt_addr*/,
- Dwarf_Unsigned /*code_len*/,
- Dwarf_Unsigned /*symidx*/,
- Dwarf_Unsigned /*end_symbol */,
- Dwarf_Addr /*offset_from_end_symbol */,
- Dwarf_Signed /*offset_into_exception_tables*/,
- Dwarf_Unsigned /*exception_table_symbol*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_frame_info(
- Dwarf_P_Debug dbg /*dbg*/,
- Dwarf_P_Fde /*fde*/,
- Dwarf_P_Die /*die*/,
- Dwarf_Unsigned /*cie*/,
- Dwarf_Addr /*virt_addr*/,
- Dwarf_Unsigned /*code_len*/,
- Dwarf_Unsigned /*symidx*/,
- Dwarf_Signed /*offset_into_exception_tables*/,
- Dwarf_Unsigned /*exception_table_symbol*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_P_Fde dwarf_add_fde_inst(
- Dwarf_P_Fde /*fde*/,
- Dwarf_Small /*op*/,
- Dwarf_Unsigned /*val1*/,
- Dwarf_Unsigned /*val2*/,
- Dwarf_Error* /*error*/);
-
-/* New September 17, 2009 */
-int dwarf_insert_fde_inst_bytes(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Fde /*fde*/,
- Dwarf_Unsigned /*len*/,
- Dwarf_Ptr /*ibytes*/,
- Dwarf_Error* /*error*/);
-
-
-Dwarf_P_Fde dwarf_new_fde(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/);
-
-Dwarf_P_Fde dwarf_fde_cfa_offset(
- Dwarf_P_Fde /*fde*/,
- Dwarf_Unsigned /*register_number*/,
- Dwarf_Signed /*offset*/,
- Dwarf_Error* /*error*/);
-
-/* die creation & addition routines */
-Dwarf_P_Die dwarf_new_die(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_Tag /*tag*/,
- Dwarf_P_Die /*parent*/,
- Dwarf_P_Die /*child*/,
- Dwarf_P_Die /*left */,
- Dwarf_P_Die /*right*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_die_to_debug(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_die_marker(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- Dwarf_Unsigned /*marker*/,
- Dwarf_Error * /*error*/);
-
-Dwarf_Unsigned dwarf_get_die_marker(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- Dwarf_Unsigned * /*marker*/,
- Dwarf_Error * /*error*/);
-
-Dwarf_P_Die dwarf_die_link(
- Dwarf_P_Die /*die*/,
- Dwarf_P_Die /*parent*/,
- Dwarf_P_Die /*child*/,
- Dwarf_P_Die /*left*/,
- Dwarf_P_Die /*right*/,
- Dwarf_Error* /*error*/);
-
-void dwarf_dealloc_compressed_block(
- Dwarf_P_Debug,
- void *
-);
-
-/* Call this passing in return value from dwarf_uncompress_integer_block()
- * to free the space the decompression allocated. */
-void dwarf_dealloc_uncompressed_block(
- Dwarf_Debug,
- void *
-);
-
-void * dwarf_compress_integer_block(
- Dwarf_P_Debug, /* dbg */
- Dwarf_Bool, /* signed==true (or unsigned) */
- Dwarf_Small, /* size of integer units: 8, 16, 32, 64 */
- void*, /* data */
- Dwarf_Unsigned, /* number of elements */
- Dwarf_Unsigned*, /* number of bytes in output block */
- Dwarf_Error* /* error */
-);
-
-/* Decode an array of signed leb integers (so of course the
- * array is not composed of fixed length values, but is instead
- * a sequence of sleb values).
- * Returns a DW_DLV_BADADDR on error.
- * Otherwise returns a pointer to an array of 32bit integers.
- * The signed argument must be non-zero (the decode
- * assumes sleb integers in the input data) at this time.
- * Size of integer units must be 32 (32 bits each) at this time.
- * Number of bytes in block is a byte count (not array count).
- * Returns number of units in output block (ie, number of elements
- * of the array that the return value points to) thru the argument.
- */
-void * dwarf_uncompress_integer_block(
- Dwarf_Debug, /* dbg */
- Dwarf_Bool, /* signed==true (or unsigned) */
- Dwarf_Small, /* size of integer units: 8, 16, 32, 64 */
- void*, /* input data */
- Dwarf_Unsigned, /* number of bytes in input */
- Dwarf_Unsigned*, /* number of units in output block */
- Dwarf_Error* /* error */
-);
-
-/* Operations to create location expressions. */
-Dwarf_P_Expr dwarf_new_expr(Dwarf_P_Debug /*dbg*/, Dwarf_Error* /*error*/);
-
-void dwarf_expr_reset(
- Dwarf_P_Expr /*expr*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_expr_gen(
- Dwarf_P_Expr /*expr*/,
- Dwarf_Small /*opcode*/,
- Dwarf_Unsigned /*val1*/,
- Dwarf_Unsigned /*val2*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_expr_addr(
- Dwarf_P_Expr /*expr*/,
- Dwarf_Unsigned /*addr*/,
- Dwarf_Signed /*sym_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_expr_addr_b(
- Dwarf_P_Expr /*expr*/,
- Dwarf_Unsigned /*addr*/,
- Dwarf_Unsigned /*sym_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_expr_current_offset(
- Dwarf_P_Expr /*expr*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Addr dwarf_expr_into_block(
- Dwarf_P_Expr /*expr*/,
- Dwarf_Unsigned* /*length*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_arange(Dwarf_P_Debug /*dbg*/,
- Dwarf_Addr /*begin_address*/,
- Dwarf_Unsigned /*length*/,
- Dwarf_Signed /*symbol_index*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_arange_b(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_Addr /*begin_address*/,
- Dwarf_Unsigned /*length*/,
- Dwarf_Unsigned /*symbol_index*/,
- Dwarf_Unsigned /*end_symbol_index*/,
- Dwarf_Addr /*offset_from_end_symbol*/,
- Dwarf_Error * /*error*/);
-
-Dwarf_Unsigned dwarf_add_pubname(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- char* /*pubname_name*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_funcname(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- char* /*func_name*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_typename(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- char* /*type_name*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_varname(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- char* /*var_name*/,
- Dwarf_Error* /*error*/);
-
-Dwarf_Unsigned dwarf_add_weakname(
- Dwarf_P_Debug /*dbg*/,
- Dwarf_P_Die /*die*/,
- char* /*weak_name*/,
- Dwarf_Error* /*error*/);
-
-/* .debug_macinfo producer functions
- Functions must be called in right order: the section is output
- In the order these are presented.
-*/
-int dwarf_def_macro(Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned /*line*/,
- char * /*macname, with (arglist), no space before (*/,
- char * /*macvalue*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_undef_macro(Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned /*line*/,
- char * /*macname, no arglist, of course*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_start_macro_file(Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned /*fileindex*/,
- Dwarf_Unsigned /*linenumber*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_end_macro_file(Dwarf_P_Debug /*dbg*/,
- Dwarf_Error* /*error*/);
-
-int dwarf_vendor_ext(Dwarf_P_Debug /*dbg*/,
- Dwarf_Unsigned /*constant*/,
- char * /*string*/,
- Dwarf_Error* /*error*/);
-
-/* end macinfo producer functions */
-
-int dwarf_attr_offset(Dwarf_Die /*die*/,
- Dwarf_Attribute /*attr of above die*/,
- Dwarf_Off * /*returns offset thru this ptr */,
- Dwarf_Error * /*error*/);
-
-/* This is a hack so clients can verify offsets.
- Added April 2005 so that debugger can detect broken offsets
- (which happened in an IRIX executable larger than 2GB
- with MIPSpro 7.3.1.3 toolchain.).
-*/
-int
-dwarf_get_section_max_offsets(Dwarf_Debug /*dbg*/,
- Dwarf_Unsigned * /*debug_info_size*/,
- Dwarf_Unsigned * /*debug_abbrev_size*/,
- Dwarf_Unsigned * /*debug_line_size*/,
- Dwarf_Unsigned * /*debug_loc_size*/,
- Dwarf_Unsigned * /*debug_aranges_size*/,
- Dwarf_Unsigned * /*debug_macinfo_size*/,
- Dwarf_Unsigned * /*debug_pubnames_size*/,
- Dwarf_Unsigned * /*debug_str_size*/,
- Dwarf_Unsigned * /*debug_frame_size*/,
- Dwarf_Unsigned * /*debug_ranges_size*/,
- Dwarf_Unsigned * /*debug_pubtypes_size*/);
-
-/* Multiple releases spelled 'initial' as 'inital' .
- The 'inital' spelling should not be used. */
-Dwarf_Half dwarf_set_frame_rule_inital_value(Dwarf_Debug /*dbg*/,
- Dwarf_Half /*value*/);
-/* Additional interface with correct 'initial' spelling. */
-/* It is likely you will want to call the following 5 functions
- before accessing any frame information. All are useful
- to tailor handling of pseudo-registers needed to turn
- frame operation references into simpler forms and to
- reflect ABI specific data. Of course altering libdwarf.h
- and dwarf.h allow the same capabilities, but such header changes
- do not let one change these values at runtime. */
-Dwarf_Half dwarf_set_frame_rule_initial_value(Dwarf_Debug /*dbg*/,
- Dwarf_Half /*value*/);
-Dwarf_Half dwarf_set_frame_rule_table_size(Dwarf_Debug /*dbg*/,
- Dwarf_Half /*value*/);
-Dwarf_Half dwarf_set_frame_cfa_value(Dwarf_Debug /*dbg*/,
- Dwarf_Half /*value*/);
-Dwarf_Half dwarf_set_frame_same_value(Dwarf_Debug /*dbg*/,
- Dwarf_Half /*value*/);
-Dwarf_Half dwarf_set_frame_undefined_value(Dwarf_Debug /*dbg*/,
- Dwarf_Half /*value*/);
-
-/* As of April 27, 2009, this version with no diepointer is
- obsolete though supported. Use dwarf_get_ranges_a() instead. */
-int dwarf_get_ranges(Dwarf_Debug /*dbg*/,
- Dwarf_Off /*rangesoffset*/,
- Dwarf_Ranges ** /*rangesbuf*/,
- Dwarf_Signed * /*listlen*/,
- Dwarf_Unsigned * /*bytecount*/,
- Dwarf_Error * /*error*/);
-
-/* This adds the address_size argument. New April 27, 2009 */
-int dwarf_get_ranges_a(Dwarf_Debug /*dbg*/,
- Dwarf_Off /*rangesoffset*/,
- Dwarf_Die /* diepointer */,
- Dwarf_Ranges ** /*rangesbuf*/,
- Dwarf_Signed * /*listlen*/,
- Dwarf_Unsigned * /*bytecount*/,
- Dwarf_Error * /*error*/);
-
-void dwarf_ranges_dealloc(Dwarf_Debug /*dbg*/,
- Dwarf_Ranges * /*rangesbuf*/,
- Dwarf_Signed /*rangecount*/);
-
-/* The harmless error list is a circular buffer of
- errors we note but which do not stop us from processing
- the object. Created so dwarfdump or other tools
- can report such inconsequential errors without causing
- anything to stop early. */
-#define DW_HARMLESS_ERROR_CIRCULAR_LIST_DEFAULT_SIZE 4
-#define DW_HARMLESS_ERROR_MSG_STRING_SIZE 200
-/* User code supplies size of array of pointers errmsg_ptrs_array
- in count and the array of pointers (the pointers themselves
- need not be initialized).
- The pointers returned in the array of pointers
- are invalidated by ANY call to libdwarf.
- Use them before making another libdwarf call!
- The array of string pointers passed in always has
- a final null pointer, so if there are N pointers the
- and M actual strings, then MIN(M,N-1) pointers are
- set to point to error strings. The array of pointers
- to strings always terminates with a NULL pointer.
- If 'count' is passed in zero then errmsg_ptrs_array
- is not touched.
-
- The function returns DW_DLV_NO_ENTRY if no harmless errors
- were noted so far. Returns DW_DLV_OK if there are errors.
- Never returns DW_DLV_ERROR.
-
- Each call empties the error list (discarding all current entries).
- If newerr_count is non-NULL the count of harmless errors
- since the last call is returned through the pointer
- (some may have been discarded or not returned, it is a circular
- list...).
- If DW_DLV_NO_ENTRY is returned none of the arguments
- here are touched or used.
- */
-int dwarf_get_harmless_error_list(Dwarf_Debug /*dbg*/,
- unsigned /*count*/,
- const char ** /*errmsg_ptrs_array*/,
- unsigned * /*newerr_count*/);
-
-/* Insertion is only for testing the harmless error code, it is not
- necessarily useful otherwise. */
-void dwarf_insert_harmless_error(Dwarf_Debug /*dbg*/,
- char * /*newerror*/);
-
-/* The size of the circular list of strings may be set
- and reset as needed. If it is shortened excess
- messages are simply dropped. It returns the previous
- size. If zero passed in the size is unchanged
- and it simply returns the current size */
-unsigned dwarf_set_harmless_error_list_size(Dwarf_Debug /*dbg*/,
- unsigned /*maxcount*/);
-/* The harmless error strings (if any) are freed when the dbg
- is dwarf_finish()ed. */
-
-/* When the val_in is known these dwarf_get_TAG_name (etc)
- functions return the string corresponding to the val_in passed in
- through the pointer s_out and the value returned is DW_DLV_OK.
- The strings are in static storage
- and must not be freed.
- If DW_DLV_NO_ENTRY is returned the val_in is not known and
- *s_out is not set. DW_DLV_ERROR is never returned.*/
-
-extern int dwarf_get_TAG_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_children_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_FORM_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_AT_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_OP_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_ATE_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_DS_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_END_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_ATCF_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_ACCESS_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_VIS_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_VIRTUALITY_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_LANG_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_ID_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_CC_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_INL_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_ORD_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_DSC_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_LNS_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_LNE_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_MACINFO_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_CFA_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_EH_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_FRAME_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_CHILDREN_name(unsigned int /*val_in*/, const char ** /*s_out */);
-extern int dwarf_get_ADDR_name(unsigned int /*val_in*/, const char ** /*s_out */);
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _LIBDWARF_H */
-
-
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/libdwarfdefs.h b/desmume/src/windows/libelf_libdwarf/libdwarf/libdwarfdefs.h
deleted file mode 100644
index a564655b2..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/libdwarfdefs.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-/* libdwarfdefs.h
-*/
-
-#ifndef LIBDWARFDEFS_H
-#define LIBDWARFDEFS_H
-
-/* We want __uint32_t and __uint64_t and __int32_t __int64_t
- properly defined but not duplicated, since duplicate typedefs
- are not legal C.
-*/
-/*
- HAVE___UINT32_T
- HAVE___UINT64_T will be set by configure if
- our 4 types are predefined in compiler
-*/
-
-
-#if (!defined(HAVE___UINT32_T)) && defined(HAVE___UINT32_T_IN_SGIDEFS_H)
-#include /* sgidefs.h defines them */
-#define HAVE___UINT32_T 1
-#endif
-
-#if (!defined(HAVE___UINT64_T)) && defined(HAVE___UINT64_T_IN_SGIDEFS_H)
-#include /* sgidefs.h defines them */
-#define HAVE___UINT64_T 1
-#endif
-
-
-#if (!defined(HAVE___UINT32_T)) && \
- defined(HAVE_SYS_TYPES_H) && \
- defined(HAVE___UINT32_T_IN_SYS_TYPES_H)
-# include
-#define HAVE___UINT32_T 1
-#endif
-
-#if (!defined(HAVE___UINT64_T)) && \
- defined(HAVE_SYS_TYPES_H) && \
- defined(HAVE___UINT64_T_IN_SYS_TYPES_H)
-# include
-#define HAVE___UINT64_T 1
-#endif
-
-#ifndef HAVE___UINT32_T
-typedef int __int32_t;
-typedef unsigned __uint32_t;
-#define HAVE___UINT32_T 1
-#endif
-
-#ifndef HAVE___UINT64_T
-typedef long long __int64_t;
-typedef unsigned long long __uint64_t;
-#define HAVE___UINT64_T 1
-#endif
-
-#endif /* LIBDWARFDEFS_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/malloc_check.h b/desmume/src/windows/libelf_libdwarf/libdwarf/malloc_check.h
deleted file mode 100644
index ba1ad3da7..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/malloc_check.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-
- Copyright (C) 2005 Silicon Graphics, Inc. All Rights Reserved.
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-/* malloc_check.h */
-
-/* A simple libdwarf-aware malloc checker.
- define WANT_LIBBDWARF_MALLOC_CHECK and rebuild libdwarf
- do make a checking-for-alloc-mistakes libdwarf.
- NOT recommended for production use.
-
- When defined, also add malloc_check.c to the list of
- files in Makefile.
-*/
-
-#undef WANT_LIBBDWARF_MALLOC_CHECK
-/*#define WANT_LIBBDWARF_MALLOC_CHECK 1 */
-
-#ifdef WANT_LIBBDWARF_MALLOC_CHECK
-
-void dwarf_malloc_check_alloc_data(void * addr,unsigned char code);
-void dwarf_malloc_check_dealloc_data(void * addr,unsigned char code);
-void dwarf_malloc_check_complete(char *wheremsg); /* called at exit of app */
-
-#else /* !WANT_LIBBDWARF_MALLOC_CHECK */
-
-#define dwarf_malloc_check_alloc_data(a,b) /* nothing */
-#define dwarf_malloc_check_dealloc_data(a,b) /* nothing */
-#define dwarf_malloc_check_complete(a) /* nothing */
-
-#endif /* WANT_LIBBDWARF_MALLOC_CHECK */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_alloc.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_alloc.h
deleted file mode 100644
index b4da65325..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_alloc.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-Dwarf_Ptr _dwarf_p_get_alloc(Dwarf_P_Debug, Dwarf_Unsigned);
-
-void _dwarf_p_dealloc(Dwarf_P_Debug dbg, Dwarf_Small * ptr);
-
-void _dwarf_p_dealloc_all(Dwarf_P_Debug dbg);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_arange.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_arange.h
deleted file mode 100644
index f0e7e84df..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_arange.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-/*
- If ag_end_symbol_index is zero,
- ag_length must be known and non-zero.
-
-
- Deals with length being known costant or fr
- assembler output, not known.
-
-*/
-
-struct Dwarf_P_Arange_s {
- Dwarf_Addr ag_begin_address; /* known address or for
- symbolic assem output,
- offset of symbol */
- Dwarf_Addr ag_length; /* zero or address or offset */
- Dwarf_Unsigned ag_symbol_index;
-
- Dwarf_P_Arange ag_next;
-
- Dwarf_Unsigned ag_end_symbol_index; /* zero or index/id of end
- symbol */
- Dwarf_Addr ag_end_symbol_offset; /* known address or for
- symbolic assem output,
- offset of end symbol */
-
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_die.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_die.h
deleted file mode 100644
index 01c00e79b..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_die.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-/*
- This struct holds the abbreviation table, before they are written
- on disk. Holds a linked list of abbreviations, each consisting of
- a bitmap for attributes and a bitmap for forms
-*/
-typedef struct Dwarf_P_Abbrev_s *Dwarf_P_Abbrev;
-
-struct Dwarf_P_Abbrev_s {
- Dwarf_Unsigned abb_idx; /* index of abbreviation */
- Dwarf_Tag abb_tag; /* tag of die */
- Dwarf_Ubyte abb_children; /* if children are present */
- Dwarf_ufixed *abb_attrs; /* holds names of attrs */
- Dwarf_ufixed *abb_forms; /* forms of attributes */
- int abb_n_attr; /* num of attrs = # of forms */
- Dwarf_P_Abbrev abb_next;
-};
-
-/* used in pro_section.c */
-
-int _dwarf_pro_add_AT_fde(Dwarf_P_Debug dbg, Dwarf_P_Die die,
- Dwarf_Unsigned offset, Dwarf_Error * error);
-
-int _dwarf_pro_add_AT_stmt_list(Dwarf_P_Debug dbg,
- Dwarf_P_Die first_die,
- Dwarf_Error * error);
-
-int _dwarf_pro_add_AT_macro_info(Dwarf_P_Debug dbg,
- Dwarf_P_Die first_die,
- Dwarf_Unsigned offset,
- Dwarf_Error * error);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_encode_nm.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_encode_nm.h
deleted file mode 100644
index d08e4d514..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_encode_nm.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-/* Bytes needed to encode a number.
- Not a tight bound, just a reasonable bound.
-*/
-#define ENCODE_SPACE_NEEDED (2*sizeof(Dwarf_Unsigned))
-
-
-int _dwarf_pro_encode_leb128_nm(Dwarf_Unsigned val, int *nbytes,
- char *space, int splen);
-
-int _dwarf_pro_encode_signed_leb128_nm(Dwarf_Signed value, int *nbytes,
- char *space, int splen);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_error.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_error.h
deleted file mode 100644
index c37035301..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_error.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-/* Handle error passing in the name of the Dwarf_P_Debug
- User must supply {} around the macro.
- Putting the {} here leads to macro uses that don't look like C.
- The error argument to dwarf_error is hard coded here as 'error'
-*/
-#define DWARF_P_DBG_ERROR(dbg,errval,retval) \
- _dwarf_p_error(dbg,error,errval); return(retval);
-
-struct Dwarf_Error_s {
- Dwarf_Sword er_errval;
-};
-
-void _dwarf_p_error(Dwarf_P_Debug dbg, Dwarf_Error * error,
- Dwarf_Word errval);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_expr.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_expr.h
deleted file mode 100644
index 202f2d30d..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_expr.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-#define MAXIMUM_LOC_EXPR_LENGTH 20
-
-struct Dwarf_P_Expr_s {
- Dwarf_Small ex_byte_stream[MAXIMUM_LOC_EXPR_LENGTH];
- Dwarf_P_Debug ex_dbg;
- Dwarf_Unsigned ex_next_byte_offset;
- Dwarf_Unsigned ex_reloc_sym_index;
- Dwarf_Unsigned ex_reloc_offset;
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_frame.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_frame.h
deleted file mode 100644
index df60d369e..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_frame.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-/*
- Largest register value that can be coded into
- the opcode since there are only 6 bits in the
- register field.
-*/
-#define MAX_6_BIT_VALUE 0x3f
-
-/*
- This struct holds debug_frame instructions
-*/
-typedef struct Dwarf_P_Frame_Pgm_s *Dwarf_P_Frame_Pgm;
-
-struct Dwarf_P_Frame_Pgm_s {
- Dwarf_Ubyte dfp_opcode; /* opcode - includes reg # */
- char *dfp_args; /* operands */
- int dfp_nbytes; /* number of bytes in args */
-#if 0
- Dwarf_Unsigned dfp_sym_index; /* 0 unless reloc needed */
-#endif
- Dwarf_P_Frame_Pgm dfp_next;
-};
-
-
-/*
- This struct has cie related information. Used to gather data
- from user program, and later to transform to disk form
-*/
-struct Dwarf_P_Cie_s {
- Dwarf_Ubyte cie_version;
- char *cie_aug; /* augmentation */
- Dwarf_Ubyte cie_code_align; /* alignment of code */
- Dwarf_Sbyte cie_data_align;
- Dwarf_Ubyte cie_ret_reg; /* return register # */
- char *cie_inst; /* initial instruction */
- long cie_inst_bytes;
- /* no of init_inst */
- Dwarf_P_Cie cie_next;
-};
-
-
-/* producer fields */
-struct Dwarf_P_Fde_s {
- Dwarf_Unsigned fde_unused1;
-
- /* function/subr die for this fde */
- Dwarf_P_Die fde_die;
-
- /* index to asso. cie */
- Dwarf_Word fde_cie;
-
- /* Address of first location of the code this frame applies to If
- fde_end_symbol non-zero, this represents the offset from the
- symbol indicated by fde_r_symidx */
- Dwarf_Addr fde_initloc;
-
- /* Relocation symbol for address of the code this frame applies to.
- */
- Dwarf_Unsigned fde_r_symidx;
-
- /* Bytes of instr for this fde, if known */
- Dwarf_Unsigned fde_addr_range;
-
- /* linked list of instructions we will put in fde. */
- Dwarf_P_Frame_Pgm fde_inst;
-
- /* number of instructions in fde */
- long fde_n_inst;
-
- /* number of bytes of inst in fde */
- long fde_n_bytes;
-
- /* offset into exception table for this function. */
- Dwarf_Signed fde_offset_into_exception_tables;
-
- /* The symbol for the exception table elf section. */
- Dwarf_Unsigned fde_exception_table_symbol;
-
- /* pointer to last inst */
- Dwarf_P_Frame_Pgm fde_last_inst;
-
- Dwarf_P_Fde fde_next;
-
- /* The symbol and offset of the end symbol. When fde_end_symbol is
- non-zero we must represent the */
- Dwarf_Addr fde_end_symbol_offset;
- Dwarf_Unsigned fde_end_symbol;
-
- int fde_uwordb_size;
- Dwarf_P_Debug fde_dbg;
-
- /* If fde_block is non-null, then it is the set of instructions.
- so we should use it rather than fde_inst. */
- Dwarf_Unsigned fde_inst_block_size;
- void *fde_block;
-};
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_incl.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_incl.h
deleted file mode 100644
index e22e0251a..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_incl.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-
- Copyright (C) 2000,2002,2004 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2002-2010 Sun Microsystems, Inc. All rights reserved.
- Portions Copyright 2008-2010 David Anderson. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-#ifdef HAVE_ELF_H
-#include
-#elif defined(HAVE_LIBELF_H)
-/* On one platform without elf.h this gets Elf32_Rel
- type defined (a required type). */
-#include
-#elif defined(HAVE_LIBELF_LIBELF_H)
-#include
-#endif
-
-#if defined(sun)
-#include
-#include
-#endif
-
-/* The target address is given: the place in the source integer
- is to be determined.
-*/
-#ifdef WORDS_BIGENDIAN
-#define WRITE_UNALIGNED(dbg,dest,source, srclength,len_out) \
- { \
- dbg->de_copy_word(dest, \
- ((char *)source) +srclength-len_out, \
- len_out) ; \
- }
-
-
-#else /* LITTLE ENDIAN */
-
-#define WRITE_UNALIGNED(dbg,dest,source, srclength,len_out) \
- { \
- dbg->de_copy_word( (dest) , \
- ((char *)source) , \
- len_out) ; \
- }
-#endif
-
-
-#if defined(sparc) && defined(sun)
-#define REL32 Elf32_Rela
-#define REL64 Elf64_Rela
-#define REL_SEC_PREFIX ".rela"
-#else
-#define REL32 Elf32_Rel
-#define REL64 Elf64_Rel
-#define REL_SEC_PREFIX ".rel"
-#endif
-
-#include "dwarf.h"
-#include "libdwarf.h"
-
-#include "pro_opaque.h"
-#include "pro_error.h"
-#include "pro_util.h"
-#include "pro_encode_nm.h"
-#include "pro_alloc.h"
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_line.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_line.h
deleted file mode 100644
index eed941239..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_line.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2007-2010 Sun Microsystems, Inc. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-#define VERSION 2
-#ifdef __i386
-#define MIN_INST_LENGTH 1
-#else
-#define MIN_INST_LENGTH 4
-#endif
-#define DEFAULT_IS_STMT false
- /* line base and range are temporarily defines.
- They need to be calculated later */
-#define LINE_BASE -1
-#define LINE_RANGE 4
-
-#define OPCODE_BASE 10
-#define MAX_OPCODE 255
-
-
-/*
- This struct is used to hold entries in the include directories
- part of statement prologue.
-*/
-struct Dwarf_P_Inc_Dir_s {
- char *did_name; /* name of directory */
- Dwarf_P_Inc_Dir did_next;
-};
-
-
-/*
- This struct holds file entries for the statement prologue.
- Defined in pro_line.h
-*/
-struct Dwarf_P_F_Entry_s {
- char *dfe_name;
- char *dfe_args; /* has dir index, time of modification,
- length in bytes. Encodes as leb128 */
- int dfe_nbytes; /* number of bytes in args */
- Dwarf_P_F_Entry dfe_next;
-};
-
-
-/*
- Struct holding line number information for each of the producer
- line entries
-*/
-struct Dwarf_P_Line_s {
- /* code address */
- Dwarf_Addr dpl_address;
-
- /* file index, index into file entry */
- Dwarf_Word dpl_file;
-
- /* line number */
- Dwarf_Word dpl_line;
-
- /* column number */
- Dwarf_Word dpl_column;
-
- /* whether its a beginning of a stmt */
- Dwarf_Ubyte dpl_is_stmt;
-
- /* whether its a beginning of basic blk */
- Dwarf_Ubyte dpl_basic_block;
-
- /* used to store opcodes set_address, and end_seq */
- Dwarf_Ubyte dpl_opc;
-
- /*
- Used only for relocations. Has index of symbol relative to
- which relocation has to be done (the S part in S + A) */
- Dwarf_Unsigned dpl_r_symidx;
-
- Dwarf_P_Line dpl_next;
-};
-
-/*
- to initialize state machine registers, definition in
- pro_line.c
-*/
-void _dwarf_pro_reg_init(Dwarf_P_Line);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_macinfo.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_macinfo.h
deleted file mode 100644
index 852a0cec1..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_macinfo.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-int _dwarf_pro_transform_macro_info_to_disk(Dwarf_P_Debug dbg,
- Dwarf_Error * error);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_opaque.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_opaque.h
deleted file mode 100644
index befc69faa..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_opaque.h
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
-
- Copyright (C) 2000,2002,2004 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2002-2010 Sun Microsystems, Inc. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-#include
-
-/*
- Sgidefs included to define __uint32_t,
- a guaranteed 4-byte quantity.
-*/
-#include "libdwarfdefs.h"
-
-#define true 1
-#define false 0
-
-/* to identify a cie */
-#define DW_CIE_ID ~(0x0)
-#define DW_CIE_VERSION 1
-
-/*Dwarf_Word is unsigned word usable for index, count in memory */
-/*Dwarf_Sword is signed word usable for index, count in memory */
-/* The are 32 or 64 bits depending if 64 bit longs or not, which
-** fits the ILP32 and LP64 models
-** These work equally well with ILP64.
-*/
-
-typedef unsigned long Dwarf_Word;
-typedef long Dwarf_Sword;
-
-
-typedef signed char Dwarf_Sbyte;
-typedef unsigned char Dwarf_Ubyte;
-typedef signed short Dwarf_Shalf;
-
-/*
- On any change that makes libdwarf producer
- incompatible, increment this number.
- 1->2->3 ...
-
-*/
-#define PRO_VERSION_MAGIC 0xdead1
-
-
-/* these 2 are fixed sizes which must not vary with the
-** ILP32/LP64 model. These two stay at 32 bit.
-*/
-typedef __uint32_t Dwarf_ufixed;
-typedef __int32_t Dwarf_sfixed;
-
-/*
- producer:
- This struct is used to hold information about all
- debug* sections. On creating a new section, section
- names and indices are added to this struct
- definition in pro_section.h
-*/
-typedef struct Dwarf_P_Section_Data_s *Dwarf_P_Section_Data;
-
-/*
- producer:
- This struct is used to hold entries in the include directories
- part of statement prologue. Definition in pro_line.h
-*/
-typedef struct Dwarf_P_Inc_Dir_s *Dwarf_P_Inc_Dir;
-
-/*
- producer:
- This struct holds file entries for the statement prologue.
- Defined in pro_line.h
-*/
-typedef struct Dwarf_P_F_Entry_s *Dwarf_P_F_Entry;
-
-/*
- producer:
- This struct holds information for each cie. Defn in pro_frame.h
-*/
-typedef struct Dwarf_P_Cie_s *Dwarf_P_Cie;
-
-/*
- producer:
- Struct to hold line number information, different from
- Dwarf_Line opaque type.
-*/
-typedef struct Dwarf_P_Line_s *Dwarf_P_Line;
-
-/*
- producer:
- Struct to hold information about address ranges.
-*/
-typedef struct Dwarf_P_Simple_nameentry_s *Dwarf_P_Simple_nameentry;
-typedef struct Dwarf_P_Simple_name_header_s *Dwarf_P_Simple_name_header;
-typedef struct Dwarf_P_Arange_s *Dwarf_P_Arange;
-typedef struct Dwarf_P_Per_Reloc_Sect_s *Dwarf_P_Per_Reloc_Sect;
-typedef struct Dwarf_P_Per_Sect_String_Attrs_s *Dwarf_P_Per_Sect_String_Attrs;
-
-/* Defined to get at the elf section numbers and section name
- indices in symtab for the dwarf sections
- Must match .rel.* names in _dwarf_rel_section_names
- exactly.
-*/
-#define DEBUG_INFO 0
-#define DEBUG_LINE 1
-#define DEBUG_ABBREV 2
-#define DEBUG_FRAME 3
-#define DEBUG_ARANGES 4
-#define DEBUG_PUBNAMES 5
-#define DEBUG_STR 6
-#define DEBUG_FUNCNAMES 7
-#define DEBUG_TYPENAMES 8
-#define DEBUG_VARNAMES 9
-#define DEBUG_WEAKNAMES 10
-#define DEBUG_MACINFO 11
-#define DEBUG_LOC 12
-
- /* number of debug_* sections not including the relocations */
-#define NUM_DEBUG_SECTIONS DEBUG_LOC + 1
-
-
-struct Dwarf_P_Die_s {
- Dwarf_Unsigned di_offset; /* offset in debug info */
- char *di_abbrev; /* abbreviation */
- Dwarf_Word di_abbrev_nbytes; /* # of bytes in abbrev */
- Dwarf_Tag di_tag;
- Dwarf_P_Die di_parent; /* parent of current die */
- Dwarf_P_Die di_child; /* first child */
- /* The last child field makes linking up children an O(1) operation,
- See pro_die.c. */
- Dwarf_P_Die di_last_child;
- Dwarf_P_Die di_left; /* left sibling */
- Dwarf_P_Die di_right; /* right sibling */
- Dwarf_P_Attribute di_attrs; /* list of attributes */
- Dwarf_P_Attribute di_last_attr; /* last attribute */
- int di_n_attr; /* number of attributes */
- Dwarf_P_Debug di_dbg; /* For memory management */
- Dwarf_Unsigned di_marker; /* used to attach symbols to dies */
-};
-
-
-/* producer fields */
-struct Dwarf_P_Attribute_s {
- Dwarf_Half ar_attribute; /* Attribute Value. */
- Dwarf_Half ar_attribute_form; /* Attribute Form. */
- Dwarf_P_Die ar_ref_die; /* die pointer if form ref */
- char *ar_data; /* data, format given by form */
- Dwarf_Unsigned ar_nbytes; /* no. of bytes of data */
- Dwarf_Unsigned ar_rel_symidx; /* when attribute has a
- relocatable value, holds
- index of symbol in SYMTAB */
- Dwarf_Ubyte ar_rel_type; /* relocation type */
- Dwarf_Word ar_rel_offset; /* Offset of relocation within block */
- char ar_reloc_len; /* Number of bytes that relocation
- applies to. 4 or 8. Unused and may
- be 0 if if ar_rel_type is
- R_MIPS_NONE */
- Dwarf_P_Attribute ar_next;
-};
-
-/* A block of .debug_macinfo data: this forms a series of blocks.
-** Each macinfo input is compressed immediately and put into
-** the current block if room, else a newblock allocated.
-** The space allocation is such that the block and the macinfo
-** data are one malloc block: free with a pointer to this and the
-** mb_data is freed automatically.
-** Like the struct hack, but legal ANSI C.
-*/
-struct dw_macinfo_block_s {
- struct dw_macinfo_block_s *mb_next;
- unsigned long mb_avail_len;
- unsigned long mb_used_len;
- unsigned long mb_macinfo_data_space_len;
- char *mb_data; /* original malloc ptr. */
-};
-
-/* dwarf_sn_kind is for the array of similarly-treated
- name -> cu ties
-*/
-enum dwarf_sn_kind { dwarf_snk_pubname, dwarf_snk_funcname,
- dwarf_snk_weakname, dwarf_snk_typename,
- dwarf_snk_varname,
- dwarf_snk_entrycount /* this one must be last */
-};
-
-
-
-/* The calls to add a varname etc use a list of
- these as the list.
-*/
-struct Dwarf_P_Simple_nameentry_s {
- Dwarf_P_Die sne_die;
- char *sne_name;
- int sne_name_len;
- Dwarf_P_Simple_nameentry sne_next;
-};
-
-/* An array of these, each of which heads a list
- of Dwarf_P_Simple_nameentry
-*/
-struct Dwarf_P_Simple_name_header_s {
- Dwarf_P_Simple_nameentry sn_head;
- Dwarf_P_Simple_nameentry sn_tail;
- Dwarf_Signed sn_count;
-
- /* length that will be generated, not counting fixed header or
- trailer */
- Dwarf_Signed sn_net_len;
-};
-typedef int (*_dwarf_pro_reloc_name_func_ptr) (Dwarf_P_Debug dbg,
- int sec_index,
- Dwarf_Unsigned offset,/* r_offset */
- Dwarf_Unsigned symidx,
- enum Dwarf_Rel_Type type,
- int reltarget_length);
-
-typedef int (*_dwarf_pro_reloc_length_func_ptr) (Dwarf_P_Debug dbg,
- int sec_index, Dwarf_Unsigned offset,/* r_offset */
- Dwarf_Unsigned start_symidx,
- Dwarf_Unsigned end_symidx,
- enum Dwarf_Rel_Type type,
- int reltarget_length);
-typedef int (*_dwarf_pro_transform_relocs_func_ptr) (Dwarf_P_Debug dbg,
- Dwarf_Signed *
- new_sec_count);
-
-/*
- Each slot in a block of slots could be:
- a binary stream relocation entry (32 or 64bit relocation data)
- a SYMBOLIC relocation entry.
- During creation sometimes we create multiple chained blocks,
- but sometimes we create a single long block.
- Before returning reloc data to caller,
- we switch to a single, long-enough,
- block.
-
- We make counters here Dwarf_Unsigned so that we
- get sufficient alignment. Since we use space after
- the struct (at malloc time) for user data which
- must have Dwarf_Unsigned alignment, this
- struct must have that alignment too.
-*/
-struct Dwarf_P_Relocation_Block_s {
- Dwarf_Unsigned rb_slots_in_block; /* slots in block, as created */
- Dwarf_Unsigned rb_next_slot_to_use; /* counter, start at 0. */
- struct Dwarf_P_Relocation_Block_s *rb_next;
- char *rb_where_to_add_next; /* pointer to next slot (might be past
- end, depending on
- rb_next_slot_to_use) */
- char *rb_data; /* data area */
-};
-
-/* One of these per potential relocation section
- So one per actual dwarf section.
- Left zeroed when not used (some sections have
- no relocations).
-*/
-struct Dwarf_P_Per_Reloc_Sect_s {
- unsigned long pr_reloc_total_count; /* total number of entries
- across all blocks */
-
- unsigned long pr_slots_per_block_to_alloc; /* at Block alloc, this
- is the default number of slots to use */
-
- int pr_sect_num_of_reloc_sect; /* sect number returned by
- de_callback_func() or de_callback_func_b() call, this is the sect
- number of the relocation section. */
-
- /* singly-linked list. add at and ('last') with count of blocks */
- struct Dwarf_P_Relocation_Block_s *pr_first_block;
- struct Dwarf_P_Relocation_Block_s *pr_last_block;
- unsigned long pr_block_count;
-};
-
-#define DEFAULT_SLOTS_PER_BLOCK 3
-
-typedef struct memory_list_s {
- struct memory_list_s *prev;
- struct memory_list_s *next;
-} memory_list_t;
-
-struct Dwarf_P_Per_Sect_String_Attrs_s {
- int sect_sa_section_number;
- unsigned sect_sa_n_alloc;
- unsigned sect_sa_n_used;
- Dwarf_P_String_Attr sect_sa_list;
-};
-
-/* Fields used by producer */
-struct Dwarf_P_Debug_s {
- /* used to catch dso passing dbg to another DSO with incompatible
- version of libdwarf See PRO_VERSION_MAGIC */
- int de_version_magic_number;
-
- Dwarf_Handler de_errhand;
- Dwarf_Ptr de_errarg;
-
- /* Call back function, used to create .debug* sections. Provided
- by user. Only of these used per dbg. */
- Dwarf_Callback_Func de_callback_func;
- Dwarf_Callback_Func_b de_callback_func_b;
-
- /* Flags from producer_init call */
- Dwarf_Unsigned de_flags;
-
- /* This holds information on debug section stream output, including
- the stream data */
- Dwarf_P_Section_Data de_debug_sects;
-
- /* Pointer to the 'current active' section */
- Dwarf_P_Section_Data de_current_active_section;
-
- /* Number of debug data streams globs. */
- Dwarf_Word de_n_debug_sect;
-
- /* File entry information, null terminated singly-linked list */
- Dwarf_P_F_Entry de_file_entries;
- Dwarf_P_F_Entry de_last_file_entry;
- Dwarf_Unsigned de_n_file_entries;
-
- /* Has the directories used to search for source files */
- Dwarf_P_Inc_Dir de_inc_dirs;
- Dwarf_P_Inc_Dir de_last_inc_dir;
- Dwarf_Unsigned de_n_inc_dirs;
-
- /* Has all the line number info for the stmt program */
- Dwarf_P_Line de_lines;
- Dwarf_P_Line de_last_line;
-
- /* List of cie's for the debug unit */
- Dwarf_P_Cie de_frame_cies;
- Dwarf_P_Cie de_last_cie;
- Dwarf_Unsigned de_n_cie;
-
- /* Singly-linked list of fde's for the debug unit */
- Dwarf_P_Fde de_frame_fdes;
- Dwarf_P_Fde de_last_fde;
- Dwarf_Unsigned de_n_fde;
-
- /* First die, leads to all others */
- Dwarf_P_Die de_dies;
-
- /* Pointer to list of strings */
- char *de_strings;
-
- /* Pointer to chain of aranges */
- Dwarf_P_Arange de_arange;
- Dwarf_P_Arange de_last_arange;
- Dwarf_Sword de_arange_count;
-
- /* macinfo controls. */
- /* first points to beginning of the list during creation */
- struct dw_macinfo_block_s *de_first_macinfo;
-
- /* current points to the current, unfilled, block */
- struct dw_macinfo_block_s *de_current_macinfo;
-
- /* Pointer to the first section, to support reset_section_bytes */
- Dwarf_P_Section_Data de_first_debug_sect;
-
- /* handles pubnames, weaknames, etc. See dwarf_sn_kind in
- pro_opaque.h */
- struct Dwarf_P_Simple_name_header_s
- de_simple_name_headers[dwarf_snk_entrycount];
-
- /* relocation data. not all sections will actally have relocation
- info, of course */
- struct Dwarf_P_Per_Reloc_Sect_s de_reloc_sect[NUM_DEBUG_SECTIONS];
- int de_reloc_next_to_return; /* iterator on reloc sections
- (SYMBOLIC output) */
-
- /* used in remembering sections */
- int de_elf_sects[NUM_DEBUG_SECTIONS]; /* elf sect number of
- the section itself, DEBUG_LINE for example */
-
- Dwarf_Unsigned de_sect_name_idx[NUM_DEBUG_SECTIONS]; /* section
- name index or handle for the name of the symbol for
- DEBUG_LINE for example */
-
- int de_offset_reloc; /* offset reloc type, R_MIPS_32 for
- example. Specific to the ABI being
- produced. Relocates offset size
- field */
- int de_exc_reloc; /* reloc type specific to exception
- table relocs. */
- int de_ptr_reloc; /* standard reloc type, R_MIPS_32 for
- example. Specific to the ABI being
- produced. relocates pointer size
- field */
-
- unsigned char de_offset_size; /* section offset. Here to
- avoid test of abi in macro
- at run time MIPS -n32 4,
- -64 8. */
-
- unsigned char de_pointer_size; /* size of pointer in target.
- Here to avoid test of abi in
- macro at run time MIPS -n32
- 4, -64 is 8. */
-
- unsigned char de_is_64bit; /* non-zero if is 64bit. Else 32 bit:
- used for passing this info as a flag
- */
- unsigned char de_relocation_record_size; /* reloc record size
- varies by ABI and
- relocation-output
- method (stream or
- symbolic) */
-
- unsigned char de_64bit_extension; /* non-zero if creating 64 bit
- offsets using dwarf2-99
- extension proposal */
-
- int de_ar_data_attribute_form; /* data8, data4 abi dependent */
- int de_ar_ref_attr_form; /* ref8 ref4 , abi dependent */
-
- /* simple name relocations */
- _dwarf_pro_reloc_name_func_ptr de_reloc_name;
-
- /* relocations for a length, requiring a pair of symbols */
- _dwarf_pro_reloc_length_func_ptr de_reloc_pair;
-
- _dwarf_pro_transform_relocs_func_ptr de_transform_relocs_to_disk;
-
- /* following used for macro buffers */
- unsigned long de_compose_avail;
- unsigned long de_compose_used_len;
-
- unsigned char de_same_endian;
- void *(*de_copy_word) (void *, const void *, size_t);
-
- /* Add new fields at the END of this struct to preserve some hope
- of sensible behavior on dbg passing between DSOs linked with
- mismatched libdwarf producer versions. */
-
- Dwarf_P_Marker de_markers; /* pointer to array of markers */
- unsigned de_marker_n_alloc;
- unsigned de_marker_n_used;
- int de_sect_sa_next_to_return; /* Iterator on sring attrib sects */
- /* String attributes data of each section. */
- struct Dwarf_P_Per_Sect_String_Attrs_s de_sect_string_attr[NUM_DEBUG_SECTIONS];
-};
-
-#define CURRENT_VERSION_STAMP 2
-
-Dwarf_Unsigned _dwarf_add_simple_name_entry(Dwarf_P_Debug dbg,
- Dwarf_P_Die die,
- char *entry_name,
- enum dwarf_sn_kind
- entrykind,
- Dwarf_Error * error);
-
-
-#define DISTINGUISHED_VALUE 0xffffffff /* 64bit extension flag */
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc.h
deleted file mode 100644
index d2e6c6735..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-int _dwarf_pro_pre_alloc_n_reloc_slots(Dwarf_P_Debug dbg,
- int rel_sec_index,
- Dwarf_Unsigned newslots);
-
-int _dwarf_pro_alloc_reloc_slots(Dwarf_P_Debug dbg, int rel_sec_index);
-
-int _dwarf_pro_reloc_get_a_slot(Dwarf_P_Debug dbg,
- int base_sec_index,
- void **relrec_to_fill);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc_stream.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc_stream.h
deleted file mode 100644
index 892ea5baf..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc_stream.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-int _dwarf_pro_reloc_name_stream64(Dwarf_P_Debug dbg, int base_sec_index, Dwarf_Unsigned offset, /* r_offset
- of
- reloc
- */
- Dwarf_Unsigned symidx,
- enum Dwarf_Rel_Type,
- int reltarget_length);
-int _dwarf_pro_reloc_name_stream32(Dwarf_P_Debug dbg, int base_sec_index, Dwarf_Unsigned offset, /* r_offset
- of
- reloc
- */
- Dwarf_Unsigned symidx,
- enum Dwarf_Rel_Type,
- int reltarget_length);
-int _dwarf_pro_reloc_length_stream(Dwarf_P_Debug dbg, int base_sec_index, Dwarf_Unsigned offset, /* r_offset
- of
- reloc
- */
- Dwarf_Unsigned start_symidx,
- Dwarf_Unsigned end_symidx,
- enum Dwarf_Rel_Type,
- int reltarget_length);
-
-int _dwarf_stream_relocs_to_disk(Dwarf_P_Debug dbg,
- Dwarf_Signed * new_sec_count);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc_symbolic.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc_symbolic.h
deleted file mode 100644
index 3d03a4786..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_reloc_symbolic.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-int _dwarf_pro_reloc_name_symbolic(Dwarf_P_Debug dbg, int base_sec_index, Dwarf_Unsigned offset, /* r_offset
- of
- reloc
- */
- Dwarf_Unsigned symidx,
- enum Dwarf_Rel_Type,
- int reltarget_length);
-int
- _dwarf_pro_reloc_length_symbolic(Dwarf_P_Debug dbg, int base_sec_index, Dwarf_Unsigned offset, /* r_offset
- of
- reloc
- */
- Dwarf_Unsigned start_symidx,
- Dwarf_Unsigned end_symidx,
- enum Dwarf_Rel_Type,
- int reltarget_length);
-
-int _dwarf_symbolic_relocs_to_disk(Dwarf_P_Debug dbg,
- Dwarf_Signed * new_sec_count);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_section.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_section.h
deleted file mode 100644
index b37ade44d..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_section.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-
-/* relocation section names */
-extern char *_dwarf_rel_section_names[];
-
-/* section names */
-extern char *_dwarf_sectnames[];
-
-/* struct to hold relocation entries. Its mantained as a linked
- list of relocation structs, and will then be written at as a
- whole into the relocation section. Whether its 32 bit or
- 64 bit will be obtained from Dwarf_Debug pointer.
-*/
-
-
-
-
-
-/*
- struct stores a chunk of data pertaining to a section
-*/
-struct Dwarf_P_Section_Data_s {
- int ds_elf_sect_no; /* elf section number */
- char *ds_data; /* data contained in section */
- unsigned long ds_nbytes; /* bytes of data used so far */
- unsigned long ds_orig_alloc; /* bytes allocated originally */
- Dwarf_P_Section_Data ds_next; /* next on the list */
-};
-
-/* Used to allow a dummy initial struct (which we
- drop before it gets used
- This must not match any legitimate 'section' number.
-*/
-#define MAGIC_SECT_NO -3
-
-/* Size of chunk of data allocated in one alloc
- Not clear if this is the best size.
- Used to be just 4096 for user data, the section data struct
- was a separate malloc.
-*/
-#define CHUNK_SIZE (4096 - sizeof (struct Dwarf_P_Section_Data_s))
-
-/*
- chunk alloc routine -
- if chunk->ds_data is nil, it will alloc CHUNK_SIZE bytes,
- and return pointer to the beginning. If chunk is not nil,
- it will see if there's enoungh space for nbytes in current
- chunk, if not, add new chunk to linked list, and return
- a char * pointer to it. Return null if unsuccessful.
-*/
-Dwarf_Small *_dwarf_pro_buffer(Dwarf_P_Debug dbg, int sectno,
- unsigned long nbytes);
-
-#define GET_CHUNK(dbg,sectno,ptr,nbytes,error) \
- { \
- (ptr) = _dwarf_pro_buffer((dbg),(sectno),(nbytes)); \
- if ((ptr) == NULL) { \
- DWARF_P_DBG_ERROR(dbg,DW_DLE_CHUNK_ALLOC,-1); \
- } \
- }
-
-
-
-int
- _dwarf_transform_arange_to_disk(Dwarf_P_Debug dbg,
- Dwarf_Error * error);
-
-/* These are for creating ELF section type codes.
-*/
-#if defined(linux) || defined(__BEOS__) || !defined(SHT_MIPS_DWARF)
-/* Intel's SoftSdv accepts only this */
-#define SECTION_TYPE SHT_PROGBITS
-#else
-#define SECTION_TYPE SHT_MIPS_DWARF
-#endif
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_types.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_types.h
deleted file mode 100644
index 817609215..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_types.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-/* pro_types.h */
-
-
-int _dwarf_transform_simplename_to_disk(Dwarf_P_Debug dbg, enum dwarf_sn_kind entrykind, int section_index, /* in
- de_elf_sects
- etc
- */
- Dwarf_Error * error);
diff --git a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_util.h b/desmume/src/windows/libelf_libdwarf/libdwarf/pro_util.h
deleted file mode 100644
index 56bde8bda..000000000
--- a/desmume/src/windows/libelf_libdwarf/libdwarf/pro_util.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-
- Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved.
- Portions Copyright 2002-2010 Sun Microsystems, Inc. All rights reserved.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of version 2.1 of the GNU Lesser General Public License
- as published by the Free Software Foundation.
-
- This program is distributed in the hope that it would be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
- Further, this software is distributed without any warranty that it is
- free of the rightful claim of any third person regarding infringement
- or the like. Any license provided herein, whether implied or
- otherwise, applies only to this software file. Patent licenses, if
- any, provided herein do not apply to combinations of this program with
- other software, or any other product whatsoever.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this program; if not, write the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
- USA.
-
- Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane,
- Mountain View, CA 94043, or:
-
- http://www.sgi.com
-
- For further information regarding this notice, see:
-
- http://oss.sgi.com/projects/GenInfo/NoticeExplan
-
-*/
-
-
-
-
-#define IS_64BIT(dbg) ((dbg)->de_flags & DW_DLC_SIZE_64 ? 1 : 0)
-#define ISA_IA64(dbg) ((dbg)->de_flags & DW_DLC_ISA_IA64 ? 1 : 0)
-
-/* definition of sizes of types, given target machine */
-#define sizeof_sbyte(dbg) sizeof(Dwarf_Sbyte)
-#define sizeof_ubyte(dbg) sizeof(Dwarf_Ubyte)
-#define sizeof_uhalf(dbg) sizeof(Dwarf_Half)
-/* certain sizes not defined here, but set in dbg record.
- See pro_init.c
-*/
-
-/* Computes amount of padding necessary to align n to a k-boundary. */
-/* Important: Assumes n, k both GREATER than zero. */
-#define PADDING(n, k) ( (k)-1 - ((n)-1)%(k) )
-
-/* The following defines are only important for users of the
-** producer part of libdwarf, and such should have these
-** defined correctly (as necessary)
-** by the #include done in pro_incl.h
-** before the #include "pro_util.h".
-** For others producer macros do not matter so 0 is a usable value, and
-** zero values let compilation succeed on more non-MIPS architectures.
-** A better approach would be welcome.
-*/
-/* R_MIPS* are #define so #ifndef works */
-/* R_IA_64* are not necessarily #define (might be enum) so #ifndef
- is useless, we use the configure script generating
- HAVE_R_IA_64_DIR32LSB and HAVE_R_IA64_DIR32LSB.
-*/
-#ifndef R_MIPS_64
-#define R_MIPS_64 0
-#endif
-#ifndef R_MIPS_32
-#define R_MIPS_32 0
-#endif
-#ifndef R_MIPS_SCN_DISP
-#define R_MIPS_SCN_DISP 0
-#endif
-
-/* R_IA_64_DIR32LSB came before the now-standard R_IA64_DIR32LSB
- (etc) was defined. This now deals with either form,
- preferring the new form if available. */
-#ifdef HAVE_R_IA64_DIR32LSB
-#define DWARF_PRO_R_IA64_DIR32LSB R_IA64_DIR32LSB
-#define DWARF_PRO_R_IA64_DIR64LSB R_IA64_DIR64LSB
-#define DWARF_PRO_R_IA64_SEGREL64LSB R_IA64_SEGREL64LSB
-#define DWARF_PRO_R_IA64_SEGREL32LSB R_IA64_SEGREL32LSB
-#endif
-#if defined(HAVE_R_IA_64_DIR32LSB) && !defined(HAVE_R_IA64_DIR32LSB)
-#define DWARF_PRO_R_IA64_DIR32LSB R_IA_64_DIR32LSB
-#define DWARF_PRO_R_IA64_DIR64LSB R_IA_64_DIR64LSB
-#define DWARF_PRO_R_IA64_SEGREL64LSB R_IA_64_SEGREL64LSB
-#define DWARF_PRO_R_IA64_SEGREL32LSB R_IA_64_SEGREL32LSB
-#endif
-#if !defined(HAVE_R_IA_64_DIR32LSB) && !defined(HAVE_R_IA64_DIR32LSB)
-#define DWARF_PRO_R_IA64_DIR32LSB 0
-#define DWARF_PRO_R_IA64_DIR64LSB 0
-#define DWARF_PRO_R_IA64_SEGREL64LSB 0
-#define DWARF_PRO_R_IA64_SEGREL32LSB 0
-#endif
-
-/*
- * The default "I don't know" value can't be zero.
- * Because that's the sentinel value that means "no relocation".
- * In order to use this library in 'symbolic relocation mode we
- * don't care if this value is the right relocation value,
- * only that it's non-NULL. So at the end, we define it
- * to something sensible.
- */
-
-
-
-#if defined(sun)
-#if defined(sparc)
-#define Get_REL64_isa(dbg) (R_SPARC_UA64)
-#define Get_REL32_isa(dbg) (R_SPARC_UA32)
-#define Get_REL_SEGREL_isa(dbg) (R_SPARC_NONE) /* I don't know! */
-#else /* i386 */
-#define Get_REL64_isa(dbg) (R_386_32) /* Any non-zero value is ok */
-#define Get_REL32_isa(dbg) (R_386_32)
-#define Get_REL_SEGREL_isa(dbg) (R_386_NONE) /* I don't know! */
-#endif /* sparc || i386 */
-#else /* !sun */
-#ifdef HAVE_SYS_IA64_ELF_H
-#define Get_REL64_isa(dbg) (ISA_IA64(dbg) ? \
- DWARF_PRO_R_IA64_DIR64LSB : R_MIPS_64)
-#define Get_REL32_isa(dbg) (ISA_IA64(dbg) ? \
- DWARF_PRO_R_IA64_DIR32LSB : R_MIPS_32)
-
-
-/* ia64 uses 32bit dwarf offsets for sections */
-#define Get_REL_SEGREL_isa(dbg) (ISA_IA64(dbg) ? \
- DWARF_PRO_R_IA64_SEGREL32LSB : R_MIPS_SCN_DISP)
-#else /* HAVE_SYS_IA64_ELF_H */
-
-#if !defined(linux) && !defined(__BEOS__)
-#define Get_REL64_isa(dbg) (R_MIPS_64)
-#define Get_REL32_isa(dbg) (R_MIPS_32)
-#define Get_REL_SEGREL_isa(dbg) (R_MIPS_SCN_DISP)
-#else
-#define Get_REL64_isa(dbg) (1)
-#define Get_REL32_isa(dbg) (1) /* these are used on linux */
-#define Get_REL_SEGREL_isa(dbg) (1) /* non zero values, see comments above */
-#endif
-
-#endif /* HAVE_SYS_IA64_ELF_H */
-#endif /* !sun */
-
-
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/byteswap.h b/desmume/src/windows/libelf_libdwarf/libelf/byteswap.h
deleted file mode 100644
index 7526d1233..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/byteswap.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-byteswap.h - functions and macros for byte swapping.
-Copyright (C) 1995 - 2001 Michael Riepe
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-*/
-
-/* @(#) $Id: byteswap.h,v 1.7 2008/05/23 08:15:34 michael Exp $ */
-
-#ifndef _BYTESWAP_H
-#define _BYTESWAP_H
-
-#define lu(from,i,s) (((__libelf_u32_t)((unsigned char*)(from))[i])<<(s))
-#define li(from,i,s) (((__libelf_i32_t)(( signed char*)(from))[i])<<(s))
-
-#define __load_u16L(from) ((__libelf_u32_t) \
- (lu(from,1,8) | lu(from,0,0)))
-#define __load_u16M(from) ((__libelf_u32_t) \
- (lu(from,0,8) | lu(from,1,0)))
-#define __load_i16L(from) ((__libelf_i32_t) \
- (li(from,1,8) | lu(from,0,0)))
-#define __load_i16M(from) ((__libelf_i32_t) \
- (li(from,0,8) | lu(from,1,0)))
-
-#define __load_u32L(from) ((__libelf_u32_t) \
- (lu(from,3,24) | lu(from,2,16) | lu(from,1,8) | lu(from,0,0)))
-#define __load_u32M(from) ((__libelf_u32_t) \
- (lu(from,0,24) | lu(from,1,16) | lu(from,2,8) | lu(from,3,0)))
-#define __load_i32L(from) ((__libelf_i32_t) \
- (li(from,3,24) | lu(from,2,16) | lu(from,1,8) | lu(from,0,0)))
-#define __load_i32M(from) ((__libelf_i32_t) \
- (li(from,0,24) | lu(from,1,16) | lu(from,2,8) | lu(from,3,0)))
-
-#define su(to,i,v,s) (((char*)(to))[i]=((__libelf_u32_t)(v)>>(s)))
-#define si(to,i,v,s) (((char*)(to))[i]=((__libelf_i32_t)(v)>>(s)))
-
-#define __store_u16L(to,v) \
- (su(to,1,v,8), su(to,0,v,0))
-#define __store_u16M(to,v) \
- (su(to,0,v,8), su(to,1,v,0))
-#define __store_i16L(to,v) \
- (si(to,1,v,8), si(to,0,v,0))
-#define __store_i16M(to,v) \
- (si(to,0,v,8), si(to,1,v,0))
-
-#define __store_u32L(to,v) \
- (su(to,3,v,24), su(to,2,v,16), su(to,1,v,8), su(to,0,v,0))
-#define __store_u32M(to,v) \
- (su(to,0,v,24), su(to,1,v,16), su(to,2,v,8), su(to,3,v,0))
-#define __store_i32L(to,v) \
- (si(to,3,v,24), si(to,2,v,16), si(to,1,v,8), si(to,0,v,0))
-#define __store_i32M(to,v) \
- (si(to,0,v,24), si(to,1,v,16), si(to,2,v,8), si(to,3,v,0))
-
-#if __LIBELF64
-
-/*
- * conversion functions from swap64.c
- */
-extern __libelf_u64_t _elf_load_u64L(const unsigned char *from);
-extern __libelf_u64_t _elf_load_u64M(const unsigned char *from);
-extern __libelf_i64_t _elf_load_i64L(const unsigned char *from);
-extern __libelf_i64_t _elf_load_i64M(const unsigned char *from);
-extern void _elf_store_u64L(unsigned char *to, __libelf_u64_t v);
-extern void _elf_store_u64M(unsigned char *to, __libelf_u64_t v);
-extern void _elf_store_i64L(unsigned char *to, __libelf_u64_t v);
-extern void _elf_store_i64M(unsigned char *to, __libelf_u64_t v);
-
-/*
- * aliases for existing conversion code
- */
-#define __load_u64L _elf_load_u64L
-#define __load_u64M _elf_load_u64M
-#define __load_i64L _elf_load_i64L
-#define __load_i64M _elf_load_i64M
-#define __store_u64L _elf_store_u64L
-#define __store_u64M _elf_store_u64M
-#define __store_i64L _elf_store_i64L
-#define __store_i64M _elf_store_i64M
-
-#endif /* __LIBELF64 */
-
-#endif /* _BYTESWAP_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/elf_repl.h b/desmume/src/windows/libelf_libdwarf/libelf/elf_repl.h
deleted file mode 100644
index c5cf90f7a..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/elf_repl.h
+++ /dev/null
@@ -1,996 +0,0 @@
-/*
- * elf_repl.h - public header file for systems that lack it.
- * Copyright (C) 1995 - 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* @(#) $Id: elf_repl.h,v 1.22 2009/11/01 13:04:19 michael Exp $ */
-
-/*
- * NEVER INCLUDE THIS FILE DIRECTLY - USE INSTEAD!
- */
-
-#ifndef _ELF_REPL_H
-#define _ELF_REPL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * Scalar data types
- */
-typedef __libelf_u32_t Elf32_Addr;
-typedef __libelf_u16_t Elf32_Half;
-typedef __libelf_u32_t Elf32_Off;
-typedef __libelf_i32_t Elf32_Sword;
-typedef __libelf_u32_t Elf32_Word;
-
-#define ELF32_FSZ_ADDR 4
-#define ELF32_FSZ_HALF 2
-#define ELF32_FSZ_OFF 4
-#define ELF32_FSZ_SWORD 4
-#define ELF32_FSZ_WORD 4
-
-#if __LIBELF64
-
-typedef __libelf_u64_t Elf64_Addr;
-typedef __libelf_u16_t Elf64_Half;
-typedef __libelf_u64_t Elf64_Off;
-typedef __libelf_i32_t Elf64_Sword;
-typedef __libelf_u32_t Elf64_Word;
-typedef __libelf_i64_t Elf64_Sxword;
-typedef __libelf_u64_t Elf64_Xword;
-
-#define ELF64_FSZ_ADDR 8
-#define ELF64_FSZ_HALF 2
-#define ELF64_FSZ_OFF 8
-#define ELF64_FSZ_SWORD 4
-#define ELF64_FSZ_WORD 4
-#define ELF64_FSZ_SXWORD 8
-#define ELF64_FSZ_XWORD 8
-
-/*
- * Blame Sun for this...
- */
-typedef __libelf_u64_t Elf64_Lword;
-typedef __libelf_u64_t Elf32_Lword;
-
-#endif /* __LIBELF64 */
-
-/*
- * ELF header
- */
-#define EI_NIDENT 16
-
-typedef struct {
- unsigned char e_ident[EI_NIDENT];
- Elf32_Half e_type;
- Elf32_Half e_machine;
- Elf32_Word e_version;
- Elf32_Addr e_entry;
- Elf32_Off e_phoff;
- Elf32_Off e_shoff;
- Elf32_Word e_flags;
- Elf32_Half e_ehsize;
- Elf32_Half e_phentsize;
- Elf32_Half e_phnum;
- Elf32_Half e_shentsize;
- Elf32_Half e_shnum;
- Elf32_Half e_shstrndx;
-} Elf32_Ehdr;
-
-#if __LIBELF64
-typedef struct {
- unsigned char e_ident[EI_NIDENT];
- Elf64_Half e_type;
- Elf64_Half e_machine;
- Elf64_Word e_version;
- Elf64_Addr e_entry;
- Elf64_Off e_phoff;
- Elf64_Off e_shoff;
- Elf64_Word e_flags;
- Elf64_Half e_ehsize;
- Elf64_Half e_phentsize;
- Elf64_Half e_phnum;
- Elf64_Half e_shentsize;
- Elf64_Half e_shnum;
- Elf64_Half e_shstrndx;
-} Elf64_Ehdr;
-#endif /* __LIBELF64 */
-
-/*
- * e_ident
- */
-#define EI_MAG0 0
-#define EI_MAG1 1
-#define EI_MAG2 2
-#define EI_MAG3 3
-#define EI_CLASS 4
-#define EI_DATA 5
-#define EI_VERSION 6
-#define EI_OSABI 7
-#define EI_ABIVERSION 8
-#define EI_PAD 9
-
-#define ELFMAG0 0x7f
-#define ELFMAG1 'E'
-#define ELFMAG2 'L'
-#define ELFMAG3 'F'
-#define ELFMAG "\177ELF"
-#define SELFMAG 4
-
-/*
- * e_ident[EI_CLASS]
- */
-#define ELFCLASSNONE 0
-#define ELFCLASS32 1
-#define ELFCLASS64 2
-#define ELFCLASSNUM 3
-
-/*
- * e_ident[EI_DATA]
- */
-#define ELFDATANONE 0
-#define ELFDATA2LSB 1
-#define ELFDATA2MSB 2
-#define ELFDATANUM 3
-
-/*
- * e_ident[EI_OSABI]
- */
-#define ELFOSABI_NONE 0 /* No extensions or unspecified */
-#define ELFOSABI_SYSV ELFOSABI_NONE
-#define ELFOSABI_HPUX 1 /* Hewlett-Packard HP-UX */
-#define ELFOSABI_NETBSD 2 /* NetBSD */
-#define ELFOSABI_LINUX 3 /* Linux */
-#define ELFOSABI_SOLARIS 6 /* Sun Solaris */
-#define ELFOSABI_AIX 7 /* AIX */
-#define ELFOSABI_IRIX 8 /* IRIX */
-#define ELFOSABI_FREEBSD 9 /* FreeBSD */
-#define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX */
-#define ELFOSABI_MODESTO 11 /* Novell Modesto */
-#define ELFOSABI_OPENBSD 12 /* Open BSD */
-#define ELFOSABI_OPENVMS 13 /* Open VMS */
-#define ELFOSABI_NSK 14 /* Hewlett-Packard Non-Stop Kernel */
-#define ELFOSABI_AROS 15 /* Amiga Research OS */
-/* these are probably obsolete: */
-#define ELFOSABI_ARM 97 /* ARM */
-#define ELFOSABI_STANDALONE 255 /* standalone (embedded) application */
-
-
-/*
- * e_type
- */
-#define ET_NONE 0
-#define ET_REL 1
-#define ET_EXEC 2
-#define ET_DYN 3
-#define ET_CORE 4
-#define ET_NUM 5
-#define ET_LOOS 0xfe00
-#define ET_HIOS 0xfeff
-#define ET_LOPROC 0xff00
-#define ET_HIPROC 0xffff
-
-/*
- * e_machine
- */
-#define EM_NONE 0 /* No machine */
-#define EM_M32 1 /* AT&T WE 32100 */
-#define EM_SPARC 2 /* SPARC */
-#define EM_386 3 /* Intel 80386 */
-#define EM_68K 4 /* Motorola 68000 */
-#define EM_88K 5 /* Motorola 88000 */
-#define EM_486 6 /* Intel i486 (DO NOT USE THIS ONE) */
-#define EM_860 7 /* Intel 80860 */
-#define EM_MIPS 8 /* MIPS I Architecture */
-#define EM_S370 9 /* IBM System/370 Processor */
-#define EM_MIPS_RS3_LE 10 /* MIPS RS3000 Little-endian */
-#define EM_SPARC64 11 /* SPARC 64-bit */
-#define EM_PARISC 15 /* Hewlett-Packard PA-RISC */
-#define EM_VPP500 17 /* Fujitsu VPP500 */
-#define EM_SPARC32PLUS 18 /* Enhanced instruction set SPARC */
-#define EM_960 19 /* Intel 80960 */
-#define EM_PPC 20 /* PowerPC */
-#define EM_PPC64 21 /* 64-bit PowerPC */
-#define EM_S390 22 /* IBM System/390 Processor */
-#define EM_V800 36 /* NEC V800 */
-#define EM_FR20 37 /* Fujitsu FR20 */
-#define EM_RH32 38 /* TRW RH-32 */
-#define EM_RCE 39 /* Motorola RCE */
-#define EM_ARM 40 /* Advanced RISC Machines ARM */
-#define EM_ALPHA 41 /* Digital Alpha */
-#define EM_SH 42 /* Hitachi SH */
-#define EM_SPARCV9 43 /* SPARC Version 9 */
-#define EM_TRICORE 44 /* Siemens TriCore embedded processor */
-#define EM_ARC 45 /* Argonaut RISC Core, Argonaut Technologies Inc. */
-#define EM_H8_300 46 /* Hitachi H8/300 */
-#define EM_H8_300H 47 /* Hitachi H8/300H */
-#define EM_H8S 48 /* Hitachi H8S */
-#define EM_H8_500 49 /* Hitachi H8/500 */
-#define EM_IA_64 50 /* Intel IA-64 processor architecture */
-#define EM_MIPS_X 51 /* Stanford MIPS-X */
-#define EM_COLDFIRE 52 /* Motorola ColdFire */
-#define EM_68HC12 53 /* Motorola M68HC12 */
-#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator */
-#define EM_PCP 55 /* Siemens PCP */
-#define EM_NCPU 56 /* Sony nCPU embedded RISC processor */
-#define EM_NDR1 57 /* Denso NDR1 microprocessor */
-#define EM_STARCORE 58 /* Motorola Star*Core processor */
-#define EM_ME16 59 /* Toyota ME16 processor */
-#define EM_ST100 60 /* STMicroelectronics ST100 processor */
-#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ embedded processor family */
-#define EM_X86_64 62 /* AMD x86-64 architecture */
-#define EM_AMD64 EM_X86_64
-#define EM_PDSP 63 /* Sony DSP Processor */
-#define EM_FX66 66 /* Siemens FX66 microcontroller */
-#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 bit microcontroller */
-#define EM_ST7 68 /* STMicroelectronics ST7 8-bit microcontroller */
-#define EM_68HC16 69 /* Motorola MC68HC16 Microcontroller */
-#define EM_68HC11 70 /* Motorola MC68HC11 Microcontroller */
-#define EM_68HC08 71 /* Motorola MC68HC08 Microcontroller */
-#define EM_68HC05 72 /* Motorola MC68HC05 Microcontroller */
-#define EM_SVX 73 /* Silicon Graphics SVx */
-#define EM_ST19 74 /* STMicroelectronics ST19 8-bit microcontroller */
-#define EM_VAX 75 /* Digital VAX */
-#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */
-#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */
-#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */
-#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */
-#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
-#define EM_HUANY 81 /* Harvard University machine-independent object files */
-#define EM_PRISM 82 /* SiTera Prism */
-#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
-#define EM_FR30 84 /* Fujitsu FR30 */
-#define EM_D10V 85 /* Mitsubishi D10V */
-#define EM_D30V 86 /* Mitsubishi D30V */
-#define EM_V850 87 /* NEC v850 */
-#define EM_M32R 88 /* Mitsubishi M32R */
-#define EM_MN10300 89 /* Matsushita MN10300 */
-#define EM_MN10200 90 /* Matsushita MN10200 */
-#define EM_PJ 91 /* picoJava */
-#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
-#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
-#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
-#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor */
-#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor */
-#define EM_NS32K 97 /* National Semiconductor 32000 series */
-#define EM_TPC 98 /* Tenor Network TPC processor */
-#define EM_SNP1K 99 /* Trebia SNP 1000 processor */
-#define EM_ST200 100 /* STMicroelectronics (www.st.com) ST200 microcontroller */
-#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family */
-#define EM_MAX 102 /* MAX Processor */
-#define EM_CR 103 /* National Semiconductor CompactRISC microprocessor */
-#define EM_F2MC16 104 /* Fujitsu F2MC16 */
-#define EM_MSP430 105 /* Texas Instruments embedded microcontroller msp430 */
-#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor */
-#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors */
-#define EM_SEP 108 /* Sharp embedded microprocessor */
-#define EM_ARCA 109 /* Arca RISC Microprocessor */
-#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */
-#define EM_NUM 111
-
-/*
- * e_ident[EI_VERSION], e_version
- */
-#define EV_NONE 0
-#define EV_CURRENT 1
-#define EV_NUM 2
-
-/*
- * Section header
- */
-typedef struct {
- Elf32_Word sh_name;
- Elf32_Word sh_type;
- Elf32_Word sh_flags;
- Elf32_Addr sh_addr;
- Elf32_Off sh_offset;
- Elf32_Word sh_size;
- Elf32_Word sh_link;
- Elf32_Word sh_info;
- Elf32_Word sh_addralign;
- Elf32_Word sh_entsize;
-} Elf32_Shdr;
-
-#if __LIBELF64
-typedef struct {
- Elf64_Word sh_name;
- Elf64_Word sh_type;
- Elf64_Xword sh_flags;
- Elf64_Addr sh_addr;
- Elf64_Off sh_offset;
- Elf64_Xword sh_size;
- Elf64_Word sh_link;
- Elf64_Word sh_info;
- Elf64_Xword sh_addralign;
- Elf64_Xword sh_entsize;
-} Elf64_Shdr;
-#endif /* __LIBELF64 */
-
-/*
- * Special section indices
- */
-#define SHN_UNDEF 0
-#define SHN_LORESERVE 0xff00
-#define SHN_LOPROC 0xff00
-#define SHN_HIPROC 0xff1f
-#define SHN_LOOS 0xff20
-#define SHN_HIOS 0xff3f
-#define SHN_ABS 0xfff1
-#define SHN_COMMON 0xfff2
-#define SHN_XINDEX 0xffff
-#define SHN_HIRESERVE 0xffff
-
-/*
- * sh_type
- */
-#define SHT_NULL 0
-#define SHT_PROGBITS 1
-#define SHT_SYMTAB 2
-#define SHT_STRTAB 3
-#define SHT_RELA 4
-#define SHT_HASH 5
-#define SHT_DYNAMIC 6
-#define SHT_NOTE 7
-#define SHT_NOBITS 8
-#define SHT_REL 9
-#define SHT_SHLIB 10
-#define SHT_DYNSYM 11
-#define SHT_INIT_ARRAY 14
-#define SHT_FINI_ARRAY 15
-#define SHT_PREINIT_ARRAY 16
-#define SHT_GROUP 17
-#define SHT_SYMTAB_SHNDX 18
-#define SHT_NUM 19
-#define SHT_LOOS 0x60000000
-#define SHT_HIOS 0x6fffffff
-#define SHT_LOPROC 0x70000000
-#define SHT_HIPROC 0x7fffffff
-#define SHT_LOUSER 0x80000000
-#define SHT_HIUSER 0xffffffff
-
-/*
- * Solaris extensions
- */
-#define SHT_LOSUNW 0x6ffffff4
-#define SHT_SUNW_dof 0x6ffffff4
-#define SHT_SUNW_cap 0x6ffffff5
-#define SHT_SUNW_SIGNATURE 0x6ffffff6
-#define SHT_SUNW_ANNOTATE 0x6ffffff7
-#define SHT_SUNW_DEBUGSTR 0x6ffffff8
-#define SHT_SUNW_DEBUG 0x6ffffff9
-#define SHT_SUNW_move 0x6ffffffa
-#define SHT_SUNW_COMDAT 0x6ffffffb
-#define SHT_SUNW_syminfo 0x6ffffffc
-#define SHT_SUNW_verdef 0x6ffffffd
-#define SHT_SUNW_verneed 0x6ffffffe
-#define SHT_SUNW_versym 0x6fffffff
-#define SHT_HISUNW 0x6fffffff
-
-#define SHT_SPARC_GOTDATA 0x70000000
-#define SHT_AMD64_UNWIND 0x70000001
-
-/*
- * GNU extensions
- */
-#define SHT_GNU_verdef 0x6ffffffd
-#define SHT_GNU_verneed 0x6ffffffe
-#define SHT_GNU_versym 0x6fffffff
-
-/*
- * sh_flags
- */
-#define SHF_WRITE 0x1
-#define SHF_ALLOC 0x2
-#define SHF_EXECINSTR 0x4
-#define SHF_MERGE 0x10
-#define SHF_STRINGS 0x20
-#define SHF_INFO_LINK 0x40
-#define SHF_LINK_ORDER 0x80
-#define SHF_OS_NONCONFORMING 0x100
-#define SHF_GROUP 0x200
-#define SHF_TLS 0x400
-#define SHF_MASKOS 0x0ff00000
-#define SHF_MASKPROC 0xf0000000
-
-/*
- * Solaris extensions
- */
-#define SHF_AMD64_LARGE 0x10000000
-#define SHF_ORDERED 0x40000000
-#define SHF_EXCLUDE 0x80000000
-
-/*
- * Section group flags
- */
-#define GRP_COMDAT 0x1
-#define GRP_MASKOS 0x0ff00000
-#define GRP_MASKPROC 0xf0000000
-
-/*
- * Symbol table
- */
-typedef struct {
- Elf32_Word st_name;
- Elf32_Addr st_value;
- Elf32_Word st_size;
- unsigned char st_info;
- unsigned char st_other;
- Elf32_Half st_shndx;
-} Elf32_Sym;
-
-#if __LIBELF64
-typedef struct {
- Elf64_Word st_name;
- unsigned char st_info;
- unsigned char st_other;
- Elf64_Half st_shndx;
- Elf64_Addr st_value;
- Elf64_Xword st_size;
-} Elf64_Sym;
-#endif /* __LIBELF64 */
-
-/*
- * Special symbol indices
- */
-#define STN_UNDEF 0
-
-/*
- * Macros for manipulating st_info
- */
-#define ELF32_ST_BIND(i) ((i)>>4)
-#define ELF32_ST_TYPE(i) ((i)&0xf)
-#define ELF32_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
-
-#if __LIBELF64
-#define ELF64_ST_BIND(i) ((i)>>4)
-#define ELF64_ST_TYPE(i) ((i)&0xf)
-#define ELF64_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
-#endif /* __LIBELF64 */
-
-/*
- * Symbol binding
- */
-#define STB_LOCAL 0
-#define STB_GLOBAL 1
-#define STB_WEAK 2
-#define STB_NUM 3
-#define STB_LOOS 10
-#define STB_HIOS 12
-#define STB_LOPROC 13
-#define STB_HIPROC 15
-
-/*
- * Symbol types
- */
-#define STT_NOTYPE 0
-#define STT_OBJECT 1
-#define STT_FUNC 2
-#define STT_SECTION 3
-#define STT_FILE 4
-#define STT_COMMON 5
-#define STT_TLS 6
-#define STT_NUM 7
-#define STT_LOOS 10
-#define STT_HIOS 12
-#define STT_LOPROC 13
-#define STT_HIPROC 15
-
-/*
- * Macros for manipulating st_other
- */
-#define ELF32_ST_VISIBILITY(o) ((o)&0x3)
-#if __LIBELF64
-#define ELF64_ST_VISIBILITY(o) ((o)&0x3)
-#endif /* __LIBELF64 */
-
-/*
- * Symbol visibility
- */
-#define STV_DEFAULT 0
-#define STV_INTERNAL 1
-#define STV_HIDDEN 2
-#define STV_PROTECTED 3
-
-/*
- * Relocation
- */
-typedef struct {
- Elf32_Addr r_offset;
- Elf32_Word r_info;
-} Elf32_Rel;
-
-typedef struct {
- Elf32_Addr r_offset;
- Elf32_Word r_info;
- Elf32_Sword r_addend;
-} Elf32_Rela;
-
-#if __LIBELF64
-typedef struct {
- Elf64_Addr r_offset;
- Elf64_Xword r_info;
-} Elf64_Rel;
-
-typedef struct {
- Elf64_Addr r_offset;
- Elf64_Xword r_info;
- Elf64_Sxword r_addend;
-} Elf64_Rela;
-#endif /* __LIBELF64 */
-
-/*
- * Macros for manipulating r_info
- */
-#define ELF32_R_SYM(i) ((i)>>8)
-#define ELF32_R_TYPE(i) ((unsigned char)(i))
-#define ELF32_R_INFO(s,t) (((s)<<8)+(unsigned char)(t))
-
-#if __LIBELF64
-#define ELF64_R_SYM(i) ((Elf64_Xword)(i)>>32)
-#define ELF64_R_TYPE(i) ((i)&0xffffffffL)
-#define ELF64_R_INFO(s,t) (((Elf64_Xword)(s)<<32)+((t)&0xffffffffL))
-#endif /* __LIBELF64 */
-
-/*
- * Note entry header
- */
-typedef struct {
- Elf32_Word n_namesz; /* name size */
- Elf32_Word n_descsz; /* descriptor size */
- Elf32_Word n_type; /* descriptor type */
-} Elf32_Nhdr;
-
-#if __LIBELF64
-/* Solaris and GNU use this layout. Be compatible. */
-/* XXX: Latest ELF specs say it's 64-bit!!! */
-typedef struct {
- Elf64_Word n_namesz; /* name size */
- Elf64_Word n_descsz; /* descriptor size */
- Elf64_Word n_type; /* descriptor type */
-} Elf64_Nhdr;
-#endif /* __LIBELF64 */
-
-/*
- * Well-known descriptor types for ET_CORE files
- */
-#define NT_PRSTATUS 1
-#define NT_PRFPREG 2
-#define NT_PRPSINFO 3
-
-/*
- * Program header
- */
-typedef struct {
- Elf32_Word p_type;
- Elf32_Off p_offset;
- Elf32_Addr p_vaddr;
- Elf32_Addr p_paddr;
- Elf32_Word p_filesz;
- Elf32_Word p_memsz;
- Elf32_Word p_flags;
- Elf32_Word p_align;
-} Elf32_Phdr;
-
-#if __LIBELF64
-typedef struct {
- Elf64_Word p_type;
- Elf64_Word p_flags;
- Elf64_Off p_offset;
- Elf64_Addr p_vaddr;
- Elf64_Addr p_paddr;
- Elf64_Xword p_filesz;
- Elf64_Xword p_memsz;
- Elf64_Xword p_align;
-} Elf64_Phdr;
-#endif /* __LIBELF64 */
-
-/*
- * Special numbers
- */
-#define PN_XNUM 0xffff
-
-/*
- * p_type
- */
-#define PT_NULL 0
-#define PT_LOAD 1
-#define PT_DYNAMIC 2
-#define PT_INTERP 3
-#define PT_NOTE 4
-#define PT_SHLIB 5
-#define PT_PHDR 6
-#define PT_TLS 7
-#define PT_NUM 8
-#define PT_LOOS 0x60000000
-#define PT_HIOS 0x6fffffff
-#define PT_LOPROC 0x70000000
-#define PT_HIPROC 0x7fffffff
-
-/*
- * Solaris extensions
- */
-
-#define PT_SUNW_UNWIND 0x6464e550
-#define PT_LOSUNW 0x6ffffffa
-#define PT_SUNWBSS 0x6ffffffa
-#define PT_SUNWSTACK 0x6ffffffb
-#define PT_SUNWDTRACE 0x6ffffffc
-#define PT_SUNWCAP 0x6ffffffd
-#define PT_HISUNW 0x6fffffff
-
-/*
- * p_flags
- */
-#define PF_X 0x1
-#define PF_W 0x2
-#define PF_R 0x4
-#define PF_MASKOS 0x0ff00000
-#define PF_MASKPROC 0xf0000000
-
-/*
- * Dynamic structure
- */
-typedef struct {
- Elf32_Sword d_tag;
- union {
- Elf32_Word d_val;
- Elf32_Addr d_ptr;
- } d_un;
-} Elf32_Dyn;
-
-#if __LIBELF64
-typedef struct {
- Elf64_Sxword d_tag;
- union {
- Elf64_Xword d_val;
- Elf64_Addr d_ptr;
- } d_un;
-} Elf64_Dyn;
-#endif /* __LIBELF64 */
-
-/*
- * Dynamic array tags
- */
- /* d_un exec shared */
-#define DT_NULL 0 /* ign. mand. mand. */
-#define DT_NEEDED 1 /* d_val opt. opt. */
-#define DT_PLTRELSZ 2 /* d_val opt. opt. */
-#define DT_PLTGOT 3 /* d_ptr opt. opt. */
-#define DT_HASH 4 /* d_ptr mand. mand. */
-#define DT_STRTAB 5 /* d_ptr mand. mand. */
-#define DT_SYMTAB 6 /* d_ptr mand. mand. */
-#define DT_RELA 7 /* d_ptr mand. opt. */
-#define DT_RELASZ 8 /* d_val mand. opt. */
-#define DT_RELAENT 9 /* d_val mand. opt. */
-#define DT_STRSZ 10 /* d_val mand. mand. */
-#define DT_SYMENT 11 /* d_val mand. mand. */
-#define DT_INIT 12 /* d_ptr opt. opt. */
-#define DT_FINI 13 /* d_ptr opt. opt. */
-#define DT_SONAME 14 /* d_val ign. opt. */
-#define DT_RPATH 15 /* d_val opt. ign. */
-#define DT_SYMBOLIC 16 /* ign. ign. opt. */
-#define DT_REL 17 /* d_ptr mand. opt. */
-#define DT_RELSZ 18 /* d_val mand. opt. */
-#define DT_RELENT 19 /* d_val mand. opt. */
-#define DT_PLTREL 20 /* d_val opt. opt. */
-#define DT_DEBUG 21 /* d_ptr opt. ign. */
-#define DT_TEXTREL 22 /* ign. opt. opt. */
-#define DT_JMPREL 23 /* d_ptr opt. opt. */
-#define DT_BIND_NOW 24 /* ign. opt. opt. */
-#define DT_INIT_ARRAY 25 /* d_ptr opt. opt. */
-#define DT_FINI_ARRAY 26 /* d_ptr opt. opt. */
-#define DT_INIT_ARRAYSZ 27 /* d_val opt. opt. */
-#define DT_FINI_ARRAYSZ 28 /* d_val opt. opt. */
-#define DT_RUNPATH 29 /* d_val opt. opt. */
-#define DT_FLAGS 30 /* d_val opt. opt. */
-#define DT_ENCODING 32 /* odd/even encoding rule starts here */
-#define DT_PREINIT_ARRAY 32 /* d_ptr opt. ign. */
-#define DT_PREINIT_ARRAYSZ 33 /* d_val opt. ign. */
-#define DT_NUM 34
-#define DT_LOOS 0x6000000D
-#define DT_HIOS 0x6ffff000
-#define DT_LOPROC 0x70000000
-#define DT_HIPROC 0x7fffffff
-
-/*
- * DT_FLAGS values
- */
-#define DF_ORIGIN 0x1
-#define DF_SYMBOLIC 0x2
-#define DF_TEXTREL 0x4
-#define DF_BIND_NOW 0x8
-#define DF_STATIC_TLS 0x10
-
-/*
- * Solaris extensions
- */
-#define DT_VALRNGLO 0x6ffffd00
-#define DT_CHECKSUM 0x6ffffdf8
-#define DT_PLTPADSZ 0x6ffffdf9
-#define DT_MOVEENT 0x6ffffdfa
-#define DT_MOVESZ 0x6ffffdfb
-#define DT_FEATURE_1 0x6ffffdfc
-#define DT_POSFLAG_1 0x6ffffdfd
-#define DT_SYMINSZ 0x6ffffdfe
-#define DT_SYMINENT 0x6ffffdff
-#define DT_VALRNGHI 0x6ffffdff
-
-#define DT_ADDRRNGLO 0x6ffffe00
-#define DT_CONFIG 0x6ffffefa
-#define DT_DEPAUDIT 0x6ffffefb
-#define DT_AUDIT 0x6ffffefc
-#define DT_PLTPAD 0x6ffffefd
-#define DT_MOVETAB 0x6ffffefe
-#define DT_SYMINFO 0x6ffffeff
-#define DT_ADDRRNGHI 0x6ffffeff
-
-#define DT_RELACOUNT 0x6ffffff9
-#define DT_RELCOUNT 0x6ffffffa
-#define DT_FLAGS_1 0x6ffffffb
-#define DT_VERDEF 0x6ffffffc
-#define DT_VERDEFNUM 0x6ffffffd
-#define DT_VERNEED 0x6ffffffe
-#define DT_VERNEEDNUM 0x6fffffff
-
-#define DT_AUXILIARY 0x7ffffffd
-#define DT_USED 0x7ffffffe
-#define DT_FILTER 0x7fffffff
-
-/*
- * GNU extensions
- */
-#define DT_VERSYM 0x6ffffff0
-
-/*
- * DT_FEATURE_1 values
- */
-#define DTF_1_PARINIT 0x1
-#define DTF_1_CONFEXP 0x2
-
-/*
- * DT_POSFLAG_1 values
- */
-#define DF_P1_LAZYLOAD 0x1
-#define DF_P1_GROUPPERM 0x2
-
-/*
- * DT_FLAGS_1 values
- */
-#define DF_1_NOW 0x00000001
-#define DF_1_GLOBAL 0x00000002
-#define DF_1_GROUP 0x00000004
-#define DF_1_NODELETE 0x00000008
-#define DF_1_LOADFLTR 0x00000010
-#define DF_1_INITFIRST 0x00000020
-#define DF_1_NOOPEN 0x00000040
-#define DF_1_ORIGIN 0x00000080
-#define DF_1_DIRECT 0x00000100
-#define DF_1_TRANS 0x00000200
-#define DF_1_INTERPOSE 0x00000400
-#define DF_1_NODEFLIB 0x00000800
-#define DF_1_NODUMP 0x00001000
-#define DF_1_CONFALT 0x00002000
-#define DF_1_ENDFILTEE 0x00004000
-#define DF_1_DISPRELDNE 0x00008000
-#define DF_1_DISPRELPND 0x00010000
-
-/*
- * Syminfo structure
- */
-typedef struct {
- Elf32_Half si_boundto;
- Elf32_Half si_flags;
-} Elf32_Syminfo;
-
-#if __LIBELF64
-typedef struct {
- Elf64_Half si_boundto;
- Elf64_Half si_flags;
-} Elf64_Syminfo;
-#endif /* __LIBELF64 */
-
-/*
- * Syminfo version (stored in unused first entry)
- */
-#define SYMINFO_NONE 0
-#define SYMINFO_CURRENT 1
-#define SYMINFO_NUM 2
-
-/*
- * si_boundto special values
- */
-#define SYMINFO_BT_LOWRESERVE 0xff00
-#define SYMINFO_BT_PARENT 0xfffe /* bound to parent */
-#define SYMINFO_BT_SELF 0xffff /* bound to self */
-
-/*
- * si_flags
- */
-#define SYMINFO_FLG_DIRECT 0x01 /* bound to an object */
-#define SYMINFO_FLG_PASSTHRU 0x02 /* pass-thru symbol */
-#define SYMINFO_FLG_COPY 0x04 /* result of a copy relocation */
-#define SYMINFO_FLG_LAZYLOAD 0x08 /* bound to lazy-loaded object */
-
-/*
- * Version definitions
- */
-typedef struct {
- Elf32_Half vd_version;
- Elf32_Half vd_flags;
- Elf32_Half vd_ndx;
- Elf32_Half vd_cnt;
- Elf32_Word vd_hash;
- Elf32_Word vd_aux;
- Elf32_Word vd_next;
-} Elf32_Verdef;
-
-typedef struct {
- Elf32_Word vda_name;
- Elf32_Word vda_next;
-} Elf32_Verdaux;
-
-typedef struct {
- Elf32_Half vn_version;
- Elf32_Half vn_cnt;
- Elf32_Word vn_file;
- Elf32_Word vn_aux;
- Elf32_Word vn_next;
-} Elf32_Verneed;
-
-typedef struct {
- Elf32_Word vna_hash;
- Elf32_Half vna_flags;
- Elf32_Half vna_other;
- Elf32_Word vna_name;
- Elf32_Word vna_next;
-} Elf32_Vernaux;
-
-typedef Elf32_Half Elf32_Versym;
-
-#if __LIBELF64
-
-typedef struct {
- Elf64_Half vd_version;
- Elf64_Half vd_flags;
- Elf64_Half vd_ndx;
- Elf64_Half vd_cnt;
- Elf64_Word vd_hash;
- Elf64_Word vd_aux;
- Elf64_Word vd_next;
-} Elf64_Verdef;
-
-typedef struct {
- Elf64_Word vda_name;
- Elf64_Word vda_next;
-} Elf64_Verdaux;
-
-typedef struct {
- Elf64_Half vn_version;
- Elf64_Half vn_cnt;
- Elf64_Word vn_file;
- Elf64_Word vn_aux;
- Elf64_Word vn_next;
-} Elf64_Verneed;
-
-typedef struct {
- Elf64_Word vna_hash;
- Elf64_Half vna_flags;
- Elf64_Half vna_other;
- Elf64_Word vna_name;
- Elf64_Word vna_next;
-} Elf64_Vernaux;
-
-typedef Elf64_Half Elf64_Versym;
-
-#endif /* __LIBELF64 */
-
-/*
- * vd_version
- */
-#define VER_DEF_NONE 0
-#define VER_DEF_CURRENT 1
-#define VER_DEF_NUM 2
-
-/*
- * vn_version
- */
-#define VER_NEED_NONE 0
-#define VER_NEED_CURRENT 1
-#define VER_NEED_NUM 2
-
-/*
- * vd_flags / vna_flags
- */
-#define VER_FLG_BASE 0x1 /* vd_flags only */
-#define VER_FLG_WEAK 0x2
-
-/*
- * Elf*_Versym special values
- */
-#define VER_NDX_LOCAL 0
-#define VER_NDX_GLOBAL 1
-
-/*
- * Solaris extensions
- */
-
-/*
- * Move section
- */
-#if __LIBELF64
-
-typedef struct {
- Elf32_Lword m_value;
- Elf32_Word m_info;
- Elf32_Word m_poffset;
- Elf32_Half m_repeat;
- Elf32_Half m_stride;
-} Elf32_Move;
-
-typedef struct {
- Elf64_Lword m_value;
- Elf64_Xword m_info;
- Elf64_Xword m_poffset;
- Elf64_Half m_repeat;
- Elf64_Half m_stride;
-} Elf64_Move;
-
-#define ELF32_M_SYM(info) ((info)>>8)
-#define ELF32_M_SIZE(info) ((unsigned char)(info))
-#define ELF32_M_INFO(sym, sz) (((sym)<<8)+(unsigned char)(sz))
-
-#define ELF64_M_SYM(info) ((Elf64_Xword)(info)>>8)
-#define ELF64_M_SIZE(info) ((unsigned char)(info))
-#define ELF64_M_INFO(sym, sz) (((Elf64_Xword)(sym)<<8)+(unsigned char)(sz))
-
-#endif /* __LIBELF64 */
-
-/*
- * Capabilities
- */
-
-typedef struct {
- Elf32_Word c_tag;
- union {
- Elf32_Word c_val;
- Elf32_Addr c_ptr;
- } c_un;
-} Elf32_Cap;
-
-#if __LIBELF64
-
-typedef struct {
- Elf64_Xword c_tag;
- union {
- Elf64_Xword c_val;
- Elf64_Addr c_ptr;
- } c_un;
-} Elf64_Cap;
-
-#endif /* __LIBELF64 */
-
-#define CA_SUNW_NULL 0 /* c_un ignored */
-#define CA_SUNW_HW_1 1 /* c_un.c_val */
-#define CA_SUNW_SF_1 2 /* c_un.c_val */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _ELF_REPL_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/errors.h b/desmume/src/windows/libelf_libdwarf/libelf/errors.h
deleted file mode 100644
index 80ee70b92..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/errors.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * errors.h - exhaustive list of all error codes and messages for libelf.
- * Copyright (C) 1995 - 2003, 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* @(#) $Id: errors.h,v 1.18 2008/05/23 08:15:34 michael Exp $ */
-
-/* dummy for xgettext */
-#define _(str) str
-
-__err__(ERROR_OK, _("no error"))
-__err__(ERROR_UNKNOWN, _("unknown error"))
-__err__(ERROR_INTERNAL, _("Internal error: unknown reason"))
-__err__(ERROR_UNIMPLEMENTED, _("Internal error: not implemented"))
-__err__(ERROR_WRONLY, _("Request error: cntl(ELF_C_FDREAD) on write-only file"))
-__err__(ERROR_INVALID_CMD, _("Request error: invalid ELF_C_* argument"))
-__err__(ERROR_FDDISABLED, _("Request error: file descriptor disabled"))
-__err__(ERROR_NOTARCHIVE, _("Request error: not an archive"))
-__err__(ERROR_BADOFF, _("Request error: offset out of range"))
-__err__(ERROR_UNKNOWN_VERSION, _("Request error: unknown ELF version"))
-__err__(ERROR_CMDMISMATCH, _("Request error: ELF_C_* argument does not match"))
-__err__(ERROR_MEMBERWRITE, _("Request error: archive member begin() for writing"))
-__err__(ERROR_FDMISMATCH, _("Request error: archive/member file descriptor mismatch"))
-__err__(ERROR_NOTELF, _("Request error: not an ELF file"))
-__err__(ERROR_CLASSMISMATCH, _("Request error: class file/memory mismatch"))
-__err__(ERROR_UNKNOWN_TYPE, _("Request error: invalid ELF_T_* argument"))
-__err__(ERROR_UNKNOWN_ENCODING, _("Request error: unknown data encoding"))
-__err__(ERROR_DST2SMALL, _("Request error: destination buffer too small"))
-__err__(ERROR_NULLBUF, _("Request error: d_buf is NULL"))
-__err__(ERROR_UNKNOWN_CLASS, _("Request error: unknown ELF class"))
-__err__(ERROR_ELFSCNMISMATCH, _("Request error: section does not belong to file"))
-__err__(ERROR_NOSUCHSCN, _("Request error: no section at index"))
-__err__(ERROR_NULLSCN, _("Request error: can't manipulate null section"))
-__err__(ERROR_SCNDATAMISMATCH, _("Request error: data does not belong to section"))
-__err__(ERROR_NOSTRTAB, _("Request error: no string table"))
-__err__(ERROR_BADSTROFF, _("Request error: string table offset out of range"))
-__err__(ERROR_RDONLY, _("Request error: update(ELF_C_WRITE) on read-only file"))
-__err__(ERROR_IO_SEEK, _("I/O error: seek"))
-__err__(ERROR_IO_2BIG, _("I/O error: file too big for memory"))
-__err__(ERROR_IO_READ, _("I/O error: raw read"))
-__err__(ERROR_IO_GETSIZE, _("I/O error: get file size"))
-__err__(ERROR_IO_WRITE, _("I/O error: output write"))
-__err__(ERROR_IO_TRUNC, _("I/O error: can't truncate output file"))
-__err__(ERROR_VERSION_UNSET, _("Sequence error: must set ELF version first"))
-__err__(ERROR_NOEHDR, _("Sequence error: must create ELF header first"))
-__err__(ERROR_OUTSIDE, _("Format error: reference outside file"))
-__err__(ERROR_TRUNC_ARHDR, _("Format error: archive header truncated"))
-__err__(ERROR_ARFMAG, _("Format error: archive fmag"))
-__err__(ERROR_ARHDR, _("Format error: archive header"))
-__err__(ERROR_TRUNC_MEMBER, _("Format error: archive member truncated"))
-__err__(ERROR_SIZE_ARSYMTAB, _("Format error: archive symbol table size"))
-__err__(ERROR_ARSTRTAB, _("Format error: archive string table"))
-__err__(ERROR_ARSPECIAL, _("Format error: archive special name unknown"))
-__err__(ERROR_TRUNC_EHDR, _("Format error: ELF header truncated"))
-__err__(ERROR_TRUNC_PHDR, _("Format error: program header table truncated"))
-__err__(ERROR_TRUNC_SHDR, _("Format error: section header table truncated"))
-__err__(ERROR_TRUNC_SCN, _("Format error: data region truncated"))
-__err__(ERROR_ALIGN_PHDR, _("Format error: program header table alignment"))
-__err__(ERROR_ALIGN_SHDR, _("Format error: section header table alignment"))
-__err__(ERROR_VERDEF_FORMAT, _("Format error: bad parameter in Verdef record"))
-__err__(ERROR_VERDEF_VERSION, _("Format error: unknown Verdef version"))
-__err__(ERROR_VERNEED_FORMAT, _("Format error: bad parameter in Verneed record"))
-__err__(ERROR_VERNEED_VERSION, _("Format error: unknown Verneed version"))
-__err__(ERROR_EHDR_SHNUM, _("Format error: bad e_shnum value"))
-__err__(ERROR_EHDR_SHENTSIZE, _("Format error: bad e_shentsize value"))
-__err__(ERROR_EHDR_PHENTSIZE, _("Format error: bad e_phentsize value"))
-__err__(ERROR_UNTERM, _("Format error: unterminated string in string table"))
-__err__(ERROR_SCN2SMALL, _("Layout error: section size too small for data"))
-__err__(ERROR_SCN_OVERLAP, _("Layout error: overlapping sections"))
-__err__(ERROR_MEM_ELF, _("Memory error: elf descriptor"))
-__err__(ERROR_MEM_ARSYMTAB, _("Memory error: archive symbol table"))
-__err__(ERROR_MEM_ARHDR, _("Memory error: archive member header"))
-__err__(ERROR_MEM_EHDR, _("Memory error: ELF header"))
-__err__(ERROR_MEM_PHDR, _("Memory error: program header table"))
-__err__(ERROR_MEM_SHDR, _("Memory error: section header table"))
-__err__(ERROR_MEM_SCN, _("Memory error: section descriptor"))
-__err__(ERROR_MEM_SCNDATA, _("Memory error: section data"))
-__err__(ERROR_MEM_OUTBUF, _("Memory error: output file space"))
-__err__(ERROR_MEM_TEMPORARY, _("Memory error: temporary buffer"))
-__err__(ERROR_BADVALUE, _("GElf error: value out of range"))
-__err__(ERROR_BADINDEX, _("GElf error: index out of range"))
-__err__(ERROR_BADTYPE, _("GElf error: type mismatch"))
-__err__(ERROR_MEM_SYM, _("GElf error: not enough memory for GElf_Sym"))
-__err__(ERROR_MEM_DYN, _("GElf error: not enough memory for GElf_Dyn"))
-__err__(ERROR_MEM_RELA, _("GElf error: not enough memory for GElf_Rela"))
-__err__(ERROR_MEM_REL, _("GElf error: not enough memory for GElf_Rel"))
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/ext_types.h b/desmume/src/windows/libelf_libdwarf/libelf/ext_types.h
deleted file mode 100644
index ead116db0..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/ext_types.h
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
-ext_types.h - external representation of ELF data types.
-Copyright (C) 1995 - 1998 Michael Riepe
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-*/
-
-/* @(#) $Id: ext_types.h,v 1.9 2008/05/23 08:15:34 michael Exp $ */
-
-#ifndef _EXT_TYPES_H
-#define _EXT_TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/*
- * Scalar data types
- */
-typedef unsigned char __ext_Elf32_Addr [ELF32_FSZ_ADDR];
-typedef unsigned char __ext_Elf32_Half [ELF32_FSZ_HALF];
-typedef unsigned char __ext_Elf32_Off [ELF32_FSZ_OFF];
-typedef unsigned char __ext_Elf32_Sword [ELF32_FSZ_SWORD];
-typedef unsigned char __ext_Elf32_Word [ELF32_FSZ_WORD];
-
-#if __LIBELF64
-
-typedef unsigned char __ext_Elf32_Lword [8];
-
-typedef unsigned char __ext_Elf64_Addr [ELF64_FSZ_ADDR];
-typedef unsigned char __ext_Elf64_Half [ELF64_FSZ_HALF];
-typedef unsigned char __ext_Elf64_Off [ELF64_FSZ_OFF];
-typedef unsigned char __ext_Elf64_Sword [ELF64_FSZ_SWORD];
-typedef unsigned char __ext_Elf64_Word [ELF64_FSZ_WORD];
-typedef unsigned char __ext_Elf64_Sxword[ELF64_FSZ_SXWORD];
-typedef unsigned char __ext_Elf64_Xword [ELF64_FSZ_XWORD];
-
-typedef unsigned char __ext_Elf64_Lword [8];
-
-#endif /* __LIBELF64 */
-
-/*
- * ELF header
- */
-typedef struct {
- unsigned char e_ident[EI_NIDENT];
- __ext_Elf32_Half e_type;
- __ext_Elf32_Half e_machine;
- __ext_Elf32_Word e_version;
- __ext_Elf32_Addr e_entry;
- __ext_Elf32_Off e_phoff;
- __ext_Elf32_Off e_shoff;
- __ext_Elf32_Word e_flags;
- __ext_Elf32_Half e_ehsize;
- __ext_Elf32_Half e_phentsize;
- __ext_Elf32_Half e_phnum;
- __ext_Elf32_Half e_shentsize;
- __ext_Elf32_Half e_shnum;
- __ext_Elf32_Half e_shstrndx;
-} __ext_Elf32_Ehdr;
-
-#if __LIBELF64
-typedef struct {
- unsigned char e_ident[EI_NIDENT];
- __ext_Elf64_Half e_type;
- __ext_Elf64_Half e_machine;
- __ext_Elf64_Word e_version;
- __ext_Elf64_Addr e_entry;
- __ext_Elf64_Off e_phoff;
- __ext_Elf64_Off e_shoff;
- __ext_Elf64_Word e_flags;
- __ext_Elf64_Half e_ehsize;
- __ext_Elf64_Half e_phentsize;
- __ext_Elf64_Half e_phnum;
- __ext_Elf64_Half e_shentsize;
- __ext_Elf64_Half e_shnum;
- __ext_Elf64_Half e_shstrndx;
-} __ext_Elf64_Ehdr;
-#endif /* __LIBELF64 */
-
-/*
- * Section header
- */
-typedef struct {
- __ext_Elf32_Word sh_name;
- __ext_Elf32_Word sh_type;
- __ext_Elf32_Word sh_flags;
- __ext_Elf32_Addr sh_addr;
- __ext_Elf32_Off sh_offset;
- __ext_Elf32_Word sh_size;
- __ext_Elf32_Word sh_link;
- __ext_Elf32_Word sh_info;
- __ext_Elf32_Word sh_addralign;
- __ext_Elf32_Word sh_entsize;
-} __ext_Elf32_Shdr;
-
-#if __LIBELF64
-typedef struct {
- __ext_Elf64_Word sh_name;
- __ext_Elf64_Word sh_type;
- __ext_Elf64_Xword sh_flags;
- __ext_Elf64_Addr sh_addr;
- __ext_Elf64_Off sh_offset;
- __ext_Elf64_Xword sh_size;
- __ext_Elf64_Word sh_link;
- __ext_Elf64_Word sh_info;
- __ext_Elf64_Xword sh_addralign;
- __ext_Elf64_Xword sh_entsize;
-} __ext_Elf64_Shdr;
-#endif /* __LIBELF64 */
-
-/*
- * Symbol table
- */
-typedef struct {
- __ext_Elf32_Word st_name;
- __ext_Elf32_Addr st_value;
- __ext_Elf32_Word st_size;
- unsigned char st_info;
- unsigned char st_other;
- __ext_Elf32_Half st_shndx;
-} __ext_Elf32_Sym;
-
-#if __LIBELF64
-typedef struct {
- __ext_Elf64_Word st_name;
- unsigned char st_info;
- unsigned char st_other;
- __ext_Elf64_Half st_shndx;
- __ext_Elf64_Addr st_value;
- __ext_Elf64_Xword st_size;
-} __ext_Elf64_Sym;
-#endif /* __LIBELF64 */
-
-/*
- * Relocation
- */
-typedef struct {
- __ext_Elf32_Addr r_offset;
- __ext_Elf32_Word r_info;
-} __ext_Elf32_Rel;
-
-typedef struct {
- __ext_Elf32_Addr r_offset;
- __ext_Elf32_Word r_info;
- __ext_Elf32_Sword r_addend;
-} __ext_Elf32_Rela;
-
-#if __LIBELF64
-typedef struct {
- __ext_Elf64_Addr r_offset;
-#if __LIBELF64_IRIX
- __ext_Elf64_Word r_sym;
- unsigned char r_ssym;
- unsigned char r_type3;
- unsigned char r_type2;
- unsigned char r_type;
-#else /* __LIBELF64_IRIX */
- __ext_Elf64_Xword r_info;
-#endif /* __LIBELF64_IRIX */
-} __ext_Elf64_Rel;
-
-typedef struct {
- __ext_Elf64_Addr r_offset;
-#if __LIBELF64_IRIX
- __ext_Elf64_Word r_sym;
- unsigned char r_ssym;
- unsigned char r_type3;
- unsigned char r_type2;
- unsigned char r_type;
-#else /* __LIBELF64_IRIX */
- __ext_Elf64_Xword r_info;
-#endif /* __LIBELF64_IRIX */
- __ext_Elf64_Sxword r_addend;
-} __ext_Elf64_Rela;
-#endif /* __LIBELF64 */
-
-/*
- * Program header
- */
-typedef struct {
- __ext_Elf32_Word p_type;
- __ext_Elf32_Off p_offset;
- __ext_Elf32_Addr p_vaddr;
- __ext_Elf32_Addr p_paddr;
- __ext_Elf32_Word p_filesz;
- __ext_Elf32_Word p_memsz;
- __ext_Elf32_Word p_flags;
- __ext_Elf32_Word p_align;
-} __ext_Elf32_Phdr;
-
-#if __LIBELF64
-typedef struct {
- __ext_Elf64_Word p_type;
- __ext_Elf64_Word p_flags;
- __ext_Elf64_Off p_offset;
- __ext_Elf64_Addr p_vaddr;
- __ext_Elf64_Addr p_paddr;
- __ext_Elf64_Xword p_filesz;
- __ext_Elf64_Xword p_memsz;
- __ext_Elf64_Xword p_align;
-} __ext_Elf64_Phdr;
-#endif /* __LIBELF64 */
-
-/*
- * Dynamic structure
- */
-typedef struct {
- __ext_Elf32_Sword d_tag;
- union {
- __ext_Elf32_Word d_val;
- __ext_Elf32_Addr d_ptr;
- } d_un;
-} __ext_Elf32_Dyn;
-
-#if __LIBELF64
-typedef struct {
- __ext_Elf64_Sxword d_tag;
- union {
- __ext_Elf64_Xword d_val;
- __ext_Elf64_Addr d_ptr;
- } d_un;
-} __ext_Elf64_Dyn;
-#endif /* __LIBELF64 */
-
-/*
- * Version definitions
- */
-typedef struct {
- __ext_Elf32_Half vd_version;
- __ext_Elf32_Half vd_flags;
- __ext_Elf32_Half vd_ndx;
- __ext_Elf32_Half vd_cnt;
- __ext_Elf32_Word vd_hash;
- __ext_Elf32_Word vd_aux;
- __ext_Elf32_Word vd_next;
-} __ext_Elf32_Verdef;
-
-typedef struct {
- __ext_Elf32_Word vda_name;
- __ext_Elf32_Word vda_next;
-} __ext_Elf32_Verdaux;
-
-typedef struct {
- __ext_Elf32_Half vn_version;
- __ext_Elf32_Half vn_cnt;
- __ext_Elf32_Word vn_file;
- __ext_Elf32_Word vn_aux;
- __ext_Elf32_Word vn_next;
-} __ext_Elf32_Verneed;
-
-typedef struct {
- __ext_Elf32_Word vna_hash;
- __ext_Elf32_Half vna_flags;
- __ext_Elf32_Half vna_other;
- __ext_Elf32_Word vna_name;
- __ext_Elf32_Word vna_next;
-} __ext_Elf32_Vernaux;
-
-#if __LIBELF64
-
-typedef struct {
- __ext_Elf64_Half vd_version;
- __ext_Elf64_Half vd_flags;
- __ext_Elf64_Half vd_ndx;
- __ext_Elf64_Half vd_cnt;
- __ext_Elf64_Word vd_hash;
- __ext_Elf64_Word vd_aux;
- __ext_Elf64_Word vd_next;
-} __ext_Elf64_Verdef;
-
-typedef struct {
- __ext_Elf64_Word vda_name;
- __ext_Elf64_Word vda_next;
-} __ext_Elf64_Verdaux;
-
-typedef struct {
- __ext_Elf64_Half vn_version;
- __ext_Elf64_Half vn_cnt;
- __ext_Elf64_Word vn_file;
- __ext_Elf64_Word vn_aux;
- __ext_Elf64_Word vn_next;
-} __ext_Elf64_Verneed;
-
-typedef struct {
- __ext_Elf64_Word vna_hash;
- __ext_Elf64_Half vna_flags;
- __ext_Elf64_Half vna_other;
- __ext_Elf64_Word vna_name;
- __ext_Elf64_Word vna_next;
-} __ext_Elf64_Vernaux;
-
-#endif /* __LIBELF64 */
-
-/*
- * Move section
- */
-#if __LIBELF64
-
-typedef struct {
- __ext_Elf32_Lword m_value;
- __ext_Elf32_Word m_info;
- __ext_Elf32_Word m_poffset;
- __ext_Elf32_Half m_repeat;
- __ext_Elf32_Half m_stride;
-} __ext_Elf32_Move;
-
-typedef struct {
- __ext_Elf64_Lword m_value;
- __ext_Elf64_Xword m_info;
- __ext_Elf64_Xword m_poffset;
- __ext_Elf64_Half m_repeat;
- __ext_Elf64_Half m_stride;
-} __ext_Elf64_Move;
-
-#endif /* __LIBELF64 */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _EXT_TYPES_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/gelf.h b/desmume/src/windows/libelf_libdwarf/libelf/gelf.h
deleted file mode 100644
index 5af055899..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/gelf.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * gelf.h - public header file for libelf.
- * Copyright (C) 2000 - 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* @(#) $Id: gelf.h,v 1.16 2008/05/23 08:15:34 michael Exp $ */
-
-#ifndef _GELF_H
-#define _GELF_H
-
-#if __LIBELF_INTERNAL__
-#include
-#else /* __LIBELF_INTERNAL__ */
-#include
-#endif /* __LIBELF_INTERNAL__ */
-
-#if __LIBELF_NEED_LINK_H
-#include
-#elif __LIBELF_NEED_SYS_LINK_H
-#include
-#endif /* __LIBELF_NEED_LINK_H */
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifndef __P
-# if (__STDC__ + 0) || defined(__cplusplus) || defined(_WIN32)
-# define __P(args) args
-# else /* __STDC__ || defined(__cplusplus) */
-# define __P(args) ()
-# endif /* __STDC__ || defined(__cplusplus) */
-#endif /* __P */
-
-#if !__LIBELF64
-
-#error "GElf is not supported on this system."
-
-#else /* __LIBELF64 */
-
-typedef Elf64_Addr GElf_Addr;
-typedef Elf64_Half GElf_Half;
-typedef Elf64_Off GElf_Off;
-typedef Elf64_Sword GElf_Sword;
-typedef Elf64_Word GElf_Word;
-typedef Elf64_Sxword GElf_Sxword;
-typedef Elf64_Xword GElf_Xword;
-
-typedef Elf64_Ehdr GElf_Ehdr;
-typedef Elf64_Phdr GElf_Phdr;
-typedef Elf64_Shdr GElf_Shdr;
-typedef Elf64_Dyn GElf_Dyn;
-typedef Elf64_Rel GElf_Rel;
-typedef Elf64_Rela GElf_Rela;
-typedef Elf64_Sym GElf_Sym;
-
-/*
- * Symbol versioning
- */
-#if __LIBELF_SYMBOL_VERSIONS
-typedef Elf64_Verdef GElf_Verdef;
-typedef Elf64_Verneed GElf_Verneed;
-typedef Elf64_Verdaux GElf_Verdaux;
-typedef Elf64_Vernaux GElf_Vernaux;
-#endif /* __LIBELF_SYMBOL_VERSIONS */
-
-/*
- * These types aren't implemented (yet)
- *
-typedef Elf64_Move GElf_Move;
-typedef Elf64_Syminfo GElf_Syminfo;
- */
-
-/*
- * Generic macros
- */
-#define GELF_ST_BIND ELF64_ST_BIND
-#define GELF_ST_TYPE ELF64_ST_TYPE
-#define GELF_ST_INFO ELF64_ST_INFO
-
-#define GELF_R_TYPE ELF64_R_TYPE
-#define GELF_R_SYM ELF64_R_SYM
-#define GELF_R_INFO ELF64_R_INFO
-
-/*
- * Function declarations
- */
-extern int gelf_getclass __P((Elf *__elf));
-
-extern size_t gelf_fsize __P((Elf *__elf, Elf_Type __type, size_t __count, unsigned __ver));
-
-extern Elf_Data *gelf_xlatetof __P((Elf *__elf, Elf_Data *__dst, const Elf_Data *__src, unsigned __encode));
-extern Elf_Data *gelf_xlatetom __P((Elf *__elf, Elf_Data *__dst, const Elf_Data *__src, unsigned __encode));
-
-extern GElf_Ehdr *gelf_getehdr __P((Elf *__elf, GElf_Ehdr *__dst));
-extern int gelf_update_ehdr __P((Elf *__elf, GElf_Ehdr *__src));
-extern unsigned long gelf_newehdr __P((Elf *__elf, int __elfclass));
-
-extern GElf_Phdr *gelf_getphdr __P((Elf *__elf, int ndx, GElf_Phdr *__dst));
-extern int gelf_update_phdr __P((Elf *__elf, int ndx, GElf_Phdr *__src));
-extern unsigned long gelf_newphdr __P((Elf *__elf, size_t __phnum));
-
-extern GElf_Shdr *gelf_getshdr __P((Elf_Scn *__scn, GElf_Shdr *__dst));
-extern int gelf_update_shdr __P((Elf_Scn *__scn, GElf_Shdr *__src));
-
-extern GElf_Dyn *gelf_getdyn __P((Elf_Data *__src, int __ndx, GElf_Dyn *__dst));
-extern int gelf_update_dyn __P((Elf_Data *__dst, int __ndx, GElf_Dyn *__src));
-
-extern GElf_Rel *gelf_getrel __P((Elf_Data *__src, int __ndx, GElf_Rel *__dst));
-extern int gelf_update_rel __P((Elf_Data *__dst, int __ndx, GElf_Rel *__src));
-
-extern GElf_Rela *gelf_getrela __P((Elf_Data *__src, int __ndx, GElf_Rela *__dst));
-extern int gelf_update_rela __P((Elf_Data *__dst, int __ndx, GElf_Rela *__src));
-
-extern GElf_Sym *gelf_getsym __P((Elf_Data *__src, int __ndx, GElf_Sym *__dst));
-extern int gelf_update_sym __P((Elf_Data *__dst, int __ndx, GElf_Sym *__src));
-
-extern long gelf_checksum __P((Elf *__elf));
-
-/*
- * These functions aren't implemented (yet)
- *
-extern GElf_Move *gelf_getmove __P((Elf_Data *__src, int __ndx, GElf_Move *__src));
-extern int gelf_update_move __P((Elf_Data *__dst, int __ndx, GElf_Move *__src));
- *
-extern GElf_Syminfo* gelf_getsyminfo __P((Elf_Data *__src, int __ndx, GElf_Syminfo *__dst));
-extern int gelf_update_syminfo __P((Elf_Data *__dst, int __ndx, GElf_Syminfo *__src));
- */
-
-/*
- * Extensions (not available in other versions of libelf)
- */
-extern size_t gelf_msize __P((Elf *__elf, Elf_Type __type, size_t __count, unsigned __ver));
-
-#endif /* __LIBELF64 */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _GELF_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/libelf.h b/desmume/src/windows/libelf_libdwarf/libelf/libelf.h
deleted file mode 100644
index 3ebd0f3f9..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/libelf.h
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * libelf.h - public header file for libelf.
- * Copyright (C) 1995 - 2008 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* @(#) $Id: libelf.h,v 1.29 2009/07/07 17:57:43 michael Exp $ */
-
-#ifndef _LIBELF_H
-#define _LIBELF_H
-
-#include /* for size_t */
-#include
-
-#if __LIBELF_INTERNAL__
-#include
-#else /* __LIBELF_INTERNAL__ */
-#include
-#endif /* __LIBELF_INTERNAL__ */
-
-#if defined __GNUC__ && !defined __cplusplus
-#define DEPRECATED __attribute__((deprecated))
-#else
-#define DEPRECATED /* nothing */
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#ifndef __P
-# if (__STDC__ + 0) || defined(__cplusplus) || defined(_WIN32)
-# define __P(args) args
-# else /* __STDC__ || defined(__cplusplus) */
-# define __P(args) ()
-# endif /* __STDC__ || defined(__cplusplus) */
-#endif /* __P */
-
-/*
- * Commands
- */
-typedef enum {
- ELF_C_NULL = 0, /* must be first, 0 */
- ELF_C_READ,
- ELF_C_WRITE,
- ELF_C_CLR,
- ELF_C_SET,
- ELF_C_FDDONE,
- ELF_C_FDREAD,
- ELF_C_RDWR,
- ELF_C_NUM /* must be last */
-} Elf_Cmd;
-
-/*
- * Flags
- */
-#define ELF_F_DIRTY 0x1
-#define ELF_F_LAYOUT 0x4
-/*
- * Allow sections to overlap when ELF_F_LAYOUT is in effect.
- * Note that this flag ist NOT portable, and that it may render
- * the output file unusable. Use with extreme caution!
- */
-#define ELF_F_LAYOUT_OVERLAP 0x10000000
-
-/*
- * File types
- */
-typedef enum {
- ELF_K_NONE = 0, /* must be first, 0 */
- ELF_K_AR,
- ELF_K_COFF,
- ELF_K_ELF,
- ELF_K_NUM /* must be last */
-} Elf_Kind;
-
-/*
- * Data types
- */
-typedef enum {
- ELF_T_BYTE = 0, /* must be first, 0 */
- ELF_T_ADDR,
- ELF_T_DYN,
- ELF_T_EHDR,
- ELF_T_HALF,
- ELF_T_OFF,
- ELF_T_PHDR,
- ELF_T_RELA,
- ELF_T_REL,
- ELF_T_SHDR,
- ELF_T_SWORD,
- ELF_T_SYM,
- ELF_T_WORD,
- /*
- * New stuff for 64-bit.
- *
- * Most implementations add ELF_T_SXWORD after ELF_T_SWORD
- * which breaks binary compatibility with earlier versions.
- * If this causes problems for you, contact me.
- */
- ELF_T_SXWORD,
- ELF_T_XWORD,
- /*
- * Symbol versioning. Sun broke binary compatibility (again!),
- * but I won't.
- */
- ELF_T_VDEF,
- ELF_T_VNEED,
- ELF_T_NUM /* must be last */
-} Elf_Type;
-
-/*
- * Elf descriptor
- */
-typedef struct Elf Elf;
-
-/*
- * Section descriptor
- */
-typedef struct Elf_Scn Elf_Scn;
-
-/*
- * Archive member header
- */
-typedef struct {
- char* ar_name;
- time_t ar_date;
- long ar_uid;
- long ar_gid;
- unsigned long ar_mode;
- off_t ar_size;
- char* ar_rawname;
-} Elf_Arhdr;
-
-/*
- * Archive symbol table
- */
-typedef struct {
- char* as_name;
- size_t as_off;
- unsigned long as_hash;
-} Elf_Arsym;
-
-/*
- * Data descriptor
- */
-typedef struct {
- void* d_buf;
- Elf_Type d_type;
- size_t d_size;
- off_t d_off;
- size_t d_align;
- unsigned d_version;
-} Elf_Data;
-
-/*
- * Function declarations
- */
-extern Elf *elf_begin __P((int __fd, Elf_Cmd __cmd, Elf *__ref));
-extern Elf *elf_memory __P((char *__image, size_t __size));
-extern int elf_cntl __P((Elf *__elf, Elf_Cmd __cmd));
-extern int elf_end __P((Elf *__elf));
-extern const char *elf_errmsg __P((int __err));
-extern int elf_errno __P((void));
-extern void elf_fill __P((int __fill));
-extern unsigned elf_flagdata __P((Elf_Data *__data, Elf_Cmd __cmd,
- unsigned __flags));
-extern unsigned elf_flagehdr __P((Elf *__elf, Elf_Cmd __cmd,
- unsigned __flags));
-extern unsigned elf_flagelf __P((Elf *__elf, Elf_Cmd __cmd,
- unsigned __flags));
-extern unsigned elf_flagphdr __P((Elf *__elf, Elf_Cmd __cmd,
- unsigned __flags));
-extern unsigned elf_flagscn __P((Elf_Scn *__scn, Elf_Cmd __cmd,
- unsigned __flags));
-extern unsigned elf_flagshdr __P((Elf_Scn *__scn, Elf_Cmd __cmd,
- unsigned __flags));
-extern size_t elf32_fsize __P((Elf_Type __type, size_t __count,
- unsigned __ver));
-extern Elf_Arhdr *elf_getarhdr __P((Elf *__elf));
-extern Elf_Arsym *elf_getarsym __P((Elf *__elf, size_t *__ptr));
-extern off_t elf_getbase __P((Elf *__elf));
-extern Elf_Data *elf_getdata __P((Elf_Scn *__scn, Elf_Data *__data));
-extern Elf32_Ehdr *elf32_getehdr __P((Elf *__elf));
-extern char *elf_getident __P((Elf *__elf, size_t *__ptr));
-extern Elf32_Phdr *elf32_getphdr __P((Elf *__elf));
-extern Elf_Scn *elf_getscn __P((Elf *__elf, size_t __index));
-extern Elf32_Shdr *elf32_getshdr __P((Elf_Scn *__scn));
-extern unsigned long elf_hash __P((const unsigned char *__name));
-extern Elf_Kind elf_kind __P((Elf *__elf));
-extern size_t elf_ndxscn __P((Elf_Scn *__scn));
-extern Elf_Data *elf_newdata __P((Elf_Scn *__scn));
-extern Elf32_Ehdr *elf32_newehdr __P((Elf *__elf));
-extern Elf32_Phdr *elf32_newphdr __P((Elf *__elf, size_t __count));
-extern Elf_Scn *elf_newscn __P((Elf *__elf));
-extern Elf_Cmd elf_next __P((Elf *__elf));
-extern Elf_Scn *elf_nextscn __P((Elf *__elf, Elf_Scn *__scn));
-extern size_t elf_rand __P((Elf *__elf, size_t __offset));
-extern Elf_Data *elf_rawdata __P((Elf_Scn *__scn, Elf_Data *__data));
-extern char *elf_rawfile __P((Elf *__elf, size_t *__ptr));
-extern char *elf_strptr __P((Elf *__elf, size_t __section, size_t __offset));
-extern off_t elf_update __P((Elf *__elf, Elf_Cmd __cmd));
-extern unsigned elf_version __P((unsigned __ver));
-extern Elf_Data *elf32_xlatetof __P((Elf_Data *__dst, const Elf_Data *__src,
- unsigned __encode));
-extern Elf_Data *elf32_xlatetom __P((Elf_Data *__dst, const Elf_Data *__src,
- unsigned __encode));
-
-/*
- * Additional functions found on Solaris
- */
-extern long elf32_checksum __P((Elf *__elf));
-
-#if __LIBELF64
-/*
- * 64-bit ELF functions
- * Not available on all platforms
- */
-extern Elf64_Ehdr *elf64_getehdr __P((Elf *__elf));
-extern Elf64_Ehdr *elf64_newehdr __P((Elf *__elf));
-extern Elf64_Phdr *elf64_getphdr __P((Elf *__elf));
-extern Elf64_Phdr *elf64_newphdr __P((Elf *__elf, size_t __count));
-extern Elf64_Shdr *elf64_getshdr __P((Elf_Scn *__scn));
-extern size_t elf64_fsize __P((Elf_Type __type, size_t __count,
- unsigned __ver));
-extern Elf_Data *elf64_xlatetof __P((Elf_Data *__dst, const Elf_Data *__src,
- unsigned __encode));
-extern Elf_Data *elf64_xlatetom __P((Elf_Data *__dst, const Elf_Data *__src,
- unsigned __encode));
-
-/*
- * Additional functions found on Solaris
- */
-extern long elf64_checksum __P((Elf *__elf));
-
-#endif /* __LIBELF64 */
-
-/*
- * ELF format extensions
- *
- * These functions return 0 on failure, 1 on success. Since other
- * implementations of libelf may behave differently (there was quite
- * some confusion about the correct values), they are now officially
- * deprecated and should be replaced with the three new functions below.
- */
-DEPRECATED extern int elf_getphnum __P((Elf *__elf, size_t *__resultp));
-DEPRECATED extern int elf_getshnum __P((Elf *__elf, size_t *__resultp));
-DEPRECATED extern int elf_getshstrndx __P((Elf *__elf, size_t *__resultp));
-/*
- * Replacement functions (return -1 on failure, 0 on success).
- */
-extern int elf_getphdrnum __P((Elf *__elf, size_t *__resultp));
-extern int elf_getshdrnum __P((Elf *__elf, size_t *__resultp));
-extern int elf_getshdrstrndx __P((Elf *__elf, size_t *__resultp));
-
-/*
- * Convenience functions
- *
- * elfx_update_shstrndx is elf_getshstrndx's counterpart.
- * It should be used to set the e_shstrndx member.
- * There is no update function for e_shnum or e_phnum
- * because libelf handles them internally.
- */
-extern int elfx_update_shstrndx __P((Elf *__elf, size_t __index));
-
-/*
- * Experimental extensions:
- *
- * elfx_movscn() moves section `__scn' directly after section `__after'.
- * elfx_remscn() removes section `__scn'. Both functions update
- * the section indices; elfx_remscn() also adjusts the ELF header's
- * e_shnum member. The application is responsible for updating other
- * data (in particular, e_shstrndx and the section headers' sh_link and
- * sh_info members).
- *
- * elfx_movscn() returns the new index of the moved section.
- * elfx_remscn() returns the original index of the removed section.
- * A return value of zero indicates an error.
- */
-extern size_t elfx_movscn __P((Elf *__elf, Elf_Scn *__scn, Elf_Scn *__after));
-extern size_t elfx_remscn __P((Elf *__elf, Elf_Scn *__scn));
-
-/*
- * elf_delscn() is obsolete. Please use elfx_remscn() instead.
- */
-extern size_t elf_delscn __P((Elf *__elf, Elf_Scn *__scn));
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _LIBELF_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/nlist.h b/desmume/src/windows/libelf_libdwarf/libelf/nlist.h
deleted file mode 100644
index 27a452ec5..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/nlist.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * nlist.h - public header file for nlist(3).
- * Copyright (C) 1995 - 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-/* @(#) $Id: nlist.h,v 1.10 2008/05/23 08:15:35 michael Exp $ */
-
-#ifndef _NLIST_H
-#define _NLIST_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-struct nlist {
- char* n_name;
- long n_value;
- short n_scnum;
- unsigned short n_type;
- char n_sclass;
- char n_numaux;
-};
-
-#if (__STDC__ + 0) || defined(__cplusplus) || defined(_WIN32)
-extern int nlist(const char *__filename, struct nlist *__nl);
-#else /* __STDC__ || defined(__cplusplus) */
-extern int nlist();
-#endif /* __STDC__ || defined(__cplusplus) */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* _NLIST_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/sys_elf.h b/desmume/src/windows/libelf_libdwarf/libelf/sys_elf.h
deleted file mode 100644
index 0f93c5598..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/sys_elf.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * lib/sys_elf.h.w32 - internal configuration file for W32 port
- * Copyright (C) 2004 - 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @(#) $Id: sys_elf.h.w32,v 1.2 2006/09/07 15:55:42 michael Exp $
- */
-
-/*
- * DO NOT USE THIS IN APPLICATIONS - #include INSTEAD!
- */
-
-/* Define to `' or `' if one of them is present */
-#undef __LIBELF_HEADER_ELF_H
-
-/* Define if Elf32_Dyn is declared in */
-#undef __LIBELF_NEED_LINK_H
-
-/* Define if Elf32_Dyn is declared in */
-#undef __LIBELF_NEED_SYS_LINK_H
-
-/* Define if you want 64-bit support (and your system supports it) */
-#define __LIBELF64 1
-
-/* Define if you want 64-bit support, and are running IRIX */
-#undef __LIBELF64_IRIX
-
-/* Define if you want 64-bit support, and are running Linux */
-#undef __LIBELF64_LINUX
-
-/* Define if you want symbol versioning (and your system supports it) */
-#define __LIBELF_SYMBOL_VERSIONS 1
-
-/* Define to a 64-bit signed integer type if one exists */
-#define __libelf_i64_t __int64
-
-/* Define to a 64-bit unsigned integer type if one exists */
-#define __libelf_u64_t unsigned __int64
-
-/* Define to a 32-bit signed integer type if one exists */
-#define __libelf_i32_t int
-
-/* Define to a 32-bit unsigned integer type if one exists */
-#define __libelf_u32_t unsigned int
-
-/* Define to a 16-bit signed integer type if one exists */
-#define __libelf_i16_t short int
-
-/* Define to a 16-bit unsigned integer type if one exists */
-#define __libelf_u16_t unsigned short int
-
-/*
- * Ok, now get the correct instance of elf.h...
- */
-#ifdef __LIBELF_HEADER_ELF_H
-# include __LIBELF_HEADER_ELF_H
-#else /* __LIBELF_HEADER_ELF_H */
-# if __LIBELF_INTERNAL__
-# include
-# else /* __LIBELF_INTERNAL__ */
-# include
-# endif /* __LIBELF_INTERNAL__ */
-#endif /* __LIBELF_HEADER_ELF_H */
-
-/*
- * On some systems, is severely broken. Try to fix it.
- */
-#ifdef __LIBELF_HEADER_ELF_H
-
-# ifndef ELF32_FSZ_ADDR
-# define ELF32_FSZ_ADDR 4
-# define ELF32_FSZ_HALF 2
-# define ELF32_FSZ_OFF 4
-# define ELF32_FSZ_SWORD 4
-# define ELF32_FSZ_WORD 4
-# endif /* ELF32_FSZ_ADDR */
-
-# ifndef STN_UNDEF
-# define STN_UNDEF 0
-# endif /* STN_UNDEF */
-
-# if __LIBELF64
-
-# ifndef ELF64_FSZ_ADDR
-# define ELF64_FSZ_ADDR 8
-# define ELF64_FSZ_HALF 2
-# define ELF64_FSZ_OFF 8
-# define ELF64_FSZ_SWORD 4
-# define ELF64_FSZ_WORD 4
-# define ELF64_FSZ_SXWORD 8
-# define ELF64_FSZ_XWORD 8
-# endif /* ELF64_FSZ_ADDR */
-
-# ifndef ELF64_ST_BIND
-# define ELF64_ST_BIND(i) ((i)>>4)
-# define ELF64_ST_TYPE(i) ((i)&0xf)
-# define ELF64_ST_INFO(b,t) (((b)<<4)+((t)&0xf))
-# endif /* ELF64_ST_BIND */
-
-# ifndef ELF64_R_SYM
-# define ELF64_R_SYM(i) ((Elf64_Xword)(i)>>32)
-# define ELF64_R_TYPE(i) ((i)&0xffffffffL)
-# define ELF64_R_INFO(s,t) (((Elf64_Xword)(s)<<32)+((t)&0xffffffffL))
-# endif /* ELF64_R_SYM */
-
-# if __LIBELF64_LINUX
-typedef __libelf_u64_t Elf64_Addr;
-typedef __libelf_u16_t Elf64_Half;
-typedef __libelf_u64_t Elf64_Off;
-typedef __libelf_i32_t Elf64_Sword;
-typedef __libelf_u32_t Elf64_Word;
-typedef __libelf_i64_t Elf64_Sxword;
-typedef __libelf_u64_t Elf64_Xword;
-# endif /* __LIBELF64_LINUX */
-
-# endif /* __LIBELF64 */
-#endif /* __LIBELF_HEADER_ELF_H */
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/verdef.h b/desmume/src/windows/libelf_libdwarf/libelf/verdef.h
deleted file mode 100644
index e17f6826b..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/verdef.h
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * verdef.h - copy versioning information.
- * Copyright (C) 2001 - 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef lint
-static const char verdef_h_rcsid[] = "@(#) $Id: verdef.h,v 1.13 2008/05/23 08:15:35 michael Exp $";
-#endif /* lint */
-
-#if VER_DEF_CURRENT != 1
-#error libelf currently does not support VER_DEF_CURRENT != 1
-#endif /* VER_DEF_CURRENT != 1 */
-
-#if TOFILE
-
-static void
-__store_verdaux(verdaux_ftype *dst, const verdaux_mtype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- __store_u32L(dst->vda_name, src->vda_name);
- __store_u32L(dst->vda_next, src->vda_next);
- }
- else {
- __store_u32M(dst->vda_name, src->vda_name);
- __store_u32M(dst->vda_next, src->vda_next);
- }
-}
-
-static void
-__store_verdef(verdef_ftype *dst, const verdef_mtype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- __store_u16L(dst->vd_version, src->vd_version);
- __store_u16L(dst->vd_flags, src->vd_flags);
- __store_u16L(dst->vd_ndx, src->vd_ndx);
- __store_u16L(dst->vd_cnt, src->vd_cnt);
- __store_u32L(dst->vd_hash, src->vd_hash);
- __store_u32L(dst->vd_aux, src->vd_aux);
- __store_u32L(dst->vd_next, src->vd_next);
- }
- else {
- __store_u16M(dst->vd_version, src->vd_version);
- __store_u16M(dst->vd_flags, src->vd_flags);
- __store_u16M(dst->vd_ndx, src->vd_ndx);
- __store_u16M(dst->vd_cnt, src->vd_cnt);
- __store_u32M(dst->vd_hash, src->vd_hash);
- __store_u32M(dst->vd_aux, src->vd_aux);
- __store_u32M(dst->vd_next, src->vd_next);
- }
-}
-
-typedef verdaux_mtype verdaux_stype;
-typedef verdaux_ftype verdaux_dtype;
-typedef verdef_mtype verdef_stype;
-typedef verdef_ftype verdef_dtype;
-typedef align_mtype verdef_atype;
-
-#define copy_verdaux_srctotmp(d, s, e) (*(d) = *(s))
-#define copy_verdaux_tmptodst(d, s, e) __store_verdaux((d), (s), (e))
-#define copy_verdef_srctotmp(d, s, e) (*(d) = *(s))
-#define copy_verdef_tmptodst(d, s, e) __store_verdef((d), (s), (e))
-
-#define translator_suffix _tof
-
-#else /* TOFILE */
-
-static void
-__load_verdaux(verdaux_mtype *dst, const verdaux_ftype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- dst->vda_name = __load_u32L(src->vda_name);
- dst->vda_next = __load_u32L(src->vda_next);
- }
- else {
- dst->vda_name = __load_u32M(src->vda_name);
- dst->vda_next = __load_u32M(src->vda_next);
- }
-}
-
-static void
-__load_verdef(verdef_mtype *dst, const verdef_ftype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- dst->vd_version = __load_u16L(src->vd_version);
- dst->vd_flags = __load_u16L(src->vd_flags);
- dst->vd_ndx = __load_u16L(src->vd_ndx);
- dst->vd_cnt = __load_u16L(src->vd_cnt);
- dst->vd_hash = __load_u32L(src->vd_hash);
- dst->vd_aux = __load_u32L(src->vd_aux);
- dst->vd_next = __load_u32L(src->vd_next);
- }
- else {
- dst->vd_version = __load_u16M(src->vd_version);
- dst->vd_flags = __load_u16M(src->vd_flags);
- dst->vd_ndx = __load_u16M(src->vd_ndx);
- dst->vd_cnt = __load_u16M(src->vd_cnt);
- dst->vd_hash = __load_u32M(src->vd_hash);
- dst->vd_aux = __load_u32M(src->vd_aux);
- dst->vd_next = __load_u32M(src->vd_next);
- }
-}
-
-typedef verdaux_ftype verdaux_stype;
-typedef verdaux_mtype verdaux_dtype;
-typedef verdef_ftype verdef_stype;
-typedef verdef_mtype verdef_dtype;
-typedef align_ftype verdef_atype;
-
-#define copy_verdaux_srctotmp(d, s, e) __load_verdaux((d), (s), (e))
-#define copy_verdaux_tmptodst(d, s, e) (*(d) = *(s))
-#define copy_verdef_srctotmp(d, s, e) __load_verdef((d), (s), (e))
-#define copy_verdef_tmptodst(d, s, e) (*(d) = *(s))
-
-#define translator_suffix _tom
-
-#endif /* TOFILE */
-
-#define cat3(a,b,c) a##b##c
-#define xlt3(p,e,s) cat3(p,e,s)
-#define xltprefix(x) xlt3(x,_,class_suffix)
-#define translator(x,e) xlt3(xltprefix(_elf_##x),e,translator_suffix)
-
-static size_t
-xlt_verdef(unsigned char *dst, const unsigned char *src, size_t n, unsigned enc) {
- size_t off;
-
- if (sizeof(verdef_stype) != sizeof(verdef_dtype)
- || sizeof(verdaux_stype) != sizeof(verdaux_dtype)) {
- /* never happens for ELF v1 and Verneed v1 */
- seterr(ERROR_UNIMPLEMENTED);
- return (size_t)-1;
- }
- /* size translation shortcut */
- if (dst == NULL) {
- return n;
- }
- if (src == NULL) {
- seterr(ERROR_NULLBUF);
- return (size_t)-1;
- }
- off = 0;
- while (off + sizeof(verdef_stype) <= n) {
- const verdef_stype *svd;
- verdef_dtype *dvd;
- verdef_mtype vd;
- size_t acount;
- size_t aoff;
-
- /*
- * check for proper alignment
- */
- if (off % sizeof(verdef_atype)) {
- seterr(ERROR_VERDEF_FORMAT);
- return (size_t)-1;
- }
- /*
- * copy and check src
- */
- svd = (verdef_stype*)(src + off);
- dvd = (verdef_dtype*)(dst + off);
- copy_verdef_srctotmp(&vd, svd, enc);
- if (vd.vd_version < 1
- || vd.vd_version > VER_DEF_CURRENT) {
- seterr(ERROR_VERDEF_VERSION);
- return (size_t)-1;
- }
- if (vd.vd_cnt < 1
- || vd.vd_aux == 0) {
- seterr(ERROR_VERDEF_FORMAT);
- return (size_t)-1;
- }
- copy_verdef_tmptodst(dvd, &vd, enc);
- /*
- * copy aux array
- */
- aoff = off + vd.vd_aux;
- for (acount = 0; acount < vd.vd_cnt; acount++) {
- const verdaux_stype *svda;
- verdaux_dtype *dvda;
- verdaux_mtype vda;
-
- /*
- * are we still inside the buffer limits?
- */
- if (aoff + sizeof(verdaux_stype) > n) {
- break;
- }
- /*
- * check for proper alignment
- */
- if (aoff % sizeof(verdef_atype)) {
- seterr(ERROR_VERDEF_FORMAT);
- return (size_t)-1;
- }
- /*
- * copy and check src
- */
- svda = (verdaux_stype*)(src + aoff);
- dvda = (verdaux_dtype*)(dst + aoff);
- copy_verdaux_srctotmp(&vda, svda, enc);
- copy_verdaux_tmptodst(dvda, &vda, enc);
- /*
- * advance to next verdaux
- */
- if (vda.vda_next == 0) {
- /* end of list */
- break;
- }
- aoff += vda.vda_next;
- }
- /*
- * advance to next verdef
- */
- if (vd.vd_next == 0) {
- /* end of list */
- break;
- }
- off += vd.vd_next;
- }
- return n;
-}
-
-size_t
-translator(verdef,L11)(unsigned char *dst, const unsigned char *src, size_t n) {
- return xlt_verdef(dst, src, n, ELFDATA2LSB);
-}
-
-size_t
-translator(verdef,M11)(unsigned char *dst, const unsigned char *src, size_t n) {
- return xlt_verdef(dst, src, n, ELFDATA2MSB);
-}
diff --git a/desmume/src/windows/libelf_libdwarf/libelf/verneed.h b/desmume/src/windows/libelf_libdwarf/libelf/verneed.h
deleted file mode 100644
index 54f0f0606..000000000
--- a/desmume/src/windows/libelf_libdwarf/libelf/verneed.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * verneed.h - copy versioning information.
- * Copyright (C) 2001 - 2006 Michael Riepe
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#ifndef lint
-static const char verneed_h_rcsid[] = "@(#) $Id: verneed.h,v 1.13 2008/05/23 08:15:35 michael Exp $";
-#endif /* lint */
-
-#if VER_NEED_CURRENT != 1
-#error libelf currently does not support VER_NEED_CURRENT != 1
-#endif /* VER_NEED_CURRENT != 1 */
-
-#if TOFILE
-
-static void
-__store_vernaux(vernaux_ftype *dst, const vernaux_mtype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- __store_u32L(dst->vna_hash, src->vna_hash);
- __store_u16L(dst->vna_flags, src->vna_flags);
- __store_u16L(dst->vna_other, src->vna_other);
- __store_u32L(dst->vna_name, src->vna_name);
- __store_u32L(dst->vna_next, src->vna_next);
- }
- else {
- __store_u32M(dst->vna_hash, src->vna_hash);
- __store_u16M(dst->vna_flags, src->vna_flags);
- __store_u16M(dst->vna_other, src->vna_other);
- __store_u32M(dst->vna_name, src->vna_name);
- __store_u32M(dst->vna_next, src->vna_next);
- }
-}
-
-static void
-__store_verneed(verneed_ftype *dst, const verneed_mtype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- __store_u16L(dst->vn_version, src->vn_version);
- __store_u16L(dst->vn_cnt, src->vn_cnt);
- __store_u32L(dst->vn_file, src->vn_file);
- __store_u32L(dst->vn_aux, src->vn_aux);
- __store_u32L(dst->vn_next, src->vn_next);
- }
- else {
- __store_u16M(dst->vn_version, src->vn_version);
- __store_u16M(dst->vn_cnt, src->vn_cnt);
- __store_u32M(dst->vn_file, src->vn_file);
- __store_u32M(dst->vn_aux, src->vn_aux);
- __store_u32M(dst->vn_next, src->vn_next);
- }
-}
-
-typedef vernaux_mtype vernaux_stype;
-typedef vernaux_ftype vernaux_dtype;
-typedef verneed_mtype verneed_stype;
-typedef verneed_ftype verneed_dtype;
-typedef align_mtype verneed_atype;
-
-#define copy_vernaux_srctotmp(d, s, e) (*(d) = *(s))
-#define copy_vernaux_tmptodst(d, s, e) __store_vernaux((d), (s), (e))
-#define copy_verneed_srctotmp(d, s, e) (*(d) = *(s))
-#define copy_verneed_tmptodst(d, s, e) __store_verneed((d), (s), (e))
-
-#define translator_suffix _tof
-
-#else /* TOFILE */
-
-static void
-__load_vernaux(vernaux_mtype *dst, const vernaux_ftype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- dst->vna_hash = __load_u32L(src->vna_hash);
- dst->vna_flags = __load_u16L(src->vna_flags);
- dst->vna_other = __load_u16L(src->vna_other);
- dst->vna_name = __load_u32L(src->vna_name);
- dst->vna_next = __load_u32L(src->vna_next);
- }
- else {
- dst->vna_hash = __load_u32M(src->vna_hash);
- dst->vna_flags = __load_u16M(src->vna_flags);
- dst->vna_other = __load_u16M(src->vna_other);
- dst->vna_name = __load_u32M(src->vna_name);
- dst->vna_next = __load_u32M(src->vna_next);
- }
-}
-
-static void
-__load_verneed(verneed_mtype *dst, const verneed_ftype *src, unsigned enc) {
- if (enc == ELFDATA2LSB) {
- dst->vn_version = __load_u16L(src->vn_version);
- dst->vn_cnt = __load_u16L(src->vn_cnt);
- dst->vn_file = __load_u32L(src->vn_file);
- dst->vn_aux = __load_u32L(src->vn_aux);
- dst->vn_next = __load_u32L(src->vn_next);
- }
- else {
- dst->vn_version = __load_u16M(src->vn_version);
- dst->vn_cnt = __load_u16M(src->vn_cnt);
- dst->vn_file = __load_u32M(src->vn_file);
- dst->vn_aux = __load_u32M(src->vn_aux);
- dst->vn_next = __load_u32M(src->vn_next);
- }
-}
-
-typedef vernaux_ftype vernaux_stype;
-typedef vernaux_mtype vernaux_dtype;
-typedef verneed_ftype verneed_stype;
-typedef verneed_mtype verneed_dtype;
-typedef align_ftype verneed_atype;
-
-#define copy_vernaux_srctotmp(d, s, e) __load_vernaux((d), (s), (e))
-#define copy_vernaux_tmptodst(d, s, e) (*(d) = *(s))
-#define copy_verneed_srctotmp(d, s, e) __load_verneed((d), (s), (e))
-#define copy_verneed_tmptodst(d, s, e) (*(d) = *(s))
-
-#define translator_suffix _tom
-
-#endif /* TOFILE */
-
-#define cat3(a,b,c) a##b##c
-#define xlt3(p,e,s) cat3(p,e,s)
-#define xltprefix(x) xlt3(x,_,class_suffix)
-#define translator(x,e) xlt3(xltprefix(_elf_##x),e,translator_suffix)
-
-static size_t
-xlt_verneed(unsigned char *dst, const unsigned char *src, size_t n, unsigned enc) {
- size_t off;
-
- if (sizeof(verneed_stype) != sizeof(verneed_dtype)
- || sizeof(vernaux_stype) != sizeof(vernaux_dtype)) {
- /* never happens for ELF v1 and Verneed v1 */
- seterr(ERROR_UNIMPLEMENTED);
- return (size_t)-1;
- }
- /* size translation shortcut */
- if (dst == NULL) {
- return n;
- }
- if (src == NULL) {
- seterr(ERROR_NULLBUF);
- return (size_t)-1;
- }
- off = 0;
- while (off + sizeof(verneed_stype) <= n) {
- const verneed_stype *svn;
- verneed_dtype *dvn;
- verneed_mtype vn;
- size_t acount;
- size_t aoff;
-
- /*
- * check for proper alignment
- */
- if (off % sizeof(verneed_atype)) {
- seterr(ERROR_VERNEED_FORMAT);
- return (size_t)-1;
- }
- /*
- * copy and check src
- */
- svn = (verneed_stype*)(src + off);
- dvn = (verneed_dtype*)(dst + off);
- copy_verneed_srctotmp(&vn, svn, enc);
- if (vn.vn_version < 1
- || vn.vn_version > VER_NEED_CURRENT) {
- seterr(ERROR_VERNEED_VERSION);
- return (size_t)-1;
- }
- if (vn.vn_cnt < 1
- || vn.vn_aux == 0) {
- seterr(ERROR_VERNEED_FORMAT);
- return (size_t)-1;
- }
- copy_verneed_tmptodst(dvn, &vn, enc);
- /*
- * copy aux array
- */
- aoff = off + vn.vn_aux;
- for (acount = 0; acount < vn.vn_cnt; acount++) {
- const vernaux_stype *svna;
- vernaux_dtype *dvna;
- vernaux_mtype vna;
-
- /*
- * are we still inside the buffer limits?
- */
- if (aoff + sizeof(vernaux_stype) > n) {
- break;
- }
- /*
- * check for proper alignment
- */
- if (aoff % sizeof(verneed_atype)) {
- seterr(ERROR_VERNEED_FORMAT);
- return (size_t)-1;
- }
- /*
- * copy and check src
- */
- svna = (vernaux_stype*)(src + aoff);
- dvna = (vernaux_dtype*)(dst + aoff);
- copy_vernaux_srctotmp(&vna, svna, enc);
- copy_vernaux_tmptodst(dvna, &vna, enc);
- /*
- * advance to next vernaux
- */
- if (vna.vna_next == 0) {
- /* end of list */
- break;
- }
- aoff += vna.vna_next;
- }
- /*
- * advance to next verneed
- */
- if (vn.vn_next == 0) {
- /* end of list */
- break;
- }
- off += vn.vn_next;
- }
- return n;
-}
-
-size_t
-translator(verneed,L11)(unsigned char *dst, const unsigned char *src, size_t n) {
- return xlt_verneed(dst, src, n, ELFDATA2LSB);
-}
-
-size_t
-translator(verneed,M11)(unsigned char *dst, const unsigned char *src, size_t n) {
- return xlt_verneed(dst, src, n, ELFDATA2MSB);
-}
diff --git a/desmume/src/windows/libelf_libdwarf/libelf_libdwarf.7z b/desmume/src/windows/libelf_libdwarf/libelf_libdwarf.7z
deleted file mode 100644
index 471b8cf5a..000000000
Binary files a/desmume/src/windows/libelf_libdwarf/libelf_libdwarf.7z and /dev/null differ
diff --git a/desmume/src/windows/libelf_libdwarf/libelf_libdwarf_0.8.13_20100404_from_tastools b/desmume/src/windows/libelf_libdwarf/libelf_libdwarf_0.8.13_20100404_from_tastools
deleted file mode 100644
index e69de29bb..000000000
diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp
index c0fed322a..e823cfdcc 100644
--- a/desmume/src/windows/main.cpp
+++ b/desmume/src/windows/main.cpp
@@ -295,44 +295,6 @@ bool bSocketsAvailable = false;
VideoInfo video;
-#ifdef HAVE_WX
-#include "wx/wxprec.h"
-#ifdef _M_X64
- #ifdef __WXDEBUG__
- #pragma comment(lib,"wxmsw28d_core-x64.lib")
- #pragma comment(lib,"wxbase28d-x64.lib")
- #else
- #pragma comment(lib,"wxmsw28_core-x64.lib")
- #pragma comment(lib,"wxbase28-x64.lib")
- #endif
-#else
- #ifdef __WXDEBUG__
- #pragma comment(lib,"wxmsw28d_core.lib")
- #pragma comment(lib,"wxbase28d.lib")
- #else
- #pragma comment(lib,"wxmsw28_core.lib")
- #pragma comment(lib,"wxbase28.lib")
- #endif
-#endif
-#pragma comment(lib,"comctl32.lib")
-#include "../wxdlg/wxdlg3dViewer.h"
-
-class wxDesmumeApp : public wxApp
-{
-public:
- //call me each frame or something.
- //sort of an idle routine
- static void frameUpdate()
- {
- if(!wxTheApp) return;
- wxDesmumeApp* self = ((wxDesmumeApp*)wxTheApp);
- self->DeletePendingObjects();
- }
-};
-
-IMPLEMENT_APP_NO_MAIN( wxDesmumeApp )
-#endif //HAVE_WX
-
#ifndef PUBLIC_RELEASE
#define DEVELOPER_MENU_ITEMS
#endif
@@ -2058,10 +2020,6 @@ void CheckMessages()
MSG msg;
HWND hwnd = MainWindow->getHWnd();
- #ifdef WX_STUB
- wxDesmumeApp::frameUpdate();
- #endif
-
while( PeekMessage( &msg, 0, 0, 0, PM_NOREMOVE ) )
{
if( GetMessage( &msg, 0, 0, 0)>0 )
@@ -2936,10 +2894,6 @@ int _main()
OGLCreateRenderer_3_2_Func = OGLCreateRenderer_3_2;
-#ifdef HAVE_WX
- wxInitialize();
-#endif
-
#ifdef EXPERIMENTAL_WIFI_COMM
WSADATA wsaData;
WORD version = MAKEWORD(1,1);
@@ -5601,16 +5555,6 @@ DOKEYDOWN:
OpenToolWindow(new CMemView());
return 0;
-#if 0
- case IDM_VIEW3D:
- #ifdef HAVE_WX
- driver->VIEW3D_Init();
- driver->view3d->Launch();
- #else
- MessageBox(hwnd, "Sorry to get your hopes up; 3d viewer isn't finished yet.\r\nBut because of all these languages, it is too much trouble to remove from all the menus...", "DeSmuME", MB_OK);
- #endif
- return 0;
-#endif
case IDM_SOUND_VIEW:
if(!SoundView_IsOpened()) SoundView_DlgOpen(HWND_DESKTOP);
return 0;
diff --git a/desmume/src/windows/wx/include/msvc/wx/setup.h b/desmume/src/windows/wx/include/msvc/wx/setup.h
deleted file mode 100644
index 3f0e0cd5e..000000000
--- a/desmume/src/windows/wx/include/msvc/wx/setup.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: msvc/wx/msw/setup.h
-// Purpose: wrapper around the real wx/setup.h for Visual C++
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 2004-12-12
-// RCS-ID: $Id: setup.h 43687 2006-11-27 15:03:59Z VZ $
-// Copyright: (c) 2004 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but
-// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined
-// explicitly!
-
-#ifdef _MSC_VER
- #ifdef _UNICODE
- #ifdef WXUSINGDLL
- #ifdef _DEBUG
- #include "../../../lib/vc_dll/mswud/wx/setup.h"
- #else
- #include "../../../lib/vc_dll/mswu/wx/setup.h"
- #endif
- #else
- #ifdef _DEBUG
- #include "../../../lib/vc_lib/mswud/wx/setup.h"
- #else
- #include "../../../lib/vc_lib/mswu/wx/setup.h"
- #endif
- #endif
-
- #ifdef _DEBUG
- #pragma comment(lib,"wxbase28ud")
- #pragma comment(lib,"wxbase28ud_net")
- #pragma comment(lib,"wxbase28ud_xml")
- #if wxUSE_REGEX
- #pragma comment(lib,"wxregexud")
- #endif
-
- #if wxUSE_GUI
- #if wxUSE_XML
- #pragma comment(lib,"wxexpatd")
- #endif
- #if wxUSE_LIBJPEG
- #pragma comment(lib,"wxjpegd")
- #endif
- #if wxUSE_LIBPNG
- #pragma comment(lib,"wxpngd")
- #endif
- #if wxUSE_LIBTIFF
- #pragma comment(lib,"wxtiffd")
- #endif
- #if wxUSE_ZLIB
- #pragma comment(lib,"wxzlibd")
- #endif
- #pragma comment(lib,"wxmsw28ud_adv")
- #pragma comment(lib,"wxmsw28ud_core")
- #pragma comment(lib,"wxmsw28ud_html")
- #if wxUSE_GLCANVAS
- #pragma comment(lib,"wxmsw28ud_gl")
- #endif
- #if wxUSE_DEBUGREPORT
- #pragma comment(lib,"wxmsw28ud_qa")
- #endif
- #if wxUSE_XRC
- #pragma comment(lib,"wxmsw28ud_xrc")
- #endif
- #if wxUSE_AUI
- #pragma comment(lib,"wxmsw28ud_aui")
- #endif
- #if wxUSE_RICHTEXT
- #pragma comment(lib,"wxmsw28ud_richtext")
- #endif
- #if wxUSE_MEDIACTRL
- #pragma comment(lib,"wxmsw28ud_media")
- #endif
- #if wxUSE_ODBC
- #pragma comment(lib,"wxbase28ud_odbc")
- #endif
- #endif // wxUSE_GUI
- #else // release
- #pragma comment(lib,"wxbase28u")
- #pragma comment(lib,"wxbase28u_net")
- #pragma comment(lib,"wxbase28u_xml")
- #if wxUSE_REGEX
- #pragma comment(lib,"wxregexu")
- #endif
-
- #if wxUSE_GUI
- #if wxUSE_XML
- #pragma comment(lib,"wxexpat")
- #endif
- #if wxUSE_LIBJPEG
- #pragma comment(lib,"wxjpeg")
- #endif
- #if wxUSE_LIBPNG
- #pragma comment(lib,"wxpng")
- #endif
- #if wxUSE_LIBTIFF
- #pragma comment(lib,"wxtiff")
- #endif
- #if wxUSE_ZLIB
- #pragma comment(lib,"wxzlib")
- #endif
- #pragma comment(lib,"wxmsw28u_adv")
- #pragma comment(lib,"wxmsw28u_core")
- #pragma comment(lib,"wxmsw28u_html")
- #if wxUSE_GLCANVAS
- #pragma comment(lib,"wxmsw28u_gl")
- #endif
- #if wxUSE_DEBUGREPORT
- #pragma comment(lib,"wxmsw28u_qa")
- #endif
- #if wxUSE_XRC
- #pragma comment(lib,"wxmsw28u_xrc")
- #endif
- #if wxUSE_AUI
- #pragma comment(lib,"wxmsw28u_aui")
- #endif
- #if wxUSE_RICHTEXT
- #pragma comment(lib,"wxmsw28u_richtext")
- #endif
- #if wxUSE_MEDIACTRL
- #pragma comment(lib,"wxmsw28u_media")
- #endif
- #if wxUSE_ODBC
- #pragma comment(lib,"wxbase28u_odbc")
- #endif
- #endif // wxUSE_GUI
- #endif // debug/release
- #else // !_UNICODE
- #ifdef WXUSINGDLL
- #ifdef _DEBUG
- #include "../../../lib/vc_dll/mswd/wx/setup.h"
- #else
- #include "../../../lib/vc_dll/msw/wx/setup.h"
- #endif
- #else // static lib
- #ifdef _DEBUG
- #include "../../../lib/vc_lib/mswd/wx/setup.h"
- #else
- #include "../../../lib/vc_lib/msw/wx/setup.h"
- #endif
- #endif // shared/static
-
- #ifdef _DEBUG
- #pragma comment(lib,"wxbase28d")
- #pragma comment(lib,"wxbase28d_net")
- #pragma comment(lib,"wxbase28d_xml")
- #if wxUSE_REGEX
- #pragma comment(lib,"wxregexd")
- #endif
-
- #if wxUSE_GUI
- #if wxUSE_XML
- #pragma comment(lib,"wxexpatd")
- #endif
- #if wxUSE_LIBJPEG
- #pragma comment(lib,"wxjpegd")
- #endif
- #if wxUSE_LIBPNG
- #pragma comment(lib,"wxpngd")
- #endif
- #if wxUSE_LIBTIFF
- #pragma comment(lib,"wxtiffd")
- #endif
- #if wxUSE_ZLIB
- #pragma comment(lib,"wxzlibd")
- #endif
- #pragma comment(lib,"wxmsw28d_adv")
- #pragma comment(lib,"wxmsw28d_core")
- #pragma comment(lib,"wxmsw28d_html")
- #if wxUSE_GLCANVAS
- #pragma comment(lib,"wxmsw28d_gl")
- #endif
- #if wxUSE_DEBUGREPORT
- #pragma comment(lib,"wxmsw28d_qa")
- #endif
- #if wxUSE_XRC
- #pragma comment(lib,"wxmsw28d_xrc")
- #endif
- #if wxUSE_AUI
- #pragma comment(lib,"wxmsw28d_aui")
- #endif
- #if wxUSE_RICHTEXT
- #pragma comment(lib,"wxmsw28d_richtext")
- #endif
- #if wxUSE_MEDIACTRL
- #pragma comment(lib,"wxmsw28d_media")
- #endif
- #if wxUSE_ODBC
- #pragma comment(lib,"wxbase28d_odbc")
- #endif
- #endif // wxUSE_GUI
- #else // release
- #pragma comment(lib,"wxbase28")
- #pragma comment(lib,"wxbase28_net")
- #pragma comment(lib,"wxbase28_xml")
- #if wxUSE_REGEX
- #pragma comment(lib,"wxregex")
- #endif
-
- #if wxUSE_GUI
- #if wxUSE_XML
- #pragma comment(lib,"wxexpat")
- #endif
- #if wxUSE_LIBJPEG
- #pragma comment(lib,"wxjpeg")
- #endif
- #if wxUSE_LIBPNG
- #pragma comment(lib,"wxpng")
- #endif
- #if wxUSE_LIBTIFF
- #pragma comment(lib,"wxtiff")
- #endif
- #if wxUSE_ZLIB
- #pragma comment(lib,"wxzlib")
- #endif
- #pragma comment(lib,"wxmsw28_adv")
- #pragma comment(lib,"wxmsw28_core")
- #pragma comment(lib,"wxmsw28_html")
- #if wxUSE_GLCANVAS
- #pragma comment(lib,"wxmsw28_gl")
- #endif
- #if wxUSE_DEBUGREPORT
- #pragma comment(lib,"wxmsw28_qa")
- #endif
- #if wxUSE_XRC
- #pragma comment(lib,"wxmsw28_xrc")
- #endif
- #if wxUSE_AUI
- #pragma comment(lib,"wxmsw28_aui")
- #endif
- #if wxUSE_RICHTEXT
- #pragma comment(lib,"wxmsw28_richtext")
- #endif
- #if wxUSE_MEDIACTRL
- #pragma comment(lib,"wxmsw28_media")
- #endif
- #if wxUSE_ODBC
- #pragma comment(lib,"wxbase28_odbc")
- #endif
- #endif // wxUSE_GUI
- #endif // debug/release
- #endif // _UNICODE/!_UNICODE
-#else
- #error "This file should only be included when using Microsoft Visual C++"
-#endif
-
diff --git a/desmume/src/windows/wx/include/wx/aboutdlg.h b/desmume/src/windows/wx/include/wx/aboutdlg.h
deleted file mode 100644
index 19a6fb949..000000000
--- a/desmume/src/windows/wx/include/wx/aboutdlg.h
+++ /dev/null
@@ -1,161 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aboutdlg.h
-// Purpose: declaration of wxAboutDialog class
-// Author: Vadim Zeitlin
-// Created: 2006-10-07
-// RCS-ID: $Id: aboutdlg.h 58748 2009-02-08 09:46:03Z VZ $
-// Copyright: (c) 2006 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ABOUTDLG_H_
-#define _WX_ABOUTDLG_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_ABOUTDLG
-
-#include "wx/app.h"
-#include "wx/icon.h"
-
-// ----------------------------------------------------------------------------
-// wxAboutDialogInfo: information shown by the standard "About" dialog
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxAboutDialogInfo
-{
-public:
- // all fields are initially uninitialized
- wxAboutDialogInfo() { }
-
- // accessors for various simply fields
- // -----------------------------------
-
- // name of the program, if not used defaults wxApp::GetAppName()
- void SetName(const wxString& name) { m_name = name; }
- wxString GetName() const
- { return m_name.empty() ? wxTheApp->GetAppName() : m_name; }
-
- // version of the program, in free format (but without "version" word)
- void SetVersion(const wxString& version) { m_version = version; }
- bool HasVersion() const { return !m_version.empty(); }
- wxString GetVersion() const { return m_version; }
-
- // brief, but possibly multiline, description of the program
- void SetDescription(const wxString& desc) { m_description = desc; }
- bool HasDescription() const { return !m_description.empty(); }
- wxString GetDescription() const { return m_description; }
-
- // short string containing the program copyright information
- void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
- bool HasCopyright() const { return !m_copyright.empty(); }
- wxString GetCopyright() const { return m_copyright; }
-
- // long, multiline string containing the text of the program licence
- void SetLicence(const wxString& licence) { m_licence = licence; }
- void SetLicense(const wxString& licence) { m_licence = licence; }
- bool HasLicence() const { return !m_licence.empty(); }
- wxString GetLicence() const { return m_licence; }
-
- // icon to be shown in the dialog, defaults to the main frame icon
- void SetIcon(const wxIcon& icon) { m_icon = icon; }
- bool HasIcon() const { return m_icon.Ok(); }
- wxIcon GetIcon() const;
-
- // web site for the program and its description (defaults to URL itself if
- // empty)
- void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
- {
- m_url = url;
- m_urlDesc = desc.empty() ? url : desc;
- }
-
- bool HasWebSite() const { return !m_url.empty(); }
-
- wxString GetWebSiteURL() const { return m_url; }
- wxString GetWebSiteDescription() const { return m_urlDesc; }
-
- // accessors for the arrays
- // ------------------------
-
- // the list of developers of the program
- void SetDevelopers(const wxArrayString& developers)
- { m_developers = developers; }
- void AddDeveloper(const wxString& developer)
- { m_developers.push_back(developer); }
-
- bool HasDevelopers() const { return !m_developers.empty(); }
- const wxArrayString& GetDevelopers() const { return m_developers; }
-
- // the list of documentation writers
- void SetDocWriters(const wxArrayString& docwriters)
- { m_docwriters = docwriters; }
- void AddDocWriter(const wxString& docwriter)
- { m_docwriters.push_back(docwriter); }
-
- bool HasDocWriters() const { return !m_docwriters.empty(); }
- const wxArrayString& GetDocWriters() const { return m_docwriters; }
-
- // the list of artists for the program art
- void SetArtists(const wxArrayString& artists)
- { m_artists = artists; }
- void AddArtist(const wxString& artist)
- { m_artists.push_back(artist); }
-
- bool HasArtists() const { return !m_artists.empty(); }
- const wxArrayString& GetArtists() const { return m_artists; }
-
- // the list of translators
- void SetTranslators(const wxArrayString& translators)
- { m_translators = translators; }
- void AddTranslator(const wxString& translator)
- { m_translators.push_back(translator); }
-
- bool HasTranslators() const { return !m_translators.empty(); }
- const wxArrayString& GetTranslators() const { return m_translators; }
-
-
- // implementation only
- // -------------------
-
- // "simple" about dialog shows only textual information (with possibly
- // default icon but without hyperlink nor any long texts such as the
- // licence text)
- bool IsSimple() const
- { return !HasWebSite() && !HasIcon() && !HasLicence(); }
-
- // get the description and credits (i.e. all of developers, doc writers,
- // artists and translators) as a one long multiline string
- wxString GetDescriptionAndCredits() const;
-
-#if wxABI_VERSION >= 20810
- // returns the copyright with the (C) string substituted by the Unicode
- // character U+00A9
- wxString GetCopyrightToDisplay() const;
-#endif // wx 2.8.10+
-
-private:
- wxString m_name,
- m_version,
- m_description,
- m_copyright,
- m_licence;
-
- wxIcon m_icon;
-
- wxString m_url,
- m_urlDesc;
-
- wxArrayString m_developers,
- m_docwriters,
- m_artists,
- m_translators;
-};
-
-// functions to show the about dialog box
-WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info);
-
-#endif // wxUSE_ABOUTDLG
-
-#endif // _WX_ABOUTDLG_H_
-
diff --git a/desmume/src/windows/wx/include/wx/accel.h b/desmume/src/windows/wx/include/wx/accel.h
deleted file mode 100644
index 78c038f34..000000000
--- a/desmume/src/windows/wx/include/wx/accel.h
+++ /dev/null
@@ -1,171 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/accel.h
-// Purpose: wxAcceleratorEntry and wxAcceleratorTable classes
-// Author: Julian Smart, Robert Roebling, Vadim Zeitlin
-// Modified by:
-// Created: 31.05.01 (extracted from other files)
-// RCS-ID: $Id: accel.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ACCEL_H_BASE_
-#define _WX_ACCEL_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_ACCEL
-
-#include "wx/object.h"
-
-class WXDLLIMPEXP_FWD_CORE wxAcceleratorTable;
-class WXDLLIMPEXP_FWD_CORE wxMenuItem;
-class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// wxAcceleratorEntry flags
-enum
-{
- wxACCEL_NORMAL = 0x0000, // no modifiers
- wxACCEL_ALT = 0x0001, // hold Alt key down
- wxACCEL_CTRL = 0x0002, // hold Ctrl key down
- wxACCEL_SHIFT = 0x0004, // hold Shift key down
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- wxACCEL_CMD = 0x0008 // Command key on OS X
-#else
- wxACCEL_CMD = wxACCEL_CTRL
-#endif
-};
-
-// ----------------------------------------------------------------------------
-// an entry in wxAcceleratorTable corresponds to one accelerator
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxAcceleratorEntry
-{
-public:
- wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
- wxMenuItem *item = NULL)
- : m_flags(flags)
- , m_keyCode(keyCode)
- , m_command(cmd)
- , m_item(item)
- { }
-
- wxAcceleratorEntry(const wxAcceleratorEntry& entry)
- : m_flags(entry.m_flags)
- , m_keyCode(entry.m_keyCode)
- , m_command(entry.m_command)
- , m_item(entry.m_item)
- { }
-
- // create accelerator corresponding to the specified string, return NULL if
- // string couldn't be parsed or a pointer to be deleted by the caller
- static wxAcceleratorEntry *Create(const wxString& str);
-
- wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
- {
- Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
- return *this;
- }
-
- void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
- {
- m_flags = flags;
- m_keyCode = keyCode;
- m_command = cmd;
- m_item = item;
- }
-
- void SetMenuItem(wxMenuItem *item) { m_item = item; }
-
- int GetFlags() const { return m_flags; }
- int GetKeyCode() const { return m_keyCode; }
- int GetCommand() const { return m_command; }
-
- wxMenuItem *GetMenuItem() const { return m_item; }
-
- bool operator==(const wxAcceleratorEntry& entry) const
- {
- return m_flags == entry.m_flags &&
- m_keyCode == entry.m_keyCode &&
- m_command == entry.m_command &&
- m_item == entry.m_item;
- }
-
- bool operator!=(const wxAcceleratorEntry& entry) const
- { return !(*this == entry); }
-
-#if defined(__WXMOTIF__)
- // Implementation use only
- bool MatchesEvent(const wxKeyEvent& event) const;
-#endif
-
- bool IsOk() const
- {
- return m_flags != 0 &&
- m_keyCode != 0;
- }
-
-
- // string <-> wxAcceleratorEntry conversion
- // ----------------------------------------
-
- // returns a wxString for the this accelerator.
- // this function formats it using the - format
- // where maybe a hyphen-separed list of "shift|alt|ctrl"
- wxString ToString() const;
-
- // returns true if the given string correctly initialized this object
- // (i.e. if IsOk() returns true after this call)
- bool FromString(const wxString& str);
-
-
-private:
- // common part of Create() and FromString()
- static bool ParseAccel(const wxString& str, int *flags, int *keycode);
-
-
- int m_flags; // combination of wxACCEL_XXX constants
- int m_keyCode; // ASCII or virtual keycode
- int m_command; // Command id to generate
-
- // the menu item this entry corresponds to, may be NULL
- wxMenuItem *m_item;
-
- // for compatibility with old code, use accessors now!
- friend class WXDLLIMPEXP_FWD_CORE wxMenu;
-};
-
-// ----------------------------------------------------------------------------
-// include wxAcceleratorTable class declaration, it is only used by the library
-// and so doesn't have any published user visible interface
-// ----------------------------------------------------------------------------
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/generic/accel.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/accel.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/accel.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/accel.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/accel.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/accel.h"
-#elif defined(__WXCOCOA__)
- #include "wx/generic/accel.h"
-#elif defined(__WXPM__)
- #include "wx/os2/accel.h"
-#endif
-
-extern WXDLLEXPORT_DATA(wxAcceleratorTable) wxNullAcceleratorTable;
-
-#endif // wxUSE_ACCEL
-
-#endif
- // _WX_ACCEL_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/access.h b/desmume/src/windows/wx/include/wx/access.h
deleted file mode 100644
index 0a83346ab..000000000
--- a/desmume/src/windows/wx/include/wx/access.h
+++ /dev/null
@@ -1,377 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/access.h
-// Purpose: Accessibility classes
-// Author: Julian Smart
-// Modified by:
-// Created: 2003-02-12
-// RCS-ID: $Id: access.h 51246 2008-01-16 12:56:37Z VZ $
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ACCESSBASE_H_
-#define _WX_ACCESSBASE_H_
-
-// ----------------------------------------------------------------------------
-// headers we have to include here
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_ACCESSIBILITY
-
-#include "wx/variant.h"
-
-typedef enum
-{
- wxACC_FAIL,
- wxACC_FALSE,
- wxACC_OK,
- wxACC_NOT_IMPLEMENTED,
- wxACC_NOT_SUPPORTED
-} wxAccStatus;
-
-// Child ids are integer identifiers from 1 up.
-// So zero represents 'this' object.
-#define wxACC_SELF 0
-
-// Navigation constants
-
-typedef enum
-{
- wxNAVDIR_DOWN,
- wxNAVDIR_FIRSTCHILD,
- wxNAVDIR_LASTCHILD,
- wxNAVDIR_LEFT,
- wxNAVDIR_NEXT,
- wxNAVDIR_PREVIOUS,
- wxNAVDIR_RIGHT,
- wxNAVDIR_UP
-} wxNavDir;
-
-// Role constants
-
-typedef enum {
- wxROLE_NONE,
- wxROLE_SYSTEM_ALERT,
- wxROLE_SYSTEM_ANIMATION,
- wxROLE_SYSTEM_APPLICATION,
- wxROLE_SYSTEM_BORDER,
- wxROLE_SYSTEM_BUTTONDROPDOWN,
- wxROLE_SYSTEM_BUTTONDROPDOWNGRID,
- wxROLE_SYSTEM_BUTTONMENU,
- wxROLE_SYSTEM_CARET,
- wxROLE_SYSTEM_CELL,
- wxROLE_SYSTEM_CHARACTER,
- wxROLE_SYSTEM_CHART,
- wxROLE_SYSTEM_CHECKBUTTON,
- wxROLE_SYSTEM_CLIENT,
- wxROLE_SYSTEM_CLOCK,
- wxROLE_SYSTEM_COLUMN,
- wxROLE_SYSTEM_COLUMNHEADER,
- wxROLE_SYSTEM_COMBOBOX,
- wxROLE_SYSTEM_CURSOR,
- wxROLE_SYSTEM_DIAGRAM,
- wxROLE_SYSTEM_DIAL,
- wxROLE_SYSTEM_DIALOG,
- wxROLE_SYSTEM_DOCUMENT,
- wxROLE_SYSTEM_DROPLIST,
- wxROLE_SYSTEM_EQUATION,
- wxROLE_SYSTEM_GRAPHIC,
- wxROLE_SYSTEM_GRIP,
- wxROLE_SYSTEM_GROUPING,
- wxROLE_SYSTEM_HELPBALLOON,
- wxROLE_SYSTEM_HOTKEYFIELD,
- wxROLE_SYSTEM_INDICATOR,
- wxROLE_SYSTEM_LINK,
- wxROLE_SYSTEM_LIST,
- wxROLE_SYSTEM_LISTITEM,
- wxROLE_SYSTEM_MENUBAR,
- wxROLE_SYSTEM_MENUITEM,
- wxROLE_SYSTEM_MENUPOPUP,
- wxROLE_SYSTEM_OUTLINE,
- wxROLE_SYSTEM_OUTLINEITEM,
- wxROLE_SYSTEM_PAGETAB,
- wxROLE_SYSTEM_PAGETABLIST,
- wxROLE_SYSTEM_PANE,
- wxROLE_SYSTEM_PROGRESSBAR,
- wxROLE_SYSTEM_PROPERTYPAGE,
- wxROLE_SYSTEM_PUSHBUTTON,
- wxROLE_SYSTEM_RADIOBUTTON,
- wxROLE_SYSTEM_ROW,
- wxROLE_SYSTEM_ROWHEADER,
- wxROLE_SYSTEM_SCROLLBAR,
- wxROLE_SYSTEM_SEPARATOR,
- wxROLE_SYSTEM_SLIDER,
- wxROLE_SYSTEM_SOUND,
- wxROLE_SYSTEM_SPINBUTTON,
- wxROLE_SYSTEM_STATICTEXT,
- wxROLE_SYSTEM_STATUSBAR,
- wxROLE_SYSTEM_TABLE,
- wxROLE_SYSTEM_TEXT,
- wxROLE_SYSTEM_TITLEBAR,
- wxROLE_SYSTEM_TOOLBAR,
- wxROLE_SYSTEM_TOOLTIP,
- wxROLE_SYSTEM_WHITESPACE,
- wxROLE_SYSTEM_WINDOW
-} wxAccRole;
-
-// Object types
-
-typedef enum {
- wxOBJID_WINDOW = 0x00000000,
- wxOBJID_SYSMENU = 0xFFFFFFFF,
- wxOBJID_TITLEBAR = 0xFFFFFFFE,
- wxOBJID_MENU = 0xFFFFFFFD,
- wxOBJID_CLIENT = 0xFFFFFFFC,
- wxOBJID_VSCROLL = 0xFFFFFFFB,
- wxOBJID_HSCROLL = 0xFFFFFFFA,
- wxOBJID_SIZEGRIP = 0xFFFFFFF9,
- wxOBJID_CARET = 0xFFFFFFF8,
- wxOBJID_CURSOR = 0xFFFFFFF7,
- wxOBJID_ALERT = 0xFFFFFFF6,
- wxOBJID_SOUND = 0xFFFFFFF5
-} wxAccObject;
-
-// Accessible states
-
-#define wxACC_STATE_SYSTEM_ALERT_HIGH 0x00000001
-#define wxACC_STATE_SYSTEM_ALERT_MEDIUM 0x00000002
-#define wxACC_STATE_SYSTEM_ALERT_LOW 0x00000004
-#define wxACC_STATE_SYSTEM_ANIMATED 0x00000008
-#define wxACC_STATE_SYSTEM_BUSY 0x00000010
-#define wxACC_STATE_SYSTEM_CHECKED 0x00000020
-#define wxACC_STATE_SYSTEM_COLLAPSED 0x00000040
-#define wxACC_STATE_SYSTEM_DEFAULT 0x00000080
-#define wxACC_STATE_SYSTEM_EXPANDED 0x00000100
-#define wxACC_STATE_SYSTEM_EXTSELECTABLE 0x00000200
-#define wxACC_STATE_SYSTEM_FLOATING 0x00000400
-#define wxACC_STATE_SYSTEM_FOCUSABLE 0x00000800
-#define wxACC_STATE_SYSTEM_FOCUSED 0x00001000
-#define wxACC_STATE_SYSTEM_HOTTRACKED 0x00002000
-#define wxACC_STATE_SYSTEM_INVISIBLE 0x00004000
-#define wxACC_STATE_SYSTEM_MARQUEED 0x00008000
-#define wxACC_STATE_SYSTEM_MIXED 0x00010000
-#define wxACC_STATE_SYSTEM_MULTISELECTABLE 0x00020000
-#define wxACC_STATE_SYSTEM_OFFSCREEN 0x00040000
-#define wxACC_STATE_SYSTEM_PRESSED 0x00080000
-#define wxACC_STATE_SYSTEM_PROTECTED 0x00100000
-#define wxACC_STATE_SYSTEM_READONLY 0x00200000
-#define wxACC_STATE_SYSTEM_SELECTABLE 0x00400000
-#define wxACC_STATE_SYSTEM_SELECTED 0x00800000
-#define wxACC_STATE_SYSTEM_SELFVOICING 0x01000000
-#define wxACC_STATE_SYSTEM_UNAVAILABLE 0x02000000
-
-// Selection flag
-
-typedef enum
-{
- wxACC_SEL_NONE = 0,
- wxACC_SEL_TAKEFOCUS = 1,
- wxACC_SEL_TAKESELECTION = 2,
- wxACC_SEL_EXTENDSELECTION = 4,
- wxACC_SEL_ADDSELECTION = 8,
- wxACC_SEL_REMOVESELECTION = 16
-} wxAccSelectionFlags;
-
-// Accessibility event identifiers
-
-#define wxACC_EVENT_SYSTEM_SOUND 0x0001
-#define wxACC_EVENT_SYSTEM_ALERT 0x0002
-#define wxACC_EVENT_SYSTEM_FOREGROUND 0x0003
-#define wxACC_EVENT_SYSTEM_MENUSTART 0x0004
-#define wxACC_EVENT_SYSTEM_MENUEND 0x0005
-#define wxACC_EVENT_SYSTEM_MENUPOPUPSTART 0x0006
-#define wxACC_EVENT_SYSTEM_MENUPOPUPEND 0x0007
-#define wxACC_EVENT_SYSTEM_CAPTURESTART 0x0008
-#define wxACC_EVENT_SYSTEM_CAPTUREEND 0x0009
-#define wxACC_EVENT_SYSTEM_MOVESIZESTART 0x000A
-#define wxACC_EVENT_SYSTEM_MOVESIZEEND 0x000B
-#define wxACC_EVENT_SYSTEM_CONTEXTHELPSTART 0x000C
-#define wxACC_EVENT_SYSTEM_CONTEXTHELPEND 0x000D
-#define wxACC_EVENT_SYSTEM_DRAGDROPSTART 0x000E
-#define wxACC_EVENT_SYSTEM_DRAGDROPEND 0x000F
-#define wxACC_EVENT_SYSTEM_DIALOGSTART 0x0010
-#define wxACC_EVENT_SYSTEM_DIALOGEND 0x0011
-#define wxACC_EVENT_SYSTEM_SCROLLINGSTART 0x0012
-#define wxACC_EVENT_SYSTEM_SCROLLINGEND 0x0013
-#define wxACC_EVENT_SYSTEM_SWITCHSTART 0x0014
-#define wxACC_EVENT_SYSTEM_SWITCHEND 0x0015
-#define wxACC_EVENT_SYSTEM_MINIMIZESTART 0x0016
-#define wxACC_EVENT_SYSTEM_MINIMIZEEND 0x0017
-#define wxACC_EVENT_OBJECT_CREATE 0x8000
-#define wxACC_EVENT_OBJECT_DESTROY 0x8001
-#define wxACC_EVENT_OBJECT_SHOW 0x8002
-#define wxACC_EVENT_OBJECT_HIDE 0x8003
-#define wxACC_EVENT_OBJECT_REORDER 0x8004
-#define wxACC_EVENT_OBJECT_FOCUS 0x8005
-#define wxACC_EVENT_OBJECT_SELECTION 0x8006
-#define wxACC_EVENT_OBJECT_SELECTIONADD 0x8007
-#define wxACC_EVENT_OBJECT_SELECTIONREMOVE 0x8008
-#define wxACC_EVENT_OBJECT_SELECTIONWITHIN 0x8009
-#define wxACC_EVENT_OBJECT_STATECHANGE 0x800A
-#define wxACC_EVENT_OBJECT_LOCATIONCHANGE 0x800B
-#define wxACC_EVENT_OBJECT_NAMECHANGE 0x800C
-#define wxACC_EVENT_OBJECT_DESCRIPTIONCHANGE 0x800D
-#define wxACC_EVENT_OBJECT_VALUECHANGE 0x800E
-#define wxACC_EVENT_OBJECT_PARENTCHANGE 0x800F
-#define wxACC_EVENT_OBJECT_HELPCHANGE 0x8010
-#define wxACC_EVENT_OBJECT_DEFACTIONCHANGE 0x8011
-#define wxACC_EVENT_OBJECT_ACCELERATORCHANGE 0x8012
-
-// ----------------------------------------------------------------------------
-// wxAccessible
-// All functions return an indication of success, failure, or not implemented.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_CORE wxAccessible;
-class WXDLLIMPEXP_FWD_CORE wxWindow;
-class WXDLLIMPEXP_FWD_CORE wxPoint;
-class WXDLLIMPEXP_FWD_CORE wxRect;
-class WXDLLEXPORT wxAccessibleBase : public wxObject
-{
- DECLARE_NO_COPY_CLASS(wxAccessibleBase)
-
-public:
- wxAccessibleBase(wxWindow* win): m_window(win) {}
- virtual ~wxAccessibleBase() {}
-
-// Overridables
-
- // Can return either a child object, or an integer
- // representing the child element, starting from 1.
- // pt is in screen coordinates.
- virtual wxAccStatus HitTest(const wxPoint& WXUNUSED(pt), int* WXUNUSED(childId), wxAccessible** WXUNUSED(childObject))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns the rectangle for this object (id = 0) or a child element (id > 0).
- // rect is in screen coordinates.
- virtual wxAccStatus GetLocation(wxRect& WXUNUSED(rect), int WXUNUSED(elementId))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Navigates from fromId to toId/toObject.
- virtual wxAccStatus Navigate(wxNavDir WXUNUSED(navDir), int WXUNUSED(fromId),
- int* WXUNUSED(toId), wxAccessible** WXUNUSED(toObject))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Gets the name of the specified object.
- virtual wxAccStatus GetName(int WXUNUSED(childId), wxString* WXUNUSED(name))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Gets the number of children.
- virtual wxAccStatus GetChildCount(int* WXUNUSED(childCount))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Gets the specified child (starting from 1).
- // If *child is NULL and return value is wxACC_OK,
- // this means that the child is a simple element and
- // not an accessible object.
- virtual wxAccStatus GetChild(int WXUNUSED(childId), wxAccessible** WXUNUSED(child))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Gets the parent, or NULL.
- virtual wxAccStatus GetParent(wxAccessible** WXUNUSED(parent))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Performs the default action. childId is 0 (the action for this object)
- // or > 0 (the action for a child).
- // Return wxACC_NOT_SUPPORTED if there is no default action for this
- // window (e.g. an edit control).
- virtual wxAccStatus DoDefaultAction(int WXUNUSED(childId))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Gets the default action for this object (0) or > 0 (the action for a child).
- // Return wxACC_OK even if there is no action. actionName is the action, or the empty
- // string if there is no action.
- // The retrieved string describes the action that is performed on an object,
- // not what the object does as a result. For example, a toolbar button that prints
- // a document has a default action of "Press" rather than "Prints the current document."
- virtual wxAccStatus GetDefaultAction(int WXUNUSED(childId), wxString* WXUNUSED(actionName))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns the description for this object or a child.
- virtual wxAccStatus GetDescription(int WXUNUSED(childId), wxString* WXUNUSED(description))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns help text for this object or a child, similar to tooltip text.
- virtual wxAccStatus GetHelpText(int WXUNUSED(childId), wxString* WXUNUSED(helpText))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns the keyboard shortcut for this object or child.
- // Return e.g. ALT+K
- virtual wxAccStatus GetKeyboardShortcut(int WXUNUSED(childId), wxString* WXUNUSED(shortcut))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns a role constant.
- virtual wxAccStatus GetRole(int WXUNUSED(childId), wxAccRole* WXUNUSED(role))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns a state constant.
- virtual wxAccStatus GetState(int WXUNUSED(childId), long* WXUNUSED(state))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Returns a localized string representing the value for the object
- // or child.
- virtual wxAccStatus GetValue(int WXUNUSED(childId), wxString* WXUNUSED(strValue))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Selects the object or child.
- virtual wxAccStatus Select(int WXUNUSED(childId), wxAccSelectionFlags WXUNUSED(selectFlags))
- { return wxACC_NOT_IMPLEMENTED; }
-
- // Gets the window with the keyboard focus.
- // If childId is 0 and child is NULL, no object in
- // this subhierarchy has the focus.
- // If this object has the focus, child should be 'this'.
- virtual wxAccStatus GetFocus(int* WXUNUSED(childId), wxAccessible** WXUNUSED(child))
- { return wxACC_NOT_IMPLEMENTED; }
-
-#if wxUSE_VARIANT
- // Gets a variant representing the selected children
- // of this object.
- // Acceptable values:
- // - a null variant (IsNull() returns TRUE)
- // - a list variant (GetType() == wxT("list"))
- // - an integer representing the selected child element,
- // or 0 if this object is selected (GetType() == wxT("long"))
- // - a "void*" pointer to a wxAccessible child object
- virtual wxAccStatus GetSelections(wxVariant* WXUNUSED(selections))
- { return wxACC_NOT_IMPLEMENTED; }
-#endif // wxUSE_VARIANT
-
-// Accessors
-
- // Returns the window associated with this object.
-
- wxWindow* GetWindow() { return m_window; }
-
- // Sets the window associated with this object.
-
- void SetWindow(wxWindow* window) { m_window = window; }
-
-// Operations
-
- // Each platform's implementation must define this
- // static void NotifyEvent(int eventType, wxWindow* window, wxAccObject objectType,
- // int objectId);
-
-private:
-
-// Data members
-
- wxWindow* m_window;
-};
-
-
-// ----------------------------------------------------------------------------
-// now include the declaration of the real class
-// ----------------------------------------------------------------------------
-
-#if defined(__WXMSW__)
- #include "wx/msw/ole/access.h"
-#endif
-
-#endif // wxUSE_ACCESSIBILITY
-
-#endif // _WX_ACCESSBASE_H_
-
diff --git a/desmume/src/windows/wx/include/wx/afterstd.h b/desmume/src/windows/wx/include/wx/afterstd.h
deleted file mode 100644
index 4c1d4a5a2..000000000
--- a/desmume/src/windows/wx/include/wx/afterstd.h
+++ /dev/null
@@ -1,48 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/afterstd.h
-// Purpose: #include after STL headers
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 07/07/03
-// RCS-ID: $Id: afterstd.h 42906 2006-11-01 14:16:42Z VZ $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-/**
- See the comments in beforestd.h.
- */
-
-#if defined(__WXMSW__)
- #include "wx/msw/winundef.h"
-#endif
-
-// undo what we did in wx/beforestd.h
-#if defined(__VISUALC__) && __VISUALC__ <= 1201
- // MSVC 5 does not have this
- #if _MSC_VER > 1100
- // don't restore this one for VC6, it gives it in each try/catch which is a
- // bit annoying to say the least
- #if _MSC_VER >= 0x1300
- // unreachable code
- #pragma warning(default:4702)
- #endif // VC++ >= 7
-
- #pragma warning(pop)
- #else
- // 'expression' : signed/unsigned mismatch
- #pragma warning(default:4018)
-
- // 'identifier' : unreferenced formal parameter
- #pragma warning(default:4100)
-
- // 'conversion' : conversion from 'type1' to 'type2',
- // possible loss of data
- #pragma warning(default:4244)
-
- // C++ language change: to explicitly specialize class template
- // 'identifier' use the following syntax
- #pragma warning(default:4663)
- #endif
-#endif
-
diff --git a/desmume/src/windows/wx/include/wx/anidecod.h b/desmume/src/windows/wx/include/wx/anidecod.h
deleted file mode 100644
index 0b664d86b..000000000
--- a/desmume/src/windows/wx/include/wx/anidecod.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/anidecod.h
-// Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
-// Author: Francesco Montorsi
-// CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $
-// Copyright: (c) 2006 Francesco Montorsi
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ANIDECOD_H
-#define _WX_ANIDECOD_H
-
-#include "wx/defs.h"
-
-#if wxUSE_STREAMS && wxUSE_ICO_CUR
-
-#include "wx/stream.h"
-#include "wx/image.h"
-#include "wx/animdecod.h"
-#include "wx/dynarray.h"
-
-
-class /*WXDLLEXPORT*/ wxANIFrameInfo;
-
-WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
-WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
-
-// --------------------------------------------------------------------------
-// wxANIDecoder class
-// --------------------------------------------------------------------------
-
-class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
-{
-public:
- // constructor, destructor, etc.
- wxANIDecoder();
- ~wxANIDecoder();
-
-
- virtual wxSize GetFrameSize(unsigned int frame) const;
- virtual wxPoint GetFramePosition(unsigned int frame) const;
- virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
- virtual long GetDelay(unsigned int frame) const;
- virtual wxColour GetTransparentColour(unsigned int frame) const;
-
- // implementation of wxAnimationDecoder's pure virtuals
- virtual bool CanRead( wxInputStream& stream ) const;
- virtual bool Load( wxInputStream& stream );
-
- bool ConvertToImage(unsigned int frame, wxImage *image) const;
-
- wxAnimationDecoder *Clone() const
- { return new wxANIDecoder; }
- wxAnimationType GetType() const
- { return wxANIMATION_TYPE_ANI; }
-
-private:
- // frames stored as wxImage(s): ANI files are meant to be used mostly for animated
- // cursors and thus they do not use any optimization to encode differences between
- // two frames: they are just a list of images to display sequentially.
- wxImageArray m_images;
-
- // the info about each image stored in m_images.
- // NB: m_info.GetCount() may differ from m_images.GetCount()!
- wxANIFrameInfoArray m_info;
-
- // this is the wxCURHandler used to load the ICON chunk of the ANI files
- static wxCURHandler sm_handler;
-
-
- DECLARE_NO_COPY_CLASS(wxANIDecoder)
-};
-
-
-#endif // wxUSE_STREAM && wxUSE_ICO_CUR
-
-#endif // _WX_ANIDECOD_H
diff --git a/desmume/src/windows/wx/include/wx/animate.h b/desmume/src/windows/wx/include/wx/animate.h
deleted file mode 100644
index 451cce52f..000000000
--- a/desmume/src/windows/wx/include/wx/animate.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/animate.h
-// Purpose: wxAnimation and wxAnimationCtrl
-// Author: Julian Smart and Guillermo Rodriguez Garcia
-// Modified by: Francesco Montorsi
-// Created: 13/8/99
-// RCS-ID: $Id: animate.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ANIMATE_H_
-#define _WX_ANIMATE_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_ANIMATIONCTRL
-
-#include "wx/animdecod.h"
-#include "wx/control.h"
-#include "wx/timer.h"
-#include "wx/bitmap.h"
-
-class WXDLLIMPEXP_FWD_ADV wxAnimation;
-
-extern WXDLLIMPEXP_DATA_ADV(wxAnimation) wxNullAnimation;
-extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxAnimationCtrlNameStr[];
-
-
-// ----------------------------------------------------------------------------
-// wxAnimationBase
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxAnimationBase : public wxGDIObject
-{
-public:
- wxAnimationBase() {}
-
- virtual bool IsOk() const = 0;
-
- // can be -1
- virtual int GetDelay(unsigned int frame) const = 0;
-
- virtual unsigned int GetFrameCount() const = 0;
- virtual wxImage GetFrame(unsigned int frame) const = 0;
- virtual wxSize GetSize() const = 0;
-
- virtual bool LoadFile(const wxString& name,
- wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
- virtual bool Load(wxInputStream& stream,
- wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
-
-protected:
- DECLARE_ABSTRACT_CLASS(wxAnimationBase)
-};
-
-
-
-// ----------------------------------------------------------------------------
-// wxAnimationCtrlBase
-// ----------------------------------------------------------------------------
-
-// do not autoresize to the animation's size when SetAnimation() is called
-#define wxAC_NO_AUTORESIZE (0x0010)
-
-// default style does not include wxAC_NO_AUTORESIZE, that is, the control
-// auto-resizes by default to fit the new animation when SetAnimation() is called
-#define wxAC_DEFAULT_STYLE (wxNO_BORDER)
-
-class WXDLLIMPEXP_ADV wxAnimationCtrlBase : public wxControl
-{
-public:
- wxAnimationCtrlBase() { }
-
- // public API
- virtual bool LoadFile(const wxString& filename,
- wxAnimationType type = wxANIMATION_TYPE_ANY) = 0;
-
- virtual void SetAnimation(const wxAnimation &anim) = 0;
- virtual wxAnimation GetAnimation() const = 0;
-
- virtual bool Play() = 0;
- virtual void Stop() = 0;
-
- virtual bool IsPlaying() const = 0;
-
- virtual void SetInactiveBitmap(const wxBitmap &bmp);
-
- // always return the original bitmap set in this control
- wxBitmap GetInactiveBitmap() const
- { return m_bmpStatic; }
-
-protected:
- // the inactive bitmap as it was set by the user
- wxBitmap m_bmpStatic;
-
- // the inactive bitmap currently shown in the control
- // (may differ in the size from m_bmpStatic)
- wxBitmap m_bmpStaticReal;
-
- // updates m_bmpStaticReal from m_bmpStatic if needed
- virtual void UpdateStaticImage();
-
- // called by SetInactiveBitmap
- virtual void DisplayStaticImage() = 0;
-
-private:
- DECLARE_ABSTRACT_CLASS(wxAnimationCtrlBase)
-};
-
-
-// ----------------------------------------------------------------------------
-// include the platform-specific version of the wxAnimationCtrl class
-// ----------------------------------------------------------------------------
-
-#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
- #include "wx/gtk/animate.h"
-#else
- #include "wx/generic/animate.h"
-#endif
-
-#endif // wxUSE_ANIMATIONCTRL
-
-#endif // _WX_ANIMATE_H_
diff --git a/desmume/src/windows/wx/include/wx/animdecod.h b/desmume/src/windows/wx/include/wx/animdecod.h
deleted file mode 100644
index d6dc9a48d..000000000
--- a/desmume/src/windows/wx/include/wx/animdecod.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/animdecod.h
-// Purpose: wxAnimationDecoder
-// Author: Francesco Montorsi
-// CVS-ID: $Id: animdecod.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) 2006 Francesco Montorsi
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ANIMDECOD_H
-#define _WX_ANIMDECOD_H
-
-#include "wx/defs.h"
-
-#if wxUSE_STREAMS
-
-#include "wx/colour.h"
-#include "wx/gdicmn.h"
-
-class WXDLLIMPEXP_FWD_BASE wxInputStream;
-class WXDLLIMPEXP_FWD_CORE wxImage;
-
-/*
-
- Differences between a wxAnimationDecoder and a wxImageHandler:
-
- 1) wxImageHandlers always load an input stream directly into a given wxImage
- object converting from the format-specific data representation to the
- wxImage native format (RGB24).
- wxAnimationDecoders always load an input stream using some optimized format
- to store it which is format-depedent. This allows to store a (possibly big)
- animation using a format which is a good compromise between required memory
- and time required to blit in on the screen.
-
- 2) wxAnimationDecoders contain the animation data in some internal var.
- That's why they derive from wxObjectRefData: they are data which can be shared.
-
- 3) wxAnimationDecoders can be used by a wxImageHandler to retrieve a frame
- in wxImage format; the viceversa cannot be done.
-
- 4) wxAnimationDecoders are decoders only, thus do not support save features.
-
- 5) wxAnimationDecoders are directly used by wxAnimation (generic implementation)
- as wxObjectRefData while they need to be 'wrapped' by a wxImageHandler for
- wxImage uses.
-
-*/
-
-
-// --------------------------------------------------------------------------
-// Constants
-// --------------------------------------------------------------------------
-
-// NB: the values of these enum items are not casual but coincide with the
-// GIF disposal codes. Do not change them !!
-enum wxAnimationDisposal
-{
- // No disposal specified. The decoder is not required to take any action.
- wxANIM_UNSPECIFIED = -1,
-
- // Do not dispose. The graphic is to be left in place.
- wxANIM_DONOTREMOVE = 0,
-
- // Restore to background color. The area used by the graphic must be
- // restored to the background color.
- wxANIM_TOBACKGROUND = 1,
-
- // Restore to previous. The decoder is required to restore the area
- // overwritten by the graphic with what was there prior to rendering the graphic.
- wxANIM_TOPREVIOUS = 2
-};
-
-enum wxAnimationType
-{
- wxANIMATION_TYPE_INVALID,
- wxANIMATION_TYPE_GIF,
- wxANIMATION_TYPE_ANI,
-
- wxANIMATION_TYPE_ANY
-};
-
-
-// --------------------------------------------------------------------------
-// wxAnimationDecoder class
-// --------------------------------------------------------------------------
-
-class WXDLLEXPORT wxAnimationDecoder : public wxObjectRefData
-{
-public:
- wxAnimationDecoder()
- {
- m_background = wxNullColour;
- m_nFrames = 0;
- }
- virtual ~wxAnimationDecoder() { }
-
-
- virtual bool Load( wxInputStream& stream ) = 0;
- virtual bool CanRead( wxInputStream& stream ) const = 0;
-
- virtual wxAnimationDecoder *Clone() const = 0;
- virtual wxAnimationType GetType() const = 0;
-
- // convert given frame to wxImage
- virtual bool ConvertToImage(unsigned int frame, wxImage *image) const = 0;
-
-
- // frame specific data getters
-
- // not all frames may be of the same size; e.g. GIF allows to
- // specify that between two frames only a smaller portion of the
- // entire animation has changed.
- virtual wxSize GetFrameSize(unsigned int frame) const = 0;
-
- // the position of this frame in case it's not as big as m_szAnimation
- // or wxPoint(0,0) otherwise.
- virtual wxPoint GetFramePosition(unsigned int frame) const = 0;
-
- // what should be done after displaying this frame.
- virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const = 0;
-
- // the number of milliseconds this frame should be displayed.
- // if returns -1 then the frame must be displayed forever.
- virtual long GetDelay(unsigned int frame) const = 0;
-
- // the transparent colour for this frame if any or wxNullColour.
- virtual wxColour GetTransparentColour(unsigned int frame) const = 0;
-
- // get global data
- wxSize GetAnimationSize() const { return m_szAnimation; }
- wxColour GetBackgroundColour() const { return m_background; }
- unsigned int GetFrameCount() const { return m_nFrames; }
-
-protected:
- wxSize m_szAnimation;
- unsigned int m_nFrames;
-
- // this is the colour to use for the wxANIM_TOBACKGROUND disposal.
- // if not specified by the animation, it's set to wxNullColour
- wxColour m_background;
-};
-
-
-#endif // wxUSE_STREAM
-#endif // _WX_ANIMDECOD_H
-
diff --git a/desmume/src/windows/wx/include/wx/app.h b/desmume/src/windows/wx/include/wx/app.h
deleted file mode 100644
index 1846d563e..000000000
--- a/desmume/src/windows/wx/include/wx/app.h
+++ /dev/null
@@ -1,708 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/app.h
-// Purpose: wxAppBase class and macros used for declaration of wxApp
-// derived class in the user code
-// Author: Julian Smart
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: app.h 51592 2008-02-08 08:17:41Z VZ $
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_APP_H_BASE_
-#define _WX_APP_H_BASE_
-
-// ----------------------------------------------------------------------------
-// headers we have to include here
-// ----------------------------------------------------------------------------
-
-#include "wx/event.h" // for the base class
-#include "wx/build.h"
-#include "wx/init.h" // we must declare wxEntry()
-#include "wx/intl.h" // for wxLayoutDirection
-
-class WXDLLIMPEXP_FWD_BASE wxAppConsole;
-class WXDLLIMPEXP_FWD_BASE wxAppTraits;
-class WXDLLIMPEXP_FWD_BASE wxCmdLineParser;
-class WXDLLIMPEXP_FWD_BASE wxLog;
-class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
-
-#if wxUSE_GUI
- class WXDLLIMPEXP_FWD_BASE wxEventLoop;
- struct WXDLLIMPEXP_FWD_CORE wxVideoMode;
-#endif
-
-// ----------------------------------------------------------------------------
-// typedefs
-// ----------------------------------------------------------------------------
-
-// the type of the function used to create a wxApp object on program start up
-typedef wxAppConsole* (*wxAppInitializerFunction)();
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-enum
-{
- wxPRINT_WINDOWS = 1,
- wxPRINT_POSTSCRIPT = 2
-};
-
-// ----------------------------------------------------------------------------
-// wxAppConsole: wxApp for non-GUI applications
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxAppConsole : public wxEvtHandler
-{
-public:
- // ctor and dtor
- wxAppConsole();
- virtual ~wxAppConsole();
-
-
- // the virtual functions which may/must be overridden in the derived class
- // -----------------------------------------------------------------------
-
- // This is the very first function called for a newly created wxApp object,
- // it is used by the library to do the global initialization. If, for some
- // reason, you must override it (instead of just overriding OnInit(), as
- // usual, for app-specific initializations), do not forget to call the base
- // class version!
- virtual bool Initialize(int& argc, wxChar **argv);
-
- // This gives wxCocoa a chance to call OnInit() with a memory pool in place
- virtual bool CallOnInit() { return OnInit(); }
-
- // Called before OnRun(), this is a good place to do initialization -- if
- // anything fails, return false from here to prevent the program from
- // continuing. The command line is normally parsed here, call the base
- // class OnInit() to do it.
- virtual bool OnInit();
-
- // this is here only temporary hopefully (FIXME)
- virtual bool OnInitGui() { return true; }
-
- // This is the replacement for the normal main(): all program work should
- // be done here. When OnRun() returns, the programs starts shutting down.
- virtual int OnRun() = 0;
-
- // This is only called if OnInit() returned true so it's a good place to do
- // any cleanup matching the initializations done there.
- virtual int OnExit();
-
- // This is the very last function called on wxApp object before it is
- // destroyed. If you override it (instead of overriding OnExit() as usual)
- // do not forget to call the base class version!
- virtual void CleanUp();
-
- // Called when a fatal exception occurs, this function should take care not
- // to do anything which might provoke a nested exception! It may be
- // overridden if you wish to react somehow in non-default way (core dump
- // under Unix, application crash under Windows) to fatal program errors,
- // however extreme care should be taken if you don't want this function to
- // crash.
- virtual void OnFatalException() { }
-
- // Called from wxExit() function, should terminate the application a.s.a.p.
- virtual void Exit();
-
-
- // application info: name, description, vendor
- // -------------------------------------------
-
- // NB: all these should be set by the application itself, there are no
- // reasonable default except for the application name which is taken to
- // be argv[0]
-
- // set/get the application name
- wxString GetAppName() const
- {
- return m_appName.empty() ? m_className : m_appName;
- }
- void SetAppName(const wxString& name) { m_appName = name; }
-
- // set/get the app class name
- wxString GetClassName() const { return m_className; }
- void SetClassName(const wxString& name) { m_className = name; }
-
- // set/get the vendor name
- const wxString& GetVendorName() const { return m_vendorName; }
- void SetVendorName(const wxString& name) { m_vendorName = name; }
-
-
- // cmd line parsing stuff
- // ----------------------
-
- // all of these methods may be overridden in the derived class to
- // customize the command line parsing (by default only a few standard
- // options are handled)
- //
- // you also need to call wxApp::OnInit() from YourApp::OnInit() for all
- // this to work
-
-#if wxUSE_CMDLINE_PARSER
- // this one is called from OnInit() to add all supported options
- // to the given parser (don't forget to call the base class version if you
- // override it!)
- virtual void OnInitCmdLine(wxCmdLineParser& parser);
-
- // called after successfully parsing the command line, return true
- // to continue and false to exit (don't forget to call the base class
- // version if you override it!)
- virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
-
- // called if "--help" option was specified, return true to continue
- // and false to exit
- virtual bool OnCmdLineHelp(wxCmdLineParser& parser);
-
- // called if incorrect command line options were given, return
- // false to abort and true to continue
- virtual bool OnCmdLineError(wxCmdLineParser& parser);
-#endif // wxUSE_CMDLINE_PARSER
-
-
- // miscellaneous customization functions
- // -------------------------------------
-
- // create the app traits object to which we delegate for everything which
- // either should be configurable by the user (then he can change the
- // default behaviour simply by overriding CreateTraits() and returning his
- // own traits object) or which is GUI/console dependent as then wxAppTraits
- // allows us to abstract the differences behind the common façade
- wxAppTraits *GetTraits();
-
- // the functions below shouldn't be used now that we have wxAppTraits
-#if WXWIN_COMPATIBILITY_2_4
-
-#if wxUSE_LOG
- // override this function to create default log target of arbitrary
- // user-defined class (default implementation creates a wxLogGui
- // object) -- this log object is used by default by all wxLogXXX()
- // functions.
- wxDEPRECATED( virtual wxLog *CreateLogTarget() );
-#endif // wxUSE_LOG
-
- // similar to CreateLogTarget() but for the global wxMessageOutput
- // object
- wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );
-
-#endif // WXWIN_COMPATIBILITY_2_4
-
-
- // event processing functions
- // --------------------------
-
- // this method allows to filter all the events processed by the program, so
- // you should try to return quickly from it to avoid slowing down the
- // program to the crawl
- //
- // return value should be -1 to continue with the normal event processing,
- // or TRUE or FALSE to stop further processing and pretend that the event
- // had been already processed or won't be processed at all, respectively
- virtual int FilterEvent(wxEvent& event);
-
-#if wxUSE_EXCEPTIONS
- // call the specified handler on the given object with the given event
- //
- // this method only exists to allow catching the exceptions thrown by any
- // event handler, it would lead to an extra (useless) virtual function call
- // if the exceptions were not used, so it doesn't even exist in that case
- virtual void HandleEvent(wxEvtHandler *handler,
- wxEventFunction func,
- wxEvent& event) const;
-
- // Called when an unhandled C++ exception occurs inside OnRun(): note that
- // the exception type is lost by now, so if you really want to handle the
- // exception you should override OnRun() and put a try/catch around
- // MainLoop() call there or use OnExceptionInMainLoop()
- virtual void OnUnhandledException() { }
-#endif // wxUSE_EXCEPTIONS
-
- // process all events in the wxPendingEvents list -- it is necessary to
- // call this function to process posted events. This happens during each
- // event loop iteration in GUI mode but if there is no main loop, it may be
- // also called directly.
- virtual void ProcessPendingEvents();
-
- // doesn't do anything in this class, just a hook for GUI wxApp
- virtual bool Yield(bool WXUNUSED(onlyIfNeeded) = false) { return true; }
-
- // make sure that idle events are sent again
- virtual void WakeUpIdle() { }
-
- // this is just a convenience: by providing its implementation here we
- // avoid #ifdefs in the code using it
- static bool IsMainLoopRunning() { return false; }
-
-
- // debugging support
- // -----------------
-
-#ifdef __WXDEBUG__
- // this function is called when an assert failure occurs, the base class
- // version does the normal processing (i.e. shows the usual assert failure
- // dialog box)
- //
- // the arguments are the location of the failed assert (func may be empty
- // if the compiler doesn't support C99 __FUNCTION__), the text of the
- // assert itself and the user-specified message
- virtual void OnAssertFailure(const wxChar *file,
- int line,
- const wxChar *func,
- const wxChar *cond,
- const wxChar *msg);
-
- // old version of the function without func parameter, for compatibility
- // only, override OnAssertFailure() in the new code
- virtual void OnAssert(const wxChar *file,
- int line,
- const wxChar *cond,
- const wxChar *msg);
-#endif // __WXDEBUG__
-
- // check that the wxBuildOptions object (constructed in the application
- // itself, usually the one from IMPLEMENT_APP() macro) matches the build
- // options of the library and abort if it doesn't
- static bool CheckBuildOptions(const char *optionsSignature,
- const char *componentName);
-#if WXWIN_COMPATIBILITY_2_4
- wxDEPRECATED( static bool CheckBuildOptions(const wxBuildOptions& buildOptions) );
-#endif
-
- // implementation only from now on
- // -------------------------------
-
- // helpers for dynamic wxApp construction
- static void SetInitializerFunction(wxAppInitializerFunction fn)
- { ms_appInitFn = fn; }
- static wxAppInitializerFunction GetInitializerFunction()
- { return ms_appInitFn; }
-
- // accessors for ms_appInstance field (external code might wish to modify
- // it, this is why we provide a setter here as well, but you should really
- // know what you're doing if you call it), wxTheApp is usually used instead
- // of GetInstance()
- static wxAppConsole *GetInstance() { return ms_appInstance; }
- static void SetInstance(wxAppConsole *app) { ms_appInstance = app; }
-
-
- // command line arguments (public for backwards compatibility)
- int argc;
- wxChar **argv;
-
-protected:
- // the function which creates the traits object when GetTraits() needs it
- // for the first time
- virtual wxAppTraits *CreateTraits();
-
-
- // function used for dynamic wxApp creation
- static wxAppInitializerFunction ms_appInitFn;
-
- // the one and only global application object
- static wxAppConsole *ms_appInstance;
-
-
- // application info (must be set from the user code)
- wxString m_vendorName, // vendor name (ACME Inc)
- m_appName, // app name
- m_className; // class name
-
- // the class defining the application behaviour, NULL initially and created
- // by GetTraits() when first needed
- wxAppTraits *m_traits;
-
-
- // the application object is a singleton anyhow, there is no sense in
- // copying it
- DECLARE_NO_COPY_CLASS(wxAppConsole)
-};
-
-// ----------------------------------------------------------------------------
-// wxAppBase: the common part of wxApp implementations for all platforms
-// ----------------------------------------------------------------------------
-
-#if wxUSE_GUI
-
-class WXDLLIMPEXP_CORE wxAppBase : public wxAppConsole
-{
-public:
- wxAppBase();
- virtual ~wxAppBase();
-
- // the virtual functions which may/must be overridden in the derived class
- // -----------------------------------------------------------------------
-
- // very first initialization function
- //
- // Override: very rarely
- virtual bool Initialize(int& argc, wxChar **argv);
-
- // a platform-dependent version of OnInit(): the code here is likely to
- // depend on the toolkit. default version does nothing.
- //
- // Override: rarely.
- virtual bool OnInitGui();
-
- // called to start program execution - the default version just enters
- // the main GUI loop in which events are received and processed until
- // the last window is not deleted (if GetExitOnFrameDelete) or
- // ExitMainLoop() is called. In console mode programs, the execution
- // of the program really starts here
- //
- // Override: rarely in GUI applications, always in console ones.
- virtual int OnRun();
-
- // a matching function for OnInit()
- virtual int OnExit();
-
- // very last clean up function
- //
- // Override: very rarely
- virtual void CleanUp();
-
-
- // the worker functions - usually not used directly by the user code
- // -----------------------------------------------------------------
-
- // return true if we're running main loop, i.e. if the events can
- // (already) be dispatched
- static bool IsMainLoopRunning()
- {
- wxAppBase *app = wx_static_cast(wxAppBase *, GetInstance());
- return app && app->m_mainLoop != NULL;
- }
-
- // execute the main GUI loop, the function returns when the loop ends
- virtual int MainLoop();
-
- // exit the main loop thus terminating the application
- virtual void Exit();
-
- // exit the main GUI loop during the next iteration (i.e. it does not
- // stop the program immediately!)
- virtual void ExitMainLoop();
-
- // returns true if there are unprocessed events in the event queue
- virtual bool Pending();
-
- // process the first event in the event queue (blocks until an event
- // appears if there are none currently, use Pending() if this is not
- // wanted), returns false if the event loop should stop and true
- // otherwise
- virtual bool Dispatch();
-
- // process all currently pending events right now
- //
- // it is an error to call Yield() recursively unless the value of
- // onlyIfNeeded is true
- //
- // WARNING: this function is dangerous as it can lead to unexpected
- // reentrancies (i.e. when called from an event handler it
- // may result in calling the same event handler again), use
- // with _extreme_ care or, better, don't use at all!
- virtual bool Yield(bool onlyIfNeeded = false) = 0;
-
- // this virtual function is called in the GUI mode when the application
- // becomes idle and normally just sends wxIdleEvent to all interested
- // parties
- //
- // it should return true if more idle events are needed, false if not
- virtual bool ProcessIdle();
-
- // Send idle event to window and all subwindows
- // Returns true if more idle time is requested.
- virtual bool SendIdleEvents(wxWindow* win, wxIdleEvent& event);
-
-
-#if wxUSE_EXCEPTIONS
- // Function called if an uncaught exception is caught inside the main
- // event loop: it may return true to continue running the event loop or
- // false to stop it (in the latter case it may rethrow the exception as
- // well)
- virtual bool OnExceptionInMainLoop();
-#endif // wxUSE_EXCEPTIONS
-
-
- // top level window functions
- // --------------------------
-
- // return true if our app has focus
- virtual bool IsActive() const { return m_isActive; }
-
- // set the "main" top level window
- void SetTopWindow(wxWindow *win) { m_topWindow = win; }
-
- // return the "main" top level window (if it hadn't been set previously
- // with SetTopWindow(), will return just some top level window and, if
- // there are none, will return NULL)
- virtual wxWindow *GetTopWindow() const;
-
- // control the exit behaviour: by default, the program will exit the
- // main loop (and so, usually, terminate) when the last top-level
- // program window is deleted. Beware that if you disable this behaviour
- // (with SetExitOnFrameDelete(false)), you'll have to call
- // ExitMainLoop() explicitly from somewhere.
- void SetExitOnFrameDelete(bool flag)
- { m_exitOnFrameDelete = flag ? Yes : No; }
- bool GetExitOnFrameDelete() const
- { return m_exitOnFrameDelete == Yes; }
-
-
- // display mode, visual, printing mode, ...
- // ------------------------------------------------------------------------
-
- // Get display mode that is used use. This is only used in framebuffer
- // wxWin ports (such as wxMGL or wxDFB).
- virtual wxVideoMode GetDisplayMode() const;
- // Set display mode to use. This is only used in framebuffer wxWin
- // ports (such as wxMGL or wxDFB). This method should be called from
- // wxApp::OnInitGui
- virtual bool SetDisplayMode(const wxVideoMode& WXUNUSED(info)) { return true; }
-
- // set use of best visual flag (see below)
- void SetUseBestVisual( bool flag, bool forceTrueColour = false )
- { m_useBestVisual = flag; m_forceTrueColour = forceTrueColour; }
- bool GetUseBestVisual() const { return m_useBestVisual; }
-
- // set/get printing mode: see wxPRINT_XXX constants.
- //
- // default behaviour is the normal one for Unix: always use PostScript
- // printing.
- virtual void SetPrintMode(int WXUNUSED(mode)) { }
- int GetPrintMode() const { return wxPRINT_POSTSCRIPT; }
-
- // Return the layout direction for the current locale or wxLayout_Default
- // if it's unknown
- virtual wxLayoutDirection GetLayoutDirection() const;
-
-
- // command line parsing (GUI-specific)
- // ------------------------------------------------------------------------
-
-#if wxUSE_CMDLINE_PARSER
- virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
- virtual void OnInitCmdLine(wxCmdLineParser& parser);
-#endif
-
- // miscellaneous other stuff
- // ------------------------------------------------------------------------
-
- // called by toolkit-specific code to set the app status: active (we have
- // focus) or not and also the last window which had focus before we were
- // deactivated
- virtual void SetActive(bool isActive, wxWindow *lastFocus);
-
-#if WXWIN_COMPATIBILITY_2_6
- // OBSOLETE: don't use, always returns true
- //
- // returns true if the program is successfully initialized
- wxDEPRECATED( bool Initialized() );
-#endif // WXWIN_COMPATIBILITY_2_6
-
- // perform standard OnIdle behaviour, ensure that this is always called
- void OnIdle(wxIdleEvent& event);
-
-
-protected:
- // delete all objects in wxPendingDelete list
- void DeletePendingObjects();
-
- // override base class method to use GUI traits
- virtual wxAppTraits *CreateTraits();
-
-
- // the main event loop of the application (may be NULL if the loop hasn't
- // been started yet or has already terminated)
- wxEventLoop *m_mainLoop;
-
- // the main top level window (may be NULL)
- wxWindow *m_topWindow;
-
- // if Yes, exit the main loop when the last top level window is deleted, if
- // No don't do it and if Later -- only do it once we reach our OnRun()
- //
- // the explanation for using this strange scheme is given in appcmn.cpp
- enum
- {
- Later = -1,
- No,
- Yes
- } m_exitOnFrameDelete;
-
- // true if the app wants to use the best visual on systems where
- // more than one are available (Sun, SGI, XFree86 4.0 ?)
- bool m_useBestVisual;
- // force TrueColour just in case "best" isn't TrueColour
- bool m_forceTrueColour;
-
- // does any of our windows have focus?
- bool m_isActive;
-
-
- DECLARE_NO_COPY_CLASS(wxAppBase)
-};
-
-#if WXWIN_COMPATIBILITY_2_6
- inline bool wxAppBase::Initialized() { return true; }
-#endif // WXWIN_COMPATIBILITY_2_6
-
-#endif // wxUSE_GUI
-
-// ----------------------------------------------------------------------------
-// now include the declaration of the real class
-// ----------------------------------------------------------------------------
-
-#if wxUSE_GUI
- #if defined(__WXPALMOS__)
- #include "wx/palmos/app.h"
- #elif defined(__WXMSW__)
- #include "wx/msw/app.h"
- #elif defined(__WXMOTIF__)
- #include "wx/motif/app.h"
- #elif defined(__WXMGL__)
- #include "wx/mgl/app.h"
- #elif defined(__WXDFB__)
- #include "wx/dfb/app.h"
- #elif defined(__WXGTK20__)
- #include "wx/gtk/app.h"
- #elif defined(__WXGTK__)
- #include "wx/gtk1/app.h"
- #elif defined(__WXX11__)
- #include "wx/x11/app.h"
- #elif defined(__WXMAC__)
- #include "wx/mac/app.h"
- #elif defined(__WXCOCOA__)
- #include "wx/cocoa/app.h"
- #elif defined(__WXPM__)
- #include "wx/os2/app.h"
- #endif
-#else // !GUI
- // allow using just wxApp (instead of wxAppConsole) in console programs
- typedef wxAppConsole wxApp;
-#endif // GUI/!GUI
-
-// ----------------------------------------------------------------------------
-// the global data
-// ----------------------------------------------------------------------------
-
-// for compatibility, we define this macro to access the global application
-// object of type wxApp
-//
-// note that instead of using of wxTheApp in application code you should
-// consider using DECLARE_APP() after which you may call wxGetApp() which will
-// return the object of the correct type (i.e. MyApp and not wxApp)
-//
-// the cast is safe as in GUI build we only use wxApp, not wxAppConsole, and in
-// console mode it does nothing at all
-#define wxTheApp wx_static_cast(wxApp*, wxApp::GetInstance())
-
-// ----------------------------------------------------------------------------
-// global functions
-// ----------------------------------------------------------------------------
-
-// event loop related functions only work in GUI programs
-// ------------------------------------------------------
-
-// Force an exit from main loop
-extern void WXDLLIMPEXP_BASE wxExit();
-
-// avoid redeclaring this function here if it had been already declated by
-// wx/utils.h, this results in warnings from g++ with -Wredundant-decls
-#ifndef wx_YIELD_DECLARED
-#define wx_YIELD_DECLARED
-
-// Yield to other apps/messages
-extern bool WXDLLIMPEXP_BASE wxYield();
-
-#endif // wx_YIELD_DECLARED
-
-// Yield to other apps/messages
-extern void WXDLLIMPEXP_BASE wxWakeUpIdle();
-
-// ----------------------------------------------------------------------------
-// macros for dynamic creation of the application object
-// ----------------------------------------------------------------------------
-
-// Having a global instance of this class allows wxApp to be aware of the app
-// creator function. wxApp can then call this function to create a new app
-// object. Convoluted, but necessary.
-
-class WXDLLIMPEXP_BASE wxAppInitializer
-{
-public:
- wxAppInitializer(wxAppInitializerFunction fn)
- { wxApp::SetInitializerFunction(fn); }
-};
-
-// the code below defines a IMPLEMENT_WXWIN_MAIN macro which you can use if
-// your compiler really, really wants main() to be in your main program (e.g.
-// hello.cpp). Now IMPLEMENT_APP should add this code if required.
-
-#define IMPLEMENT_WXWIN_MAIN_CONSOLE \
- int main(int argc, char **argv) { return wxEntry(argc, argv); }
-
-// port-specific header could have defined it already in some special way
-#ifndef IMPLEMENT_WXWIN_MAIN
- #define IMPLEMENT_WXWIN_MAIN IMPLEMENT_WXWIN_MAIN_CONSOLE
-#endif // defined(IMPLEMENT_WXWIN_MAIN)
-
-#ifdef __WXUNIVERSAL__
- #include "wx/univ/theme.h"
-
- #ifdef wxUNIV_DEFAULT_THEME
- #define IMPLEMENT_WX_THEME_SUPPORT \
- WX_USE_THEME(wxUNIV_DEFAULT_THEME);
- #else
- #define IMPLEMENT_WX_THEME_SUPPORT
- #endif
-#else
- #define IMPLEMENT_WX_THEME_SUPPORT
-#endif
-
-// Use this macro if you want to define your own main() or WinMain() function
-// and call wxEntry() from there.
-#define IMPLEMENT_APP_NO_MAIN(appname) \
- wxAppConsole *wxCreateApp() \
- { \
- wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
- "your program"); \
- return new appname; \
- } \
- wxAppInitializer \
- wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
- DECLARE_APP(appname) \
- appname& wxGetApp() { return *wx_static_cast(appname*, wxApp::GetInstance()); }
-
-// Same as IMPLEMENT_APP() normally but doesn't include themes support in
-// wxUniversal builds
-#define IMPLEMENT_APP_NO_THEMES(appname) \
- IMPLEMENT_APP_NO_MAIN(appname) \
- IMPLEMENT_WXWIN_MAIN
-
-// Use this macro exactly once, the argument is the name of the wxApp-derived
-// class which is the class of your application.
-#define IMPLEMENT_APP(appname) \
- IMPLEMENT_APP_NO_THEMES(appname) \
- IMPLEMENT_WX_THEME_SUPPORT
-
-// Same as IMPLEMENT_APP(), but for console applications.
-#define IMPLEMENT_APP_CONSOLE(appname) \
- IMPLEMENT_APP_NO_MAIN(appname) \
- IMPLEMENT_WXWIN_MAIN_CONSOLE
-
-// this macro can be used multiple times and just allows you to use wxGetApp()
-// function
-#define DECLARE_APP(appname) extern appname& wxGetApp();
-
-
-// declare the stuff defined by IMPLEMENT_APP() macro, it's not really needed
-// anywhere else but at the very least it suppresses icc warnings about
-// defining extern symbols without prior declaration, and it shouldn't do any
-// harm
-extern wxAppConsole *wxCreateApp();
-extern wxAppInitializer wxTheAppInitializer;
-
-#endif // _WX_APP_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/apptrait.h b/desmume/src/windows/wx/include/wx/apptrait.h
deleted file mode 100644
index 3bb91f520..000000000
--- a/desmume/src/windows/wx/include/wx/apptrait.h
+++ /dev/null
@@ -1,272 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/apptrait.h
-// Purpose: declaration of wxAppTraits and derived classes
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 19.06.2003
-// RCS-ID: $Id: apptrait.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_APPTRAIT_H_
-#define _WX_APPTRAIT_H_
-
-#include "wx/string.h"
-#include "wx/platinfo.h"
-
-class WXDLLIMPEXP_FWD_BASE wxObject;
-class WXDLLIMPEXP_FWD_BASE wxAppTraits;
-#if wxUSE_FONTMAP
- class WXDLLIMPEXP_FWD_CORE wxFontMapper;
-#endif // wxUSE_FONTMAP
-class WXDLLIMPEXP_FWD_BASE wxLog;
-class WXDLLIMPEXP_FWD_BASE wxMessageOutput;
-class WXDLLIMPEXP_FWD_CORE wxRendererNative;
-class WXDLLIMPEXP_FWD_BASE wxString;
-
-class GSocketGUIFunctionsTable;
-
-
-// ----------------------------------------------------------------------------
-// wxAppTraits: this class defines various configurable aspects of wxApp
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_BASE wxStandardPathsBase;
-
-class WXDLLIMPEXP_BASE wxAppTraitsBase
-{
-public:
- // needed since this class declares virtual members
- virtual ~wxAppTraitsBase() { }
-
- // hooks for creating the global objects, may be overridden by the user
- // ------------------------------------------------------------------------
-
-#if wxUSE_LOG
- // create the default log target
- virtual wxLog *CreateLogTarget() = 0;
-#endif // wxUSE_LOG
-
- // create the global object used for printing out messages
- virtual wxMessageOutput *CreateMessageOutput() = 0;
-
-#if wxUSE_FONTMAP
- // create the global font mapper object used for encodings/charset mapping
- virtual wxFontMapper *CreateFontMapper() = 0;
-#endif // wxUSE_FONTMAP
-
- // get the renderer to use for drawing the generic controls (return value
- // may be NULL in which case the default renderer for the current platform
- // is used); this is used in GUI only and always returns NULL in console
- //
- // NB: returned pointer will be deleted by the caller
- virtual wxRendererNative *CreateRenderer() = 0;
-
-#if wxUSE_STDPATHS
- // wxStandardPaths object is normally the same for wxBase and wxGUI
- // except in the case of wxMac and wxCocoa
- virtual wxStandardPathsBase& GetStandardPaths();
-#endif // wxUSE_STDPATHS
-
- // functions abstracting differences between GUI and console modes
- // ------------------------------------------------------------------------
-
-#ifdef __WXDEBUG__
- // show the assert dialog with the specified message in GUI or just print
- // the string to stderr in console mode
- //
- // base class version has an implementation (in spite of being pure
- // virtual) in base/appbase.cpp which can be called as last resort.
- //
- // return true to suppress subsequent asserts, false to continue as before
- virtual bool ShowAssertDialog(const wxString& msg) = 0;
-#endif // __WXDEBUG__
-
- // return true if fprintf(stderr) goes somewhere, false otherwise
- virtual bool HasStderr() = 0;
-
- // managing "pending delete" list: in GUI mode we can't immediately delete
- // some objects because there may be unprocessed events for them and so we
- // only do it during the next idle loop iteration while this is, of course,
- // unnecessary in wxBase, so we have a few functions to abstract these
- // operations
-
- // add the object to the pending delete list in GUI, delete it immediately
- // in wxBase
- virtual void ScheduleForDestroy(wxObject *object) = 0;
-
- // remove this object from the pending delete list in GUI, do nothing in
- // wxBase
- virtual void RemoveFromPendingDelete(wxObject *object) = 0;
-
-#if wxUSE_SOCKETS
- // return table of GUI callbacks for GSocket code or NULL in wxBase. This
- // is needed because networking classes are in their own library and so
- // they can't directly call GUI functions (the same net library can be
- // used in both GUI and base apps). To complicate it further, GUI library
- // ("wxCore") doesn't depend on networking library and so only a functions
- // table can be passed around
- virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable() = 0;
-#endif
-
- // return information about the (native) toolkit currently used and its
- // runtime (not compile-time) version.
- // returns wxPORT_BASE for console applications and one of the remaining
- // wxPORT_* values for GUI applications.
- virtual wxPortId GetToolkitVersion(int *majVer, int *minVer) const = 0;
-
- // return true if the port is using wxUniversal for the GUI, false if not
- virtual bool IsUsingUniversalWidgets() const = 0;
-
- // return the name of the Desktop Environment such as
- // "KDE" or "GNOME". May return an empty string.
- virtual wxString GetDesktopEnvironment() const { return wxEmptyString; }
-
-protected:
-#if wxUSE_STACKWALKER && defined( __WXDEBUG__ )
- // utility function: returns the stack frame as a plain wxString
- virtual wxString GetAssertStackTrace();
-#endif
-};
-
-// ----------------------------------------------------------------------------
-// include the platform-specific version of the class
-// ----------------------------------------------------------------------------
-
-// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the
-// Unix code (and otherwise __UNIX__ wouldn't be defined)
-// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
-#if defined(__WXPALMOS__)
- #include "wx/palmos/apptbase.h"
-#elif defined(__WIN32__)
- #include "wx/msw/apptbase.h"
-#elif defined(__UNIX__) && !defined(__EMX__)
- #include "wx/unix/apptbase.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/apptbase.h"
-#elif defined(__OS2__)
- #include "wx/os2/apptbase.h"
-#else // no platform-specific methods to add to wxAppTraits
- // wxAppTraits must be a class because it was forward declared as class
- class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase
- {
- };
-#endif // platform
-
-// ============================================================================
-// standard traits for console and GUI applications
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxConsoleAppTraitsBase : public wxAppTraits
-{
-public:
-#if wxUSE_LOG
- virtual wxLog *CreateLogTarget();
-#endif // wxUSE_LOG
- virtual wxMessageOutput *CreateMessageOutput();
-#if wxUSE_FONTMAP
- virtual wxFontMapper *CreateFontMapper();
-#endif // wxUSE_FONTMAP
- virtual wxRendererNative *CreateRenderer();
-#if wxUSE_SOCKETS
- virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
-#endif
-
-#ifdef __WXDEBUG__
- virtual bool ShowAssertDialog(const wxString& msg);
-#endif // __WXDEBUG__
- virtual bool HasStderr();
-
- virtual void ScheduleForDestroy(wxObject *object);
- virtual void RemoveFromPendingDelete(wxObject *object);
-
- // the GetToolkitVersion for console application is always the same
- virtual wxPortId GetToolkitVersion(int *verMaj, int *verMin) const
- {
- // no toolkits (wxBase is for console applications without GUI support)
- // NB: zero means "no toolkit", -1 means "not initialized yet"
- // so we must use zero here!
- if (verMaj) *verMaj = 0;
- if (verMin) *verMin = 0;
- return wxPORT_BASE;
- }
-
- virtual bool IsUsingUniversalWidgets() const { return false; }
-};
-
-// ----------------------------------------------------------------------------
-// wxGUIAppTraitsBase: wxAppTraits implementation for the GUI apps
-// ----------------------------------------------------------------------------
-
-#if wxUSE_GUI
-
-class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
-{
-public:
-#if wxUSE_LOG
- virtual wxLog *CreateLogTarget();
-#endif // wxUSE_LOG
- virtual wxMessageOutput *CreateMessageOutput();
-#if wxUSE_FONTMAP
- virtual wxFontMapper *CreateFontMapper();
-#endif // wxUSE_FONTMAP
- virtual wxRendererNative *CreateRenderer();
-#if wxUSE_SOCKETS
- virtual GSocketGUIFunctionsTable* GetSocketGUIFunctionsTable();
-#endif
-
-#ifdef __WXDEBUG__
- virtual bool ShowAssertDialog(const wxString& msg);
-#endif // __WXDEBUG__
- virtual bool HasStderr();
-
- virtual void ScheduleForDestroy(wxObject *object);
- virtual void RemoveFromPendingDelete(wxObject *object);
-
- virtual bool IsUsingUniversalWidgets() const
- {
- #ifdef __WXUNIVERSAL__
- return true;
- #else
- return false;
- #endif
- }
-};
-
-#endif // wxUSE_GUI
-
-// ----------------------------------------------------------------------------
-// include the platform-specific version of the classes above
-// ----------------------------------------------------------------------------
-
-// ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port
-#if defined(__WXPALMOS__)
- #include "wx/palmos/apptrait.h"
-#elif defined(__WIN32__)
- #include "wx/msw/apptrait.h"
-#elif defined(__OS2__)
- #include "wx/os2/apptrait.h"
-#elif defined(__UNIX__)
- #include "wx/unix/apptrait.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/apptrait.h"
-#elif defined(__DOS__)
- #include "wx/msdos/apptrait.h"
-#else
- #if wxUSE_GUI
- class wxGUIAppTraits : public wxGUIAppTraitsBase
- {
- };
- #endif // wxUSE_GUI
- class wxConsoleAppTraits: public wxConsoleAppTraitsBase
- {
- };
-#endif // platform
-
-#endif // _WX_APPTRAIT_H_
-
diff --git a/desmume/src/windows/wx/include/wx/archive.h b/desmume/src/windows/wx/include/wx/archive.h
deleted file mode 100644
index 43b9ec025..000000000
--- a/desmume/src/windows/wx/include/wx/archive.h
+++ /dev/null
@@ -1,381 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/archive.h
-// Purpose: Streams for archive formats
-// Author: Mike Wetherell
-// RCS-ID: $Id: archive.h 43445 2006-11-16 14:30:20Z MW $
-// Copyright: (c) 2004 Mike Wetherell
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ARCHIVE_H__
-#define _WX_ARCHIVE_H__
-
-#include "wx/defs.h"
-
-#if wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
-
-#include "wx/stream.h"
-#include "wx/filename.h"
-
-
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveNotifier
-
-class WXDLLIMPEXP_BASE wxArchiveNotifier
-{
-public:
- virtual ~wxArchiveNotifier() { }
-
- virtual void OnEntryUpdated(class wxArchiveEntry& entry) = 0;
-};
-
-
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveEntry
-//
-// Holds an entry's meta data, such as filename and timestamp.
-
-class WXDLLIMPEXP_BASE wxArchiveEntry : public wxObject
-{
-public:
- virtual ~wxArchiveEntry() { }
-
- virtual wxDateTime GetDateTime() const = 0;
- virtual wxFileOffset GetSize() const = 0;
- virtual wxFileOffset GetOffset() const = 0;
- virtual bool IsDir() const = 0;
- virtual bool IsReadOnly() const = 0;
- virtual wxString GetInternalName() const = 0;
- virtual wxPathFormat GetInternalFormat() const = 0;
- virtual wxString GetName(wxPathFormat format = wxPATH_NATIVE) const = 0;
-
- virtual void SetDateTime(const wxDateTime& dt) = 0;
- virtual void SetSize(wxFileOffset size) = 0;
- virtual void SetIsDir(bool isDir = true) = 0;
- virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
- virtual void SetName(const wxString& name,
- wxPathFormat format = wxPATH_NATIVE) = 0;
-
- wxArchiveEntry *Clone() const { return DoClone(); }
-
- void SetNotifier(wxArchiveNotifier& notifier);
- virtual void UnsetNotifier() { m_notifier = NULL; }
-
-protected:
- wxArchiveEntry() : m_notifier(NULL) { }
- wxArchiveEntry(const wxArchiveEntry& e) : wxObject(e), m_notifier(NULL) { }
-
- virtual void SetOffset(wxFileOffset offset) = 0;
- virtual wxArchiveEntry* DoClone() const = 0;
-
- wxArchiveNotifier *GetNotifier() const { return m_notifier; }
- wxArchiveEntry& operator=(const wxArchiveEntry& entry);
-
-private:
- wxArchiveNotifier *m_notifier;
-
- DECLARE_ABSTRACT_CLASS(wxArchiveEntry)
-};
-
-
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveInputStream
-//
-// GetNextEntry() returns an wxArchiveEntry object containing the meta-data
-// for the next entry in the archive (and gives away ownership). Reading from
-// the wxArchiveInputStream then returns the entry's data. Eof() becomes true
-// after an attempt has been made to read past the end of the entry's data.
-//
-// When there are no more entries, GetNextEntry() returns NULL and sets Eof().
-
-class WXDLLIMPEXP_BASE wxArchiveInputStream : public wxFilterInputStream
-{
-public:
- typedef wxArchiveEntry entry_type;
-
- virtual ~wxArchiveInputStream() { }
-
- virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
- virtual bool CloseEntry() = 0;
-
- wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
-
- virtual char Peek() { return wxInputStream::Peek(); }
-
-protected:
- wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
- wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
-
- virtual wxArchiveEntry *DoGetNextEntry() = 0;
-
- wxMBConv& GetConv() const { return m_conv; }
-
-private:
- wxMBConv& m_conv;
-};
-
-
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveOutputStream
-//
-// PutNextEntry is used to create a new entry in the output archive, then
-// the entry's data is written to the wxArchiveOutputStream.
-//
-// Only one entry can be open for output at a time; another call to
-// PutNextEntry closes the current entry and begins the next.
-//
-// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
-// of the entry object.
-
-class WXDLLIMPEXP_BASE wxArchiveOutputStream : public wxFilterOutputStream
-{
-public:
- virtual ~wxArchiveOutputStream() { }
-
- virtual bool PutNextEntry(wxArchiveEntry *entry) = 0;
-
- virtual bool PutNextEntry(const wxString& name,
- const wxDateTime& dt = wxDateTime::Now(),
- wxFileOffset size = wxInvalidOffset) = 0;
-
- virtual bool PutNextDirEntry(const wxString& name,
- const wxDateTime& dt = wxDateTime::Now()) = 0;
-
- virtual bool CopyEntry(wxArchiveEntry *entry,
- wxArchiveInputStream& stream) = 0;
-
- virtual bool CopyArchiveMetaData(wxArchiveInputStream& stream) = 0;
-
- virtual bool CloseEntry() = 0;
-
-protected:
- wxArchiveOutputStream(wxOutputStream& stream, wxMBConv& conv);
- wxArchiveOutputStream(wxOutputStream *stream, wxMBConv& conv);
-
- wxMBConv& GetConv() const { return m_conv; }
-
-private:
- wxMBConv& m_conv;
-};
-
-
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveIterator
-//
-// An input iterator that can be used to transfer an archive's catalog to
-// a container.
-
-#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
-#include
-#include
-
-template inline
-void _wxSetArchiveIteratorValue(
- X& val, Y entry, void *WXUNUSED(d))
-{
- val = X(entry);
-}
-template inline
-void _wxSetArchiveIteratorValue(
- std::pair& val, Z entry, Z WXUNUSED(d))
-{
- val = std::make_pair(X(entry->GetInternalName()), Y(entry));
-}
-
-#if defined _MSC_VER && _MSC_VER < 1300
-template
-#else
-template
-#endif
-class wxArchiveIterator
-{
-public:
- typedef std::input_iterator_tag iterator_category;
- typedef T value_type;
- typedef ptrdiff_t difference_type;
- typedef T* pointer;
- typedef T& reference;
-
- wxArchiveIterator() : m_rep(NULL) { }
-
- wxArchiveIterator(Arc& arc) {
- typename Arc::entry_type* entry = arc.GetNextEntry();
- m_rep = entry ? new Rep(arc, entry) : NULL;
- }
-
- wxArchiveIterator(const wxArchiveIterator& it) : m_rep(it.m_rep) {
- if (m_rep)
- m_rep->AddRef();
- }
-
- ~wxArchiveIterator() {
- if (m_rep)
- m_rep->UnRef();
- }
-
- const T& operator *() const {
- return m_rep->GetValue();
- }
-
- const T* operator ->() const {
- return &**this;
- }
-
- wxArchiveIterator& operator =(const wxArchiveIterator& it) {
- if (it.m_rep)
- it.m_rep.AddRef();
- if (m_rep)
- m_rep.UnRef();
- m_rep = it.m_rep;
- return *this;
- }
-
- wxArchiveIterator& operator ++() {
- m_rep = m_rep->Next();
- return *this;
- }
-
- wxArchiveIterator operator ++(int) {
- wxArchiveIterator it(*this);
- ++(*this);
- return it;
- }
-
- bool operator ==(const wxArchiveIterator& j) const {
- return m_rep == j.m_rep;
- }
-
- bool operator !=(const wxArchiveIterator& j) const {
- return !(*this == j);
- }
-
-private:
- class Rep {
- Arc& m_arc;
- typename Arc::entry_type* m_entry;
- T m_value;
- int m_ref;
-
- public:
- Rep(Arc& arc, typename Arc::entry_type* entry)
- : m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
- ~Rep()
- { delete m_entry; }
-
- void AddRef() {
- m_ref++;
- }
-
- void UnRef() {
- if (--m_ref == 0)
- delete this;
- }
-
- Rep *Next() {
- typename Arc::entry_type* entry = m_arc.GetNextEntry();
- if (!entry) {
- UnRef();
- return NULL;
- }
- if (m_ref > 1) {
- m_ref--;
- return new Rep(m_arc, entry);
- }
- delete m_entry;
- m_entry = entry;
- m_value = T();
- return this;
- }
-
- const T& GetValue() {
- if (m_entry) {
- _wxSetArchiveIteratorValue(m_value, m_entry, m_entry);
- m_entry = NULL;
- }
- return m_value;
- }
- } *m_rep;
-};
-
-typedef wxArchiveIterator wxArchiveIter;
-typedef wxArchiveIterator > wxArchivePairIter;
-
-#endif // wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
-
-
-/////////////////////////////////////////////////////////////////////////////
-// wxArchiveClassFactory
-//
-// A wxArchiveClassFactory instance for a particular archive type allows
-// the creation of the other classes that may be needed.
-
-void WXDLLIMPEXP_BASE wxUseArchiveClasses();
-
-class WXDLLIMPEXP_BASE wxArchiveClassFactory : public wxFilterClassFactoryBase
-{
-public:
- typedef wxArchiveEntry entry_type;
- typedef wxArchiveInputStream instream_type;
- typedef wxArchiveOutputStream outstream_type;
- typedef wxArchiveNotifier notifier_type;
-#if wxUSE_STL || defined WX_TEST_ARCHIVE_ITERATOR
- typedef wxArchiveIter iter_type;
- typedef wxArchivePairIter pairiter_type;
-#endif
-
- virtual ~wxArchiveClassFactory() { }
-
- wxArchiveEntry *NewEntry() const
- { return DoNewEntry(); }
- wxArchiveInputStream *NewStream(wxInputStream& stream) const
- { return DoNewStream(stream); }
- wxArchiveOutputStream *NewStream(wxOutputStream& stream) const
- { return DoNewStream(stream); }
- wxArchiveInputStream *NewStream(wxInputStream *stream) const
- { return DoNewStream(stream); }
- wxArchiveOutputStream *NewStream(wxOutputStream *stream) const
- { return DoNewStream(stream); }
-
- virtual wxString GetInternalName(
- const wxString& name,
- wxPathFormat format = wxPATH_NATIVE) const = 0;
-
- void SetConv(wxMBConv& conv) { m_pConv = &conv; }
- wxMBConv& GetConv() const
- { if (m_pConv) return *m_pConv; else return wxConvLocal; }
-
- static const wxArchiveClassFactory *Find(const wxChar *protocol,
- wxStreamProtocolType type
- = wxSTREAM_PROTOCOL);
-
- static const wxArchiveClassFactory *GetFirst();
- const wxArchiveClassFactory *GetNext() const { return m_next; }
-
- void PushFront() { Remove(); m_next = sm_first; sm_first = this; }
- void Remove();
-
-protected:
- // old compilers don't support covarient returns, so 'Do' methods are
- // used to simulate them
- virtual wxArchiveEntry *DoNewEntry() const = 0;
- virtual wxArchiveInputStream *DoNewStream(wxInputStream& stream) const = 0;
- virtual wxArchiveOutputStream *DoNewStream(wxOutputStream& stream) const = 0;
- virtual wxArchiveInputStream *DoNewStream(wxInputStream *stream) const = 0;
- virtual wxArchiveOutputStream *DoNewStream(wxOutputStream *stream) const = 0;
-
- wxArchiveClassFactory() : m_pConv(NULL), m_next(this) { }
- wxArchiveClassFactory& operator=(const wxArchiveClassFactory& WXUNUSED(f))
- { return *this; }
-
-private:
- wxMBConv *m_pConv;
- static wxArchiveClassFactory *sm_first;
- wxArchiveClassFactory *m_next;
-
- DECLARE_ABSTRACT_CLASS(wxArchiveClassFactory)
-};
-
-#endif // wxUSE_STREAMS && wxUSE_ARCHIVE_STREAMS
-
-#endif // _WX_ARCHIVE_H__
diff --git a/desmume/src/windows/wx/include/wx/arrimpl.cpp b/desmume/src/windows/wx/include/wx/arrimpl.cpp
deleted file mode 100644
index 33e25091b..000000000
--- a/desmume/src/windows/wx/include/wx/arrimpl.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/arrimpl.cpp
-// Purpose: helper file for implementation of dynamic lists
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 16.10.97
-// RCS-ID: $Id: arrimpl.cpp 34241 2005-05-22 12:10:55Z JS $
-// Copyright: (c) 1997 Vadim Zeitlin
-// Licence: wxWindows license
-///////////////////////////////////////////////////////////////////////////////
-
-/*****************************************************************************
- * Purpose: implements methods of "template" class declared in *
- * DECLARE_OBJARRAY macro and which couldn't be implemented inline *
- * (because they need the full definition of type T in scope) *
- * *
- * Usage: 1) #include dynarray.h *
- * 2) WX_DECLARE_OBJARRAY *
- * 3) #include arrimpl.cpp *
- * 4) WX_DEFINE_OBJARRAY *
- *****************************************************************************/
-
-// needed to resolve the conflict between global T and macro parameter T
-
-#define _WX_ERROR_REMOVE2(x) wxT("bad index in ") wxT(#x) wxT("::RemoveAt()")
-
-// macro implements remaining (not inline) methods of template list
-// (it's private to this file)
-#undef _DEFINE_OBJARRAY
-#define _DEFINE_OBJARRAY(T, name) \
-name::~name() \
-{ \
- Empty(); \
-} \
- \
-void name::DoCopy(const name& src) \
-{ \
- for ( size_t ui = 0; ui < src.size(); ui++ ) \
- Add(src[ui]); \
-} \
- \
-name& name::operator=(const name& src) \
-{ \
- Empty(); \
- DoCopy(src); \
- \
- return *this; \
-} \
- \
-name::name(const name& src) : wxArrayPtrVoid() \
-{ \
- DoCopy(src); \
-} \
- \
-void name::DoEmpty() \
-{ \
- for ( size_t ui = 0; ui < size(); ui++ ) \
- delete (T*)base_array::operator[](ui); \
-} \
- \
-void name::RemoveAt(size_t uiIndex, size_t nRemove) \
-{ \
- wxCHECK_RET( uiIndex < size(), _WX_ERROR_REMOVE2(name) ); \
- \
- for (size_t i = 0; i < nRemove; i++ ) \
- delete (T*)base_array::operator[](uiIndex + i); \
- \
- base_array::erase(begin() + uiIndex, begin() + uiIndex + nRemove); \
-} \
- \
-void name::Add(const T& item, size_t nInsert) \
-{ \
- if (nInsert == 0) \
- return; \
- T* pItem = new T(item); \
- size_t nOldSize = size(); \
- if ( pItem != NULL ) \
- base_array::insert(end(), nInsert, pItem); \
- for (size_t i = 1; i < nInsert; i++) \
- base_array::operator[](nOldSize + i) = new T(item); \
-} \
- \
-void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \
-{ \
- if (nInsert == 0) \
- return; \
- T* pItem = new T(item); \
- if ( pItem != NULL ) \
- base_array::insert(begin() + uiIndex, nInsert, pItem); \
- for (size_t i = 1; i < nInsert; i++) \
- base_array::operator[](uiIndex + i) = new T(item); \
-} \
- \
-int name::Index(const T& Item, bool bFromEnd) const \
-{ \
- if ( bFromEnd ) { \
- if ( size() > 0 ) { \
- size_t ui = size() - 1; \
- do { \
- if ( (T*)base_array::operator[](ui) == &Item ) \
- return wx_static_cast(int, ui); \
- ui--; \
- } \
- while ( ui != 0 ); \
- } \
- } \
- else { \
- for( size_t ui = 0; ui < size(); ui++ ) { \
- if( (T*)base_array::operator[](ui) == &Item ) \
- return wx_static_cast(int, ui); \
- } \
- } \
- \
- return wxNOT_FOUND; \
-}
-
-// redefine the macro so that now it will generate the class implementation
-// old value would provoke a compile-time error if this file is not included
-#undef WX_DEFINE_OBJARRAY
-#define WX_DEFINE_OBJARRAY(name) _DEFINE_OBJARRAY(_wxObjArray##name, name)
diff --git a/desmume/src/windows/wx/include/wx/arrstr.h b/desmume/src/windows/wx/include/wx/arrstr.h
deleted file mode 100644
index 0f1b90887..000000000
--- a/desmume/src/windows/wx/include/wx/arrstr.h
+++ /dev/null
@@ -1,377 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/arrstr.h
-// Purpose: wxArrayString class
-// Author: Mattia Barbon and Vadim Zeitlin
-// Modified by:
-// Created: 07/07/03
-// RCS-ID: $Id: arrstr.h 56758 2008-11-13 22:32:21Z VS $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ARRSTR_H
-#define _WX_ARRSTR_H
-
-#include "wx/defs.h"
-#include "wx/string.h"
-
-WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
-WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
-
-#if wxUSE_STL
-
-#include "wx/dynarray.h"
-
-typedef int (wxCMPFUNC_CONV *CMPFUNCwxString)(wxString*, wxString*);
-typedef wxString _wxArraywxBaseArrayStringBase;
-_WX_DECLARE_BASEARRAY_2(_wxArraywxBaseArrayStringBase, wxBaseArrayStringBase,
- wxArray_SortFunction,
- class WXDLLIMPEXP_BASE);
-WX_DEFINE_USER_EXPORTED_TYPEARRAY(wxString, wxArrayStringBase,
- wxBaseArrayStringBase, WXDLLIMPEXP_BASE);
-_WX_DEFINE_SORTED_TYPEARRAY_2(wxString, wxSortedArrayStringBase,
- wxBaseArrayStringBase, = wxStringSortAscending,
- class WXDLLIMPEXP_BASE, CMPFUNCwxString);
-
-class WXDLLIMPEXP_BASE wxArrayString : public wxArrayStringBase
-{
-public:
- // type of function used by wxArrayString::Sort()
- typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
- const wxString& second);
-
- wxArrayString() { }
- wxArrayString(const wxArrayString& a) : wxArrayStringBase(a) { }
- wxArrayString(size_t sz, const wxChar** a);
- wxArrayString(size_t sz, const wxString* a);
-
- int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
-
- void Sort(bool reverseOrder = false);
- void Sort(CompareFunction function);
- void Sort(CMPFUNCwxString function) { wxArrayStringBase::Sort(function); }
-
- size_t Add(const wxString& string, size_t copies = 1)
- {
- wxArrayStringBase::Add(string, copies);
- return size() - copies;
- }
-};
-
-class WXDLLIMPEXP_BASE wxSortedArrayString : public wxSortedArrayStringBase
-{
-public:
- wxSortedArrayString() : wxSortedArrayStringBase(wxStringSortAscending)
- { }
- wxSortedArrayString(const wxSortedArrayString& array)
- : wxSortedArrayStringBase(array)
- { }
- wxSortedArrayString(const wxArrayString& src)
- : wxSortedArrayStringBase(wxStringSortAscending)
- {
- reserve(src.size());
-
- for ( size_t n = 0; n < src.size(); n++ )
- Add(src[n]);
- }
-
- int Index(const wxChar* sz, bool bCase = true, bool bFromEnd = false) const;
-};
-
-#else // if !wxUSE_STL
-
-// ----------------------------------------------------------------------------
-// The string array uses it's knowledge of internal structure of the wxString
-// class to optimize string storage. Normally, we would store pointers to
-// string, but as wxString is, in fact, itself a pointer (sizeof(wxString) is
-// sizeof(char *)) we store these pointers instead. The cast to "wxString *" is
-// really all we need to turn such pointer into a string!
-//
-// Of course, it can be called a dirty hack, but we use twice less memory and
-// this approach is also more speed efficient, so it's probably worth it.
-//
-// Usage notes: when a string is added/inserted, a new copy of it is created,
-// so the original string may be safely deleted. When a string is retrieved
-// from the array (operator[] or Item() method), a reference is returned.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxArrayString
-{
-public:
- // type of function used by wxArrayString::Sort()
- typedef int (wxCMPFUNC_CONV *CompareFunction)(const wxString& first,
- const wxString& second);
- // type of function used by wxArrayString::Sort(), for compatibility with
- // wxArray
- typedef int (wxCMPFUNC_CONV *CompareFunction2)(wxString* first,
- wxString* second);
-
- // constructors and destructor
- // default ctor
- wxArrayString() { Init(false); }
- // if autoSort is true, the array is always sorted (in alphabetical order)
- //
- // NB: the reason for using int and not bool is that like this we can avoid
- // using this ctor for implicit conversions from "const char *" (which
- // we'd like to be implicitly converted to wxString instead!)
- //
- // of course, using explicit would be even better - if all compilers
- // supported it...
- wxArrayString(int autoSort) { Init(autoSort != 0); }
- // C string array ctor
- wxArrayString(size_t sz, const wxChar** a);
- // wxString string array ctor
- wxArrayString(size_t sz, const wxString* a);
- // copy ctor
- wxArrayString(const wxArrayString& array);
- // assignment operator
- wxArrayString& operator=(const wxArrayString& src);
- // not virtual, this class should not be derived from
- ~wxArrayString();
-
- // memory management
- // empties the list, but doesn't release memory
- void Empty();
- // empties the list and releases memory
- void Clear();
- // preallocates memory for given number of items
- void Alloc(size_t nCount);
- // minimzes the memory usage (by freeing all extra memory)
- void Shrink();
-
- // simple accessors
- // number of elements in the array
- size_t GetCount() const { return m_nCount; }
- // is it empty?
- bool IsEmpty() const { return m_nCount == 0; }
- // number of elements in the array (GetCount is preferred API)
- size_t Count() const { return m_nCount; }
-
- // items access (range checking is done in debug version)
- // get item at position uiIndex
- wxString& Item(size_t nIndex) const
- {
- wxASSERT_MSG( nIndex < m_nCount,
- _T("wxArrayString: index out of bounds") );
-
- return *(wxString *)&(m_pItems[nIndex]);
- }
-
- // same as Item()
- wxString& operator[](size_t nIndex) const { return Item(nIndex); }
- // get last item
- wxString& Last() const
- {
- wxASSERT_MSG( !IsEmpty(),
- _T("wxArrayString: index out of bounds") );
- return Item(Count() - 1);
- }
-
- // return a wxString[], useful for the controls which
- // take one in their ctor. You must delete[] it yourself
- // once you are done with it. Will return NULL if the
- // ArrayString was empty.
-#if WXWIN_COMPATIBILITY_2_4
- wxDEPRECATED( wxString* GetStringArray() const );
-#endif
-
- // item management
- // Search the element in the array, starting from the beginning if
- // bFromEnd is false or from end otherwise. If bCase, comparison is case
- // sensitive (default). Returns index of the first item matched or
- // wxNOT_FOUND
- int Index (const wxChar *sz, bool bCase = true, bool bFromEnd = false) const;
- // add new element at the end (if the array is not sorted), return its
- // index
- size_t Add(const wxString& str, size_t nInsert = 1);
- // add new element at given position
- void Insert(const wxString& str, size_t uiIndex, size_t nInsert = 1);
- // expand the array to have count elements
- void SetCount(size_t count);
- // remove first item matching this value
- void Remove(const wxChar *sz);
- // remove item by index
-#if WXWIN_COMPATIBILITY_2_4
- wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
-#endif
- void RemoveAt(size_t nIndex, size_t nRemove = 1);
-
- // sorting
- // sort array elements in alphabetical order (or reversed alphabetical
- // order if reverseOrder parameter is true)
- void Sort(bool reverseOrder = false);
- // sort array elements using specified comparaison function
- void Sort(CompareFunction compareFunction);
- void Sort(CompareFunction2 compareFunction);
-
- // comparison
- // compare two arrays case sensitively
- bool operator==(const wxArrayString& a) const;
- // compare two arrays case sensitively
- bool operator!=(const wxArrayString& a) const { return !(*this == a); }
-
- // STL-like interface
- typedef wxString value_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef value_type* iterator;
- typedef const value_type* const_iterator;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef int difference_type;
- typedef size_t size_type;
-
- // TODO: this code duplicates the one in dynarray.h
- class reverse_iterator
- {
- typedef wxString value_type;
- typedef value_type* pointer;
- typedef value_type& reference;
- typedef reverse_iterator itor;
- friend itor operator+(int o, const itor& it);
- friend itor operator+(const itor& it, int o);
- friend itor operator-(const itor& it, int o);
- friend difference_type operator -(const itor& i1, const itor& i2);
- public:
- pointer m_ptr;
- reverse_iterator() : m_ptr(NULL) { }
- reverse_iterator(pointer ptr) : m_ptr(ptr) { }
- reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
- reference operator*() const { return *m_ptr; }
- pointer operator->() const { return m_ptr; }
- itor& operator++() { --m_ptr; return *this; }
- const itor operator++(int)
- { reverse_iterator tmp = *this; --m_ptr; return tmp; }
- itor& operator--() { ++m_ptr; return *this; }
- const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }
- bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }
- bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }
- };
-
- class const_reverse_iterator
- {
- typedef wxString value_type;
- typedef const value_type* pointer;
- typedef const value_type& reference;
- typedef const_reverse_iterator itor;
- friend itor operator+(int o, const itor& it);
- friend itor operator+(const itor& it, int o);
- friend itor operator-(const itor& it, int o);
- friend difference_type operator -(const itor& i1, const itor& i2);
- public:
- pointer m_ptr;
- const_reverse_iterator() : m_ptr(NULL) { }
- const_reverse_iterator(pointer ptr) : m_ptr(ptr) { }
- const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { }
- const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }
- reference operator*() const { return *m_ptr; }
- pointer operator->() const { return m_ptr; }
- itor& operator++() { --m_ptr; return *this; }
- const itor operator++(int)
- { itor tmp = *this; --m_ptr; return tmp; }
- itor& operator--() { ++m_ptr; return *this; }
- const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }
- bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }
- bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }
- };
-
- wxArrayString(const_iterator first, const_iterator last)
- { Init(false); assign(first, last); }
- wxArrayString(size_type n, const_reference v) { Init(false); assign(n, v); }
- void assign(const_iterator first, const_iterator last);
- void assign(size_type n, const_reference v)
- { clear(); Add(v, n); }
- reference back() { return *(end() - 1); }
- const_reference back() const { return *(end() - 1); }
- iterator begin() { return (wxString *)&(m_pItems[0]); }
- const_iterator begin() const { return (wxString *)&(m_pItems[0]); }
- size_type capacity() const { return m_nSize; }
- void clear() { Clear(); }
- bool empty() const { return IsEmpty(); }
- iterator end() { return begin() + GetCount(); }
- const_iterator end() const { return begin() + GetCount(); }
- iterator erase(iterator first, iterator last)
- {
- size_t idx = first - begin();
- RemoveAt(idx, last - first);
- return begin() + idx;
- }
- iterator erase(iterator it) { return erase(it, it + 1); }
- reference front() { return *begin(); }
- const_reference front() const { return *begin(); }
- void insert(iterator it, size_type n, const_reference v)
- { Insert(v, it - begin(), n); }
- iterator insert(iterator it, const_reference v = value_type())
- { size_t idx = it - begin(); Insert(v, idx); return begin() + idx; }
- void insert(iterator it, const_iterator first, const_iterator last);
- size_type max_size() const { return INT_MAX; }
- void pop_back() { RemoveAt(GetCount() - 1); }
- void push_back(const_reference v) { Add(v); }
- reverse_iterator rbegin() { return reverse_iterator(end() - 1); }
- const_reverse_iterator rbegin() const;
- reverse_iterator rend() { return reverse_iterator(begin() - 1); }
- const_reverse_iterator rend() const;
- void reserve(size_type n) /* base::reserve*/;
- void resize(size_type n, value_type v = value_type());
- size_type size() const { return GetCount(); }
-
-protected:
- void Init(bool autoSort); // common part of all ctors
- void Copy(const wxArrayString& src); // copies the contents of another array
-
-private:
- void Grow(size_t nIncrement = 0); // makes array bigger if needed
- void Free(); // free all the strings stored
-
- void DoSort(); // common part of all Sort() variants
-
- size_t m_nSize, // current size of the array
- m_nCount; // current number of elements
-
- wxChar **m_pItems; // pointer to data
-
- bool m_autoSort; // if true, keep the array always sorted
-};
-
-class WXDLLIMPEXP_BASE wxSortedArrayString : public wxArrayString
-{
-public:
- wxSortedArrayString() : wxArrayString(true)
- { }
- wxSortedArrayString(const wxArrayString& array) : wxArrayString(true)
- { Copy(array); }
-};
-
-#endif // !wxUSE_STL
-
-// this class provides a temporary wxString* from a
-// wxArrayString
-class WXDLLIMPEXP_BASE wxCArrayString
-{
-public:
- wxCArrayString( const wxArrayString& array )
- : m_array( array ), m_strings( NULL )
- { }
- ~wxCArrayString() { delete[] m_strings; }
-
- size_t GetCount() const { return m_array.GetCount(); }
- wxString* GetStrings()
- {
- if( m_strings ) return m_strings;
- size_t count = m_array.GetCount();
- m_strings = new wxString[count];
- for( size_t i = 0; i < count; ++i )
- m_strings[i] = m_array[i];
- return m_strings;
- }
-
-#if wxABI_VERSION >= 20810
- wxString* Release();
-#endif // wxABI_VERSION >= 20810
-
-private:
- const wxArrayString& m_array;
- wxString* m_strings;
-};
-
-#endif
diff --git a/desmume/src/windows/wx/include/wx/artprov.h b/desmume/src/windows/wx/include/wx/artprov.h
deleted file mode 100644
index 1d026a74d..000000000
--- a/desmume/src/windows/wx/include/wx/artprov.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/artprov.h
-// Purpose: wxArtProvider class
-// Author: Vaclav Slavik
-// Modified by:
-// Created: 18/03/2002
-// RCS-ID: $Id: artprov.h 57701 2008-12-31 23:40:06Z VS $
-// Copyright: (c) Vaclav Slavik
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ARTPROV_H_
-#define _WX_ARTPROV_H_
-
-#include "wx/string.h"
-#include "wx/bitmap.h"
-#include "wx/icon.h"
-
-class WXDLLIMPEXP_FWD_CORE wxArtProvidersList;
-class WXDLLIMPEXP_FWD_CORE wxArtProviderCache;
-class wxArtProviderModule;
-
-// ----------------------------------------------------------------------------
-// Types
-// ----------------------------------------------------------------------------
-
-typedef wxString wxArtClient;
-typedef wxString wxArtID;
-
-#define wxART_MAKE_CLIENT_ID_FROM_STR(id) (id + _T("_C"))
-#define wxART_MAKE_CLIENT_ID(id) _T(#id) _T("_C")
-#define wxART_MAKE_ART_ID_FROM_STR(id) (id)
-#define wxART_MAKE_ART_ID(id) _T(#id)
-
-// ----------------------------------------------------------------------------
-// Art clients
-// ----------------------------------------------------------------------------
-
-#define wxART_TOOLBAR wxART_MAKE_CLIENT_ID(wxART_TOOLBAR)
-#define wxART_MENU wxART_MAKE_CLIENT_ID(wxART_MENU)
-#define wxART_FRAME_ICON wxART_MAKE_CLIENT_ID(wxART_FRAME_ICON)
-
-#define wxART_CMN_DIALOG wxART_MAKE_CLIENT_ID(wxART_CMN_DIALOG)
-#define wxART_HELP_BROWSER wxART_MAKE_CLIENT_ID(wxART_HELP_BROWSER)
-#define wxART_MESSAGE_BOX wxART_MAKE_CLIENT_ID(wxART_MESSAGE_BOX)
-#define wxART_BUTTON wxART_MAKE_CLIENT_ID(wxART_BUTTON)
-
-#define wxART_OTHER wxART_MAKE_CLIENT_ID(wxART_OTHER)
-
-// ----------------------------------------------------------------------------
-// Art IDs
-// ----------------------------------------------------------------------------
-
-#define wxART_ADD_BOOKMARK wxART_MAKE_ART_ID(wxART_ADD_BOOKMARK)
-#define wxART_DEL_BOOKMARK wxART_MAKE_ART_ID(wxART_DEL_BOOKMARK)
-#define wxART_HELP_SIDE_PANEL wxART_MAKE_ART_ID(wxART_HELP_SIDE_PANEL)
-#define wxART_HELP_SETTINGS wxART_MAKE_ART_ID(wxART_HELP_SETTINGS)
-#define wxART_HELP_BOOK wxART_MAKE_ART_ID(wxART_HELP_BOOK)
-#define wxART_HELP_FOLDER wxART_MAKE_ART_ID(wxART_HELP_FOLDER)
-#define wxART_HELP_PAGE wxART_MAKE_ART_ID(wxART_HELP_PAGE)
-#define wxART_GO_BACK wxART_MAKE_ART_ID(wxART_GO_BACK)
-#define wxART_GO_FORWARD wxART_MAKE_ART_ID(wxART_GO_FORWARD)
-#define wxART_GO_UP wxART_MAKE_ART_ID(wxART_GO_UP)
-#define wxART_GO_DOWN wxART_MAKE_ART_ID(wxART_GO_DOWN)
-#define wxART_GO_TO_PARENT wxART_MAKE_ART_ID(wxART_GO_TO_PARENT)
-#define wxART_GO_HOME wxART_MAKE_ART_ID(wxART_GO_HOME)
-#define wxART_FILE_OPEN wxART_MAKE_ART_ID(wxART_FILE_OPEN)
-#define wxART_FILE_SAVE wxART_MAKE_ART_ID(wxART_FILE_SAVE)
-#define wxART_FILE_SAVE_AS wxART_MAKE_ART_ID(wxART_FILE_SAVE_AS)
-#define wxART_PRINT wxART_MAKE_ART_ID(wxART_PRINT)
-#define wxART_HELP wxART_MAKE_ART_ID(wxART_HELP)
-#define wxART_TIP wxART_MAKE_ART_ID(wxART_TIP)
-#define wxART_REPORT_VIEW wxART_MAKE_ART_ID(wxART_REPORT_VIEW)
-#define wxART_LIST_VIEW wxART_MAKE_ART_ID(wxART_LIST_VIEW)
-#define wxART_NEW_DIR wxART_MAKE_ART_ID(wxART_NEW_DIR)
-#define wxART_HARDDISK wxART_MAKE_ART_ID(wxART_HARDDISK)
-#define wxART_FLOPPY wxART_MAKE_ART_ID(wxART_FLOPPY)
-#define wxART_CDROM wxART_MAKE_ART_ID(wxART_CDROM)
-#define wxART_REMOVABLE wxART_MAKE_ART_ID(wxART_REMOVABLE)
-#define wxART_FOLDER wxART_MAKE_ART_ID(wxART_FOLDER)
-#define wxART_FOLDER_OPEN wxART_MAKE_ART_ID(wxART_FOLDER_OPEN)
-#define wxART_GO_DIR_UP wxART_MAKE_ART_ID(wxART_GO_DIR_UP)
-#define wxART_EXECUTABLE_FILE wxART_MAKE_ART_ID(wxART_EXECUTABLE_FILE)
-#define wxART_NORMAL_FILE wxART_MAKE_ART_ID(wxART_NORMAL_FILE)
-#define wxART_TICK_MARK wxART_MAKE_ART_ID(wxART_TICK_MARK)
-#define wxART_CROSS_MARK wxART_MAKE_ART_ID(wxART_CROSS_MARK)
-#define wxART_ERROR wxART_MAKE_ART_ID(wxART_ERROR)
-#define wxART_QUESTION wxART_MAKE_ART_ID(wxART_QUESTION)
-#define wxART_WARNING wxART_MAKE_ART_ID(wxART_WARNING)
-#define wxART_INFORMATION wxART_MAKE_ART_ID(wxART_INFORMATION)
-#define wxART_MISSING_IMAGE wxART_MAKE_ART_ID(wxART_MISSING_IMAGE)
-
-#define wxART_COPY wxART_MAKE_ART_ID(wxART_COPY)
-#define wxART_CUT wxART_MAKE_ART_ID(wxART_CUT)
-#define wxART_PASTE wxART_MAKE_ART_ID(wxART_PASTE)
-#define wxART_DELETE wxART_MAKE_ART_ID(wxART_DELETE)
-#define wxART_NEW wxART_MAKE_ART_ID(wxART_NEW)
-
-#define wxART_UNDO wxART_MAKE_ART_ID(wxART_UNDO)
-#define wxART_REDO wxART_MAKE_ART_ID(wxART_REDO)
-
-#define wxART_QUIT wxART_MAKE_ART_ID(wxART_QUIT)
-
-#define wxART_FIND wxART_MAKE_ART_ID(wxART_FIND)
-#define wxART_FIND_AND_REPLACE wxART_MAKE_ART_ID(wxART_FIND_AND_REPLACE)
-
-
-// ----------------------------------------------------------------------------
-// wxArtProvider class
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxArtProvider : public wxObject
-{
-public:
- // Dtor removes the provider from providers stack if it's still on it
- virtual ~wxArtProvider();
-
-
- // Add new provider to the top of providers stack (i.e. the provider will
- // be queried first of all).
- static void Push(wxArtProvider *provider);
-
- // Add new provider to the bottom of providers stack (i.e. the provider
- // will be queried as the last one).
-#if wxABI_VERSION >= 20810
- static void PushBack(wxArtProvider *provider);
-#endif
- // same as PushBack()
- static void Insert(wxArtProvider *provider);
-
- // Remove latest added provider and delete it.
- static bool Pop();
-
- // Remove provider from providers stack but don't delete it.
- static bool Remove(wxArtProvider *provider);
-
- // Delete the given provider and remove it from the providers stack.
- static bool Delete(wxArtProvider *provider);
-
-
- // Query the providers for bitmap with given ID and return it. Return
- // wxNullBitmap if no provider provides it.
- static wxBitmap GetBitmap(const wxArtID& id,
- const wxArtClient& client = wxART_OTHER,
- const wxSize& size = wxDefaultSize);
-
- // Query the providers for icon with given ID and return it. Return
- // wxNullIcon if no provider provides it.
- static wxIcon GetIcon(const wxArtID& id,
- const wxArtClient& client = wxART_OTHER,
- const wxSize& size = wxDefaultSize);
-
- // Get the size hint of an icon from a specific wxArtClient, queries
- // the topmost provider if platform_dependent = false
- static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
-
-#if WXWIN_COMPATIBILITY_2_6
- // use the corresponding methods without redundant "Provider" suffix
- wxDEPRECATED( static void PushProvider(wxArtProvider *provider) );
- wxDEPRECATED( static void InsertProvider(wxArtProvider *provider) );
- wxDEPRECATED( static bool PopProvider() );
-
- // use Delete() if this is what you really need, or just delete the
- // provider pointer, do not use Remove() as it does not delete the pointer
- // unlike RemoveProvider() which does
- wxDEPRECATED( static bool RemoveProvider(wxArtProvider *provider) );
-#endif // WXWIN_COMPATIBILITY_2_6
-
-protected:
- friend class wxArtProviderModule;
- // Initializes default provider
- static void InitStdProvider();
- // Initializes platform's native provider, if available (e.g. GTK2)
- static void InitNativeProvider();
- // Destroy caches & all providers
- static void CleanUpProviders();
-
- // Get the default size of an icon for a specific client
- virtual wxSize DoGetSizeHint(const wxArtClient& client)
- {
- return GetSizeHint(client, true);
- }
-
- // Derived classes must override this method to create requested
- // art resource. This method is called only once per instance's
- // lifetime for each requested wxArtID.
- virtual wxBitmap CreateBitmap(const wxArtID& WXUNUSED(id),
- const wxArtClient& WXUNUSED(client),
- const wxSize& WXUNUSED(size)) = 0;
-
-private:
- static void CommonAddingProvider();
-
-private:
- // list of providers:
- static wxArtProvidersList *sm_providers;
- // art resources cache (so that CreateXXX is not called that often):
- static wxArtProviderCache *sm_cache;
-
- DECLARE_ABSTRACT_CLASS(wxArtProvider)
-};
-
-
-#endif // _WX_ARTPROV_H_
diff --git a/desmume/src/windows/wx/include/wx/aui/aui.h b/desmume/src/windows/wx/include/wx/aui/aui.h
deleted file mode 100644
index 72273dd48..000000000
--- a/desmume/src/windows/wx/include/wx/aui/aui.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aui/aui.h
-// Purpose: wxaui: wx advanced user interface - docking window manager
-// Author: Benjamin I. Williams
-// Modified by:
-// Created: 2005-05-17
-// RCS-ID: $Id: aui.h 55195 2008-08-23 06:31:01Z BIW $
-// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
-// Licence: wxWindows Library Licence, Version 3.1
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_AUI_H_
-#define _WX_AUI_H_
-
-#include "wx/aui/framemanager.h"
-#include "wx/aui/dockart.h"
-#include "wx/aui/floatpane.h"
-#include "wx/aui/auibar.h"
-#include "wx/aui/auibook.h"
-#include "wx/aui/tabmdi.h"
-
-#endif // _WX_AUI_H_
-
diff --git a/desmume/src/windows/wx/include/wx/aui/auibar.h b/desmume/src/windows/wx/include/wx/aui/auibar.h
deleted file mode 100644
index 5ca0e2380..000000000
--- a/desmume/src/windows/wx/include/wx/aui/auibar.h
+++ /dev/null
@@ -1,684 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aui/toolbar.h
-// Purpose: wxaui: wx advanced user interface - docking window manager
-// Author: Benjamin I. Williams
-// Modified by:
-// Created: 2008-08-04
-// RCS-ID: $Id: auibar.h 55522 2008-09-08 09:54:28Z BIW $
-// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
-// Licence: wxWindows Library Licence, Version 3.1
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_AUIBAR_H_
-#define _WX_AUIBAR_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_AUI
-
-#if wxABI_VERSION >= 20809
-
-#include "wx/control.h"
-
-enum wxAuiToolBarStyle
-{
- wxAUI_TB_TEXT = 1 << 0,
- wxAUI_TB_NO_TOOLTIPS = 1 << 1,
- wxAUI_TB_NO_AUTORESIZE = 1 << 2,
- wxAUI_TB_GRIPPER = 1 << 3,
- wxAUI_TB_OVERFLOW = 1 << 4,
- wxAUI_TB_VERTICAL = 1 << 5,
- wxAUI_TB_HORZ_LAYOUT = 1 << 6,
- wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT),
- wxAUI_TB_DEFAULT_STYLE = 0
-};
-
-enum wxAuiToolBarArtSetting
-{
- wxAUI_TBART_SEPARATOR_SIZE = 0,
- wxAUI_TBART_GRIPPER_SIZE = 1,
- wxAUI_TBART_OVERFLOW_SIZE = 2
-};
-
-enum wxAuiToolBarToolTextOrientation
-{
- wxAUI_TBTOOL_TEXT_LEFT = 0, // unused/unimplemented
- wxAUI_TBTOOL_TEXT_RIGHT = 1,
- wxAUI_TBTOOL_TEXT_TOP = 2, // unused/unimplemented
- wxAUI_TBTOOL_TEXT_BOTTOM = 3
-};
-
-
-// aui toolbar event class
-
-class WXDLLIMPEXP_AUI wxAuiToolBarEvent : public wxNotifyEvent
-{
-public:
- wxAuiToolBarEvent(wxEventType command_type = wxEVT_NULL,
- int win_id = 0)
- : wxNotifyEvent(command_type, win_id)
- {
- is_dropdown_clicked = false;
- click_pt = wxPoint(-1, -1);
- rect = wxRect(-1,-1, 0, 0);
- tool_id = -1;
- }
-#ifndef SWIG
- wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c)
- {
- is_dropdown_clicked = c.is_dropdown_clicked;
- click_pt = c.click_pt;
- rect = c.rect;
- tool_id = c.tool_id;
- }
-#endif
- wxEvent *Clone() const { return new wxAuiToolBarEvent(*this); }
-
- bool IsDropDownClicked() const { return is_dropdown_clicked; }
- void SetDropDownClicked(bool c) { is_dropdown_clicked = c; }
-
- wxPoint GetClickPoint() const { return click_pt; }
- void SetClickPoint(const wxPoint& p) { click_pt = p; }
-
- wxRect GetItemRect() const { return rect; }
- void SetItemRect(const wxRect& r) { rect = r; }
-
- int GetToolId() const { return tool_id; }
- void SetToolId(int id) { tool_id = id; }
-
-private:
-
- bool is_dropdown_clicked;
- wxPoint click_pt;
- wxRect rect;
- int tool_id;
-
-#ifndef SWIG
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiToolBarEvent)
-#endif
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiToolBarItem
-{
- friend class wxAuiToolBar;
-
-public:
-
- wxAuiToolBarItem()
- {
- window = NULL;
- sizer_item = NULL;
- spacer_pixels = 0;
- id = 0;
- kind = wxITEM_NORMAL;
- state = 0; // normal, enabled
- proportion = 0;
- active = true;
- dropdown = true;
- sticky = true;
- user_data = 0;
- }
-
- wxAuiToolBarItem(const wxAuiToolBarItem& c)
- {
- Assign(c);
- }
-
- wxAuiToolBarItem& operator=(const wxAuiToolBarItem& c)
- {
- Assign(c);
- return *this;
- }
-
- void Assign(const wxAuiToolBarItem& c)
- {
- window = c.window;
- label = c.label;
- bitmap = c.bitmap;
- disabled_bitmap = c.disabled_bitmap;
- hover_bitmap = c.hover_bitmap;
- short_help = c.short_help;
- long_help = c.long_help;
- sizer_item = c.sizer_item;
- min_size = c.min_size;
- spacer_pixels = c.spacer_pixels;
- id = c.id;
- kind = c.kind;
- state = c.state;
- proportion = c.proportion;
- active = c.active;
- dropdown = c.dropdown;
- sticky = c.sticky;
- user_data = c.user_data;
- }
-
-
- void SetWindow(wxWindow* w) { window = w; }
- wxWindow* GetWindow() { return window; }
-
- void SetId(int new_id) { id = new_id; }
- int GetId() const { return id; }
-
- void SetKind(int new_kind) { kind = new_kind; }
- int GetKind() const { return kind; }
-
- void SetState(int new_state) { state = new_state; }
- int GetState() const { return state; }
-
- void SetSizerItem(wxSizerItem* s) { sizer_item = s; }
- wxSizerItem* GetSizerItem() const { return sizer_item; }
-
- void SetLabel(const wxString& s) { label = s; }
- const wxString& GetLabel() const { return label; }
-
- void SetBitmap(const wxBitmap& bmp) { bitmap = bmp; }
- const wxBitmap& GetBitmap() const { return bitmap; }
-
- void SetDisabledBitmap(const wxBitmap& bmp) { disabled_bitmap = bmp; }
- const wxBitmap& GetDisabledBitmap() const { return disabled_bitmap; }
-
- void SetHoverBitmap(const wxBitmap& bmp) { hover_bitmap = bmp; }
- const wxBitmap& GetHoverBitmap() const { return hover_bitmap; }
-
- void SetShortHelp(const wxString& s) { short_help = s; }
- const wxString& GetShortHelp() const { return short_help; }
-
- void SetLongHelp(const wxString& s) { long_help = s; }
- const wxString& GetLongHelp() const { return long_help; }
-
- void SetMinSize(const wxSize& s) { min_size = s; }
- const wxSize& GetMinSize() const { return min_size; }
-
- void SetSpacerPixels(int s) { spacer_pixels = s; }
- int GetSpacerPixels() const { return spacer_pixels; }
-
- void SetProportion(int p) { proportion = p; }
- int GetProportion() const { return proportion; }
-
- void SetActive(bool b) { active = b; }
- bool IsActive() const { return active; }
-
- void SetHasDropDown(bool b) { dropdown = b; }
- bool HasDropDown() const { return dropdown; }
-
- void SetSticky(bool b) { sticky = b; }
- bool IsSticky() const { return sticky; }
-
- void SetUserData(long l) { user_data = l; }
- long GetUserData() const { return user_data; }
-
-private:
-
- wxWindow* window; // item's associated window
- wxString label; // label displayed on the item
- wxBitmap bitmap; // item's bitmap
- wxBitmap disabled_bitmap; // item's disabled bitmap
- wxBitmap hover_bitmap; // item's hover bitmap
- wxString short_help; // short help (for tooltip)
- wxString long_help; // long help (for status bar)
- wxSizerItem* sizer_item; // sizer item
- wxSize min_size; // item's minimum size
- int spacer_pixels; // size of a spacer
- int id; // item's id
- int kind; // item's kind
- int state; // state
- int proportion; // proportion
- bool active; // true if the item is currently active
- bool dropdown; // true if the item has a dropdown button
- bool sticky; // overrides button states if true (always active)
- long user_data; // user-specified data
-};
-
-#ifndef SWIG
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiToolBarItem, wxAuiToolBarItemArray, WXDLLIMPEXP_AUI);
-#endif
-
-
-
-
-// tab art class
-
-class WXDLLIMPEXP_AUI wxAuiToolBarArt
-{
-public:
-
- wxAuiToolBarArt() { }
- virtual ~wxAuiToolBarArt() { }
-
- virtual wxAuiToolBarArt* Clone() = 0;
- virtual void SetFlags(unsigned int flags) = 0;
- virtual void SetFont(const wxFont& font) = 0;
- virtual void SetTextOrientation(int orientation) = 0;
-
- virtual void DrawBackground(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect) = 0;
-
- virtual void DrawLabel(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect) = 0;
-
- virtual void DrawButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect) = 0;
-
- virtual void DrawDropDownButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect) = 0;
-
- virtual void DrawControlLabel(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect) = 0;
-
- virtual void DrawSeparator(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect) = 0;
-
- virtual void DrawGripper(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect) = 0;
-
- virtual void DrawOverflowButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect,
- int state) = 0;
-
- virtual wxSize GetLabelSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item) = 0;
-
- virtual wxSize GetToolSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item) = 0;
-
- virtual int GetElementSize(int element_id) = 0;
- virtual void SetElementSize(int element_id, int size) = 0;
-
- virtual int ShowDropDown(
- wxWindow* wnd,
- const wxAuiToolBarItemArray& items) = 0;
-};
-
-
-
-class WXDLLIMPEXP_AUI wxAuiDefaultToolBarArt : public wxAuiToolBarArt
-{
-
-public:
-
- wxAuiDefaultToolBarArt();
- virtual ~wxAuiDefaultToolBarArt();
-
- virtual wxAuiToolBarArt* Clone();
- virtual void SetFlags(unsigned int flags);
- virtual void SetFont(const wxFont& font);
- virtual void SetTextOrientation(int orientation);
-
- virtual void DrawBackground(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect);
-
- virtual void DrawLabel(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect);
-
- virtual void DrawButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect);
-
- virtual void DrawDropDownButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect);
-
- virtual void DrawControlLabel(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item,
- const wxRect& rect);
-
- virtual void DrawSeparator(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect);
-
- virtual void DrawGripper(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect);
-
- virtual void DrawOverflowButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect,
- int state);
-
- virtual wxSize GetLabelSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item);
-
- virtual wxSize GetToolSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxAuiToolBarItem& item);
-
- virtual int GetElementSize(int element);
- virtual void SetElementSize(int element_id, int size);
-
- virtual int ShowDropDown(wxWindow* wnd,
- const wxAuiToolBarItemArray& items);
-
-protected:
-
- wxBitmap m_button_dropdown_bmp;
- wxBitmap m_disabled_button_dropdown_bmp;
- wxBitmap m_overflow_bmp;
- wxBitmap m_disabled_overflow_bmp;
- wxColour m_base_colour;
- wxColour m_highlight_colour;
- wxFont m_font;
- unsigned int m_flags;
- int m_text_orientation;
-
- wxPen m_gripper_pen1;
- wxPen m_gripper_pen2;
- wxPen m_gripper_pen3;
-
- int m_separator_size;
- int m_gripper_size;
- int m_overflow_size;
-};
-
-
-
-
-class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl
-{
-public:
-
- wxAuiToolBar(wxWindow* parent,
- wxWindowID id = -1,
- const wxPoint& position = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxAUI_TB_DEFAULT_STYLE);
- ~wxAuiToolBar();
-
- void SetWindowStyleFlag(long style);
-
- void SetArtProvider(wxAuiToolBarArt* art);
- wxAuiToolBarArt* GetArtProvider() const;
-
- bool SetFont(const wxFont& font);
-
-
- void AddTool(int tool_id,
- const wxString& label,
- const wxBitmap& bitmap,
- const wxString& short_help_string = wxEmptyString,
- wxItemKind kind = wxITEM_NORMAL);
-
- void AddTool(int tool_id,
- const wxString& label,
- const wxBitmap& bitmap,
- const wxBitmap& disabled_bitmap,
- wxItemKind kind,
- const wxString& short_help_string,
- const wxString& long_help_string,
- wxObject* client_data);
-
- void AddTool(int tool_id,
- const wxBitmap& bitmap,
- const wxBitmap& disabled_bitmap,
- bool toggle = false,
- wxObject* client_data = NULL,
- const wxString& short_help_string = wxEmptyString,
- const wxString& long_help_string = wxEmptyString)
- {
- AddTool(tool_id,
- wxEmptyString,
- bitmap,
- disabled_bitmap,
- toggle ? wxITEM_CHECK : wxITEM_NORMAL,
- short_help_string,
- long_help_string,
- client_data);
- }
-
- void AddLabel(int tool_id,
- const wxString& label = wxEmptyString,
- const int width = -1);
- void AddControl(wxControl* control,
- const wxString& label = wxEmptyString);
- void AddSeparator();
- void AddSpacer(int pixels);
- void AddStretchSpacer(int proportion = 1);
-
- bool Realize();
-
- wxControl* FindControl(int window_id);
- wxAuiToolBarItem* FindToolByPosition(wxCoord x, wxCoord y) const;
- wxAuiToolBarItem* FindToolByIndex(int idx) const;
- wxAuiToolBarItem* FindTool(int tool_id) const;
-
- void ClearTools() { Clear() ; }
- void Clear();
- bool DeleteTool(int tool_id);
- bool DeleteByIndex(int tool_id);
-
- size_t GetToolCount() const;
- int GetToolPos(int tool_id) const { return GetToolIndex(tool_id); }
- int GetToolIndex(int tool_id) const;
- bool GetToolFits(int tool_id) const;
- wxRect GetToolRect(int tool_id) const;
- bool GetToolFitsByIndex(int tool_id) const;
- bool GetToolBarFits() const;
-
- void SetMargins(const wxSize& size) { SetMargins(size.x, size.x, size.y, size.y); }
- void SetMargins(int x, int y) { SetMargins(x, x, y, y); }
- void SetMargins(int left, int right, int top, int bottom);
-
- void SetToolBitmapSize(const wxSize& size);
- wxSize GetToolBitmapSize() const;
-
- bool GetOverflowVisible() const;
- void SetOverflowVisible(bool visible);
-
- bool GetGripperVisible() const;
- void SetGripperVisible(bool visible);
-
- void ToggleTool(int tool_id, bool state);
- bool GetToolToggled(int tool_id) const;
-
- void EnableTool(int tool_id, bool state);
- bool GetToolEnabled(int tool_id) const;
-
- void SetToolDropDown(int tool_id, bool dropdown);
- bool GetToolDropDown(int tool_id) const;
-
- void SetToolBorderPadding(int padding);
- int GetToolBorderPadding() const;
-
- void SetToolTextOrientation(int orientation);
- int GetToolTextOrientation() const;
-
- void SetToolPacking(int packing);
- int GetToolPacking() const;
-
- void SetToolProportion(int tool_id, int proportion);
- int GetToolProportion(int tool_id) const;
-
- void SetToolSeparation(int separation);
- int GetToolSeparation() const;
-
- void SetToolSticky(int tool_id, bool sticky);
- bool GetToolSticky(int tool_id) const;
-
- wxString GetToolLabel(int tool_id) const;
- void SetToolLabel(int tool_id, const wxString& label);
-
- wxBitmap GetToolBitmap(int tool_id) const;
- void SetToolBitmap(int tool_id, const wxBitmap& bitmap);
-
- wxString GetToolShortHelp(int tool_id) const;
- void SetToolShortHelp(int tool_id, const wxString& help_string);
-
- wxString GetToolLongHelp(int tool_id) const;
- void SetToolLongHelp(int tool_id, const wxString& help_string);
-
- void SetCustomOverflowItems(const wxAuiToolBarItemArray& prepend,
- const wxAuiToolBarItemArray& append);
-
-protected:
-
- virtual void OnCustomRender(wxDC& WXUNUSED(dc),
- const wxAuiToolBarItem& WXUNUSED(item),
- const wxRect& WXUNUSED(rect)) { }
-
-protected:
-
- void DoIdleUpdate();
- void SetOrientation(int orientation);
- void SetHoverItem(wxAuiToolBarItem* item);
- void SetPressedItem(wxAuiToolBarItem* item);
- void RefreshOverflowState();
-
- int GetOverflowState() const;
- wxRect GetOverflowRect() const;
- wxSize GetLabelSize(const wxString& label);
- wxAuiToolBarItem* FindToolByPositionWithPacking(wxCoord x, wxCoord y) const;
-
- void DoSetSize(int x,
- int y,
- int width,
- int height,
- int sizeFlags = wxSIZE_AUTO);
-
-protected: // handlers
-
- void OnSize(wxSizeEvent& evt);
- void OnIdle(wxIdleEvent& evt);
- void OnPaint(wxPaintEvent& evt);
- void OnEraseBackground(wxEraseEvent& evt);
- void OnLeftDown(wxMouseEvent& evt);
- void OnLeftUp(wxMouseEvent& evt);
- void OnRightDown(wxMouseEvent& evt);
- void OnRightUp(wxMouseEvent& evt);
- void OnMiddleDown(wxMouseEvent& evt);
- void OnMiddleUp(wxMouseEvent& evt);
- void OnMotion(wxMouseEvent& evt);
- void OnLeaveWindow(wxMouseEvent& evt);
- void OnSetCursor(wxSetCursorEvent& evt);
-
-protected:
-
- wxAuiToolBarItemArray m_items; // array of toolbar items
- wxAuiToolBarArt* m_art; // art provider
- wxBoxSizer* m_sizer; // main sizer for toolbar
- wxAuiToolBarItem* m_action_item; // item that's being acted upon (pressed)
- wxAuiToolBarItem* m_tip_item; // item that has its tooltip shown
- wxBitmap m_bitmap; // double-buffer bitmap
- wxSizerItem* m_gripper_sizer_item;
- wxSizerItem* m_overflow_sizer_item;
- wxSize m_absolute_min_size;
- wxPoint m_action_pos; // position of left-mouse down
- wxAuiToolBarItemArray m_custom_overflow_prepend;
- wxAuiToolBarItemArray m_custom_overflow_append;
-
- int m_button_width;
- int m_button_height;
- int m_sizer_element_count;
- int m_left_padding;
- int m_right_padding;
- int m_top_padding;
- int m_bottom_padding;
- int m_tool_packing;
- int m_tool_border_padding;
- int m_tool_text_orientation;
- int m_overflow_state;
- bool m_dragging;
- bool m_gripper_visible;
- bool m_overflow_visible;
- long m_style;
-
- DECLARE_EVENT_TABLE()
- DECLARE_CLASS(wxAuiToolBar)
-};
-
-
-
-
-// wx event machinery
-
-#ifndef SWIG
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 0)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&);
-
-#define wxAuiToolBarEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiToolBarEventFunction, &func)
-
-#define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn))
-#define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn))
-#define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn))
-#define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn))
-#define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn))
-
-#else
-
-// wxpython/swig event work
-%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN;
-%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK;
-%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK;
-%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK;
-%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG;
-
-%pythoncode {
- EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 1 )
- EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 1 )
- EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 1 )
- EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 1 )
- EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 1 )
-}
-#endif // SWIG
-
-#endif // wxABI_VERSION >= 20809
-
-#endif // wxUSE_AUI
-
-#endif // _WX_AUIBAR_H_
-
diff --git a/desmume/src/windows/wx/include/wx/aui/auibook.h b/desmume/src/windows/wx/include/wx/aui/auibook.h
deleted file mode 100644
index 0fc290a3c..000000000
--- a/desmume/src/windows/wx/include/wx/aui/auibook.h
+++ /dev/null
@@ -1,753 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aui/auibook.h
-// Purpose: wxaui: wx advanced user interface - notebook
-// Author: Benjamin I. Williams
-// Modified by:
-// Created: 2006-06-28
-// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
-// Licence: wxWindows Library Licence, Version 3.1
-///////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef _WX_AUINOTEBOOK_H_
-#define _WX_AUINOTEBOOK_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_AUI
-
-#include "wx/aui/framemanager.h"
-#include "wx/aui/dockart.h"
-#include "wx/aui/floatpane.h"
-#include "wx/control.h"
-
-
-class wxAuiNotebook;
-
-
-enum wxAuiNotebookOption
-{
- wxAUI_NB_TOP = 1 << 0,
- wxAUI_NB_LEFT = 1 << 1, // not implemented yet
- wxAUI_NB_RIGHT = 1 << 2, // not implemented yet
- wxAUI_NB_BOTTOM = 1 << 3,
- wxAUI_NB_TAB_SPLIT = 1 << 4,
- wxAUI_NB_TAB_MOVE = 1 << 5,
- wxAUI_NB_TAB_EXTERNAL_MOVE = 1 << 6,
- wxAUI_NB_TAB_FIXED_WIDTH = 1 << 7,
- wxAUI_NB_SCROLL_BUTTONS = 1 << 8,
- wxAUI_NB_WINDOWLIST_BUTTON = 1 << 9,
- wxAUI_NB_CLOSE_BUTTON = 1 << 10,
- wxAUI_NB_CLOSE_ON_ACTIVE_TAB = 1 << 11,
- wxAUI_NB_CLOSE_ON_ALL_TABS = 1 << 12,
- wxAUI_NB_MIDDLE_CLICK_CLOSE = 1 << 13,
-
- wxAUI_NB_DEFAULT_STYLE = wxAUI_NB_TOP |
- wxAUI_NB_TAB_SPLIT |
- wxAUI_NB_TAB_MOVE |
- wxAUI_NB_SCROLL_BUTTONS |
- wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
- wxAUI_NB_MIDDLE_CLICK_CLOSE
-};
-
-
-
-
-// aui notebook event class
-
-class WXDLLIMPEXP_AUI wxAuiNotebookEvent : public wxNotifyEvent
-{
-public:
- wxAuiNotebookEvent(wxEventType command_type = wxEVT_NULL,
- int win_id = 0)
- : wxNotifyEvent(command_type, win_id)
- {
- old_selection = -1;
- selection = -1;
- drag_source = NULL;
- }
-#ifndef SWIG
- wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxNotifyEvent(c)
- {
- old_selection = c.old_selection;
- selection = c.selection;
- drag_source = c.drag_source;
- }
-#endif
- wxEvent *Clone() const { return new wxAuiNotebookEvent(*this); }
-
- void SetSelection(int s) { selection = s; m_commandInt = s; }
- int GetSelection() const { return selection; }
-
- void SetOldSelection(int s) { old_selection = s; }
- int GetOldSelection() const { return old_selection; }
-
- void SetDragSource(wxAuiNotebook* s) { drag_source = s; }
- wxAuiNotebook* GetDragSource() const { return drag_source; }
-
-public:
- int old_selection;
- int selection;
- wxAuiNotebook* drag_source;
-
-#ifndef SWIG
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiNotebookEvent)
-#endif
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiNotebookPage
-{
-public:
- wxWindow* window; // page's associated window
- wxString caption; // caption displayed on the tab
- wxBitmap bitmap; // tab's bitmap
- wxRect rect; // tab's hit rectangle
- bool active; // true if the page is currently active
-};
-
-class WXDLLIMPEXP_AUI wxAuiTabContainerButton
-{
-public:
-
- int id; // button's id
- int cur_state; // current state (normal, hover, pressed, etc.)
- int location; // buttons location (wxLEFT, wxRIGHT, or wxCENTER)
- wxBitmap bitmap; // button's hover bitmap
- wxBitmap dis_bitmap; // button's disabled bitmap
- wxRect rect; // button's hit rectangle
-};
-
-
-#ifndef SWIG
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiNotebookPage, wxAuiNotebookPageArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton, wxAuiTabContainerButtonArray, WXDLLIMPEXP_AUI);
-#endif
-
-
-// tab art class
-
-class WXDLLIMPEXP_AUI wxAuiTabArt
-{
-public:
-
- wxAuiTabArt() { }
- virtual ~wxAuiTabArt() { }
-
- virtual wxAuiTabArt* Clone() = 0;
- virtual void SetFlags(unsigned int flags) = 0;
-
- virtual void SetSizingInfo(const wxSize& tab_ctrl_size,
- size_t tab_count) = 0;
-
- virtual void SetNormalFont(const wxFont& font) = 0;
- virtual void SetSelectedFont(const wxFont& font) = 0;
- virtual void SetMeasuringFont(const wxFont& font) = 0;
-
- virtual void DrawBackground(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect) = 0;
-
- virtual void DrawTab(wxDC& dc,
- wxWindow* wnd,
- const wxAuiNotebookPage& pane,
- const wxRect& in_rect,
- int close_button_state,
- wxRect* out_tab_rect,
- wxRect* out_button_rect,
- int* x_extent) = 0;
-
- virtual void DrawButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& in_rect,
- int bitmap_id,
- int button_state,
- int orientation,
- wxRect* out_rect) = 0;
-
- virtual wxSize GetTabSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxString& caption,
- const wxBitmap& bitmap,
- bool active,
- int close_button_state,
- int* x_extent) = 0;
-
- virtual int ShowDropDown(
- wxWindow* wnd,
- const wxAuiNotebookPageArray& items,
- int active_idx) = 0;
-
- virtual int GetIndentSize() = 0;
-
- virtual int GetBestTabCtrlSize(
- wxWindow* wnd,
- const wxAuiNotebookPageArray& pages,
- const wxSize& required_bmp_size) = 0;
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiDefaultTabArt : public wxAuiTabArt
-{
-
-public:
-
- wxAuiDefaultTabArt();
- virtual ~wxAuiDefaultTabArt();
-
- wxAuiTabArt* Clone();
- void SetFlags(unsigned int flags);
- void SetSizingInfo(const wxSize& tab_ctrl_size,
- size_t tab_count);
-
- void SetNormalFont(const wxFont& font);
- void SetSelectedFont(const wxFont& font);
- void SetMeasuringFont(const wxFont& font);
-
- void DrawBackground(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect);
-
- void DrawTab(wxDC& dc,
- wxWindow* wnd,
- const wxAuiNotebookPage& pane,
- const wxRect& in_rect,
- int close_button_state,
- wxRect* out_tab_rect,
- wxRect* out_button_rect,
- int* x_extent);
-
- void DrawButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& in_rect,
- int bitmap_id,
- int button_state,
- int orientation,
- wxRect* out_rect);
-
- int GetIndentSize();
-
- wxSize GetTabSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxString& caption,
- const wxBitmap& bitmap,
- bool active,
- int close_button_state,
- int* x_extent);
-
- int ShowDropDown(
- wxWindow* wnd,
- const wxAuiNotebookPageArray& items,
- int active_idx);
-
- int GetBestTabCtrlSize(wxWindow* wnd,
- const wxAuiNotebookPageArray& pages,
- const wxSize& required_bmp_size);
-
-protected:
-
- wxFont m_normal_font;
- wxFont m_selected_font;
- wxFont m_measuring_font;
- wxColour m_base_colour;
- wxPen m_base_colour_pen;
- wxPen m_border_pen;
- wxBrush m_base_colour_brush;
- wxBitmap m_active_close_bmp;
- wxBitmap m_disabled_close_bmp;
- wxBitmap m_active_left_bmp;
- wxBitmap m_disabled_left_bmp;
- wxBitmap m_active_right_bmp;
- wxBitmap m_disabled_right_bmp;
- wxBitmap m_active_windowlist_bmp;
- wxBitmap m_disabled_windowlist_bmp;
-
- int m_fixed_tab_width;
- int m_tab_ctrl_height;
- unsigned int m_flags;
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt
-{
-
-public:
-
- wxAuiSimpleTabArt();
- virtual ~wxAuiSimpleTabArt();
-
- wxAuiTabArt* Clone();
- void SetFlags(unsigned int flags);
-
- void SetSizingInfo(const wxSize& tab_ctrl_size,
- size_t tab_count);
-
- void SetNormalFont(const wxFont& font);
- void SetSelectedFont(const wxFont& font);
- void SetMeasuringFont(const wxFont& font);
-
- void DrawBackground(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& rect);
-
- void DrawTab(wxDC& dc,
- wxWindow* wnd,
- const wxAuiNotebookPage& pane,
- const wxRect& in_rect,
- int close_button_state,
- wxRect* out_tab_rect,
- wxRect* out_button_rect,
- int* x_extent);
-
- void DrawButton(
- wxDC& dc,
- wxWindow* wnd,
- const wxRect& in_rect,
- int bitmap_id,
- int button_state,
- int orientation,
- wxRect* out_rect);
-
- int GetIndentSize();
-
- wxSize GetTabSize(
- wxDC& dc,
- wxWindow* wnd,
- const wxString& caption,
- const wxBitmap& bitmap,
- bool active,
- int close_button_state,
- int* x_extent);
-
- int ShowDropDown(
- wxWindow* wnd,
- const wxAuiNotebookPageArray& items,
- int active_idx);
-
- int GetBestTabCtrlSize(wxWindow* wnd,
- const wxAuiNotebookPageArray& pages,
- const wxSize& required_bmp_size);
-
-protected:
-
- wxFont m_normal_font;
- wxFont m_selected_font;
- wxFont m_measuring_font;
- wxPen m_normal_bkpen;
- wxPen m_selected_bkpen;
- wxBrush m_normal_bkbrush;
- wxBrush m_selected_bkbrush;
- wxBrush m_bkbrush;
- wxBitmap m_active_close_bmp;
- wxBitmap m_disabled_close_bmp;
- wxBitmap m_active_left_bmp;
- wxBitmap m_disabled_left_bmp;
- wxBitmap m_active_right_bmp;
- wxBitmap m_disabled_right_bmp;
- wxBitmap m_active_windowlist_bmp;
- wxBitmap m_disabled_windowlist_bmp;
-
- int m_fixed_tab_width;
- unsigned int m_flags;
-};
-
-
-
-
-
-
-
-
-
-class WXDLLIMPEXP_AUI wxAuiTabContainer
-{
-public:
-
- wxAuiTabContainer();
- virtual ~wxAuiTabContainer();
-
- void SetArtProvider(wxAuiTabArt* art);
- wxAuiTabArt* GetArtProvider() const;
-
- void SetFlags(unsigned int flags);
- unsigned int GetFlags() const;
-
- bool AddPage(wxWindow* page, const wxAuiNotebookPage& info);
- bool InsertPage(wxWindow* page, const wxAuiNotebookPage& info, size_t idx);
- bool MovePage(wxWindow* page, size_t new_idx);
- bool RemovePage(wxWindow* page);
- bool SetActivePage(wxWindow* page);
- bool SetActivePage(size_t page);
- void SetNoneActive();
- int GetActivePage() const;
- bool TabHitTest(int x, int y, wxWindow** hit) const;
- bool ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const;
- wxWindow* GetWindowFromIdx(size_t idx) const;
- int GetIdxFromWindow(wxWindow* page) const;
- size_t GetPageCount() const;
- wxAuiNotebookPage& GetPage(size_t idx);
- const wxAuiNotebookPage& GetPage(size_t idx) const;
- wxAuiNotebookPageArray& GetPages();
- void SetNormalFont(const wxFont& normal_font);
- void SetSelectedFont(const wxFont& selected_font);
- void SetMeasuringFont(const wxFont& measuring_font);
- void DoShowHide();
- void SetRect(const wxRect& rect);
-
- void RemoveButton(int id);
- void AddButton(int id,
- int location,
- const wxBitmap& normal_bitmap = wxNullBitmap,
- const wxBitmap& disabled_bitmap = wxNullBitmap);
-
- size_t GetTabOffset() const;
- void SetTabOffset(size_t offset);
-
- // Is the tab visible?
- bool IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWindow* wnd);
-
- // Make the tab visible if it wasn't already
- void MakeTabVisible(int tabPage, wxWindow* win);
-
-protected:
-
- virtual void Render(wxDC* dc, wxWindow* wnd);
-
-protected:
-
- wxAuiTabArt* m_art;
- wxAuiNotebookPageArray m_pages;
- wxAuiTabContainerButtonArray m_buttons;
- wxAuiTabContainerButtonArray m_tab_close_buttons;
- wxRect m_rect;
- size_t m_tab_offset;
- unsigned int m_flags;
-};
-
-
-
-class WXDLLIMPEXP_AUI wxAuiTabCtrl : public wxControl,
- public wxAuiTabContainer
-{
-public:
-
- wxAuiTabCtrl(wxWindow* parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0);
-
- ~wxAuiTabCtrl();
-
-#if wxABI_VERSION >= 20805
- bool IsDragging() const { return m_is_dragging; }
-#endif
-
-protected:
-
- void OnPaint(wxPaintEvent& evt);
- void OnEraseBackground(wxEraseEvent& evt);
- void OnSize(wxSizeEvent& evt);
- void OnLeftDown(wxMouseEvent& evt);
- void OnLeftUp(wxMouseEvent& evt);
-#if wxABI_VERSION >= 20805
- void OnMiddleDown(wxMouseEvent& evt);
- void OnMiddleUp(wxMouseEvent& evt);
- void OnRightDown(wxMouseEvent& evt);
- void OnRightUp(wxMouseEvent& evt);
- void OnLeftDClick(wxMouseEvent& evt);
- void OnSetFocus(wxFocusEvent& evt);
- void OnKillFocus(wxFocusEvent& evt);
- void OnChar(wxKeyEvent& evt);
-#endif
-#if wxABI_VERSION >= 20809
- void OnCaptureLost(wxMouseCaptureLostEvent& evt);
-#endif
- void OnMotion(wxMouseEvent& evt);
- void OnLeaveWindow(wxMouseEvent& evt);
- void OnButton(wxAuiNotebookEvent& evt);
-
-protected:
-
- wxPoint m_click_pt;
- wxWindow* m_click_tab;
- bool m_is_dragging;
- wxAuiTabContainerButton* m_hover_button;
- wxAuiTabContainerButton* m_pressed_button;
-
-#ifndef SWIG
- DECLARE_CLASS(wxAuiTabCtrl)
- DECLARE_EVENT_TABLE()
-#endif
-};
-
-
-
-
-class WXDLLIMPEXP_AUI wxAuiNotebook : public wxControl
-{
-
-public:
-
- wxAuiNotebook();
-
- wxAuiNotebook(wxWindow* parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxAUI_NB_DEFAULT_STYLE);
-
- virtual ~wxAuiNotebook();
-
- bool Create(wxWindow* parent,
- wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0);
-
- void SetWindowStyleFlag(long style);
- void SetArtProvider(wxAuiTabArt* art);
- wxAuiTabArt* GetArtProvider() const;
-
- virtual void SetUniformBitmapSize(const wxSize& size);
- virtual void SetTabCtrlHeight(int height);
-
- bool AddPage(wxWindow* page,
- const wxString& caption,
- bool select = false,
- const wxBitmap& bitmap = wxNullBitmap);
-
- bool InsertPage(size_t page_idx,
- wxWindow* page,
- const wxString& caption,
- bool select = false,
- const wxBitmap& bitmap = wxNullBitmap);
-
- bool DeletePage(size_t page);
- bool RemovePage(size_t page);
-
- size_t GetPageCount() const;
- wxWindow* GetPage(size_t page_idx) const;
- int GetPageIndex(wxWindow* page_wnd) const;
-
- bool SetPageText(size_t page, const wxString& text);
- wxString GetPageText(size_t page_idx) const;
-
- bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
- wxBitmap GetPageBitmap(size_t page_idx) const;
-
- size_t SetSelection(size_t new_page);
- int GetSelection() const;
-
- virtual void Split(size_t page, int direction);
-
-#if wxABI_VERSION >= 20801
- const wxAuiManager& GetAuiManager() const { return m_mgr; }
-#endif
-
-#if wxABI_VERSION >= 20805
- // Sets the normal font
- void SetNormalFont(const wxFont& font);
-
- // Sets the selected tab font
- void SetSelectedFont(const wxFont& font);
-
- // Sets the measuring font
- void SetMeasuringFont(const wxFont& font);
-
- // Sets the tab font
- virtual bool SetFont(const wxFont& font);
-
- // Gets the tab control height
- int GetTabCtrlHeight() const;
-
- // Gets the height of the notebook for a given page height
- int GetHeightForPageHeight(int pageHeight);
-
- // Advances the selection, generation page selection events
- void AdvanceSelection(bool forward = true);
-
- // Shows the window menu
- bool ShowWindowMenu();
-#endif
-
-protected:
-
- // these can be overridden
- virtual void UpdateTabCtrlHeight();
- virtual int CalculateTabCtrlHeight();
- virtual wxSize CalculateNewSplitSize();
-
-protected:
-
- void DoSizing();
- void InitNotebook(long style);
- wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
- wxWindow* GetTabFrameFromTabCtrl(wxWindow* tab_ctrl);
- wxAuiTabCtrl* GetActiveTabCtrl();
- bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
- void RemoveEmptyTabFrames();
- void UpdateHintWindowSize();
-
-protected:
-
- void OnChildFocus(wxChildFocusEvent& evt);
- void OnRender(wxAuiManagerEvent& evt);
- void OnSize(wxSizeEvent& evt);
- void OnTabClicked(wxCommandEvent& evt);
- void OnTabBeginDrag(wxCommandEvent& evt);
- void OnTabDragMotion(wxCommandEvent& evt);
- void OnTabEndDrag(wxCommandEvent& evt);
- void OnTabButton(wxCommandEvent& evt);
-#if wxABI_VERSION >= 20805
- void OnTabMiddleDown(wxCommandEvent& evt);
- void OnTabMiddleUp(wxCommandEvent& evt);
- void OnTabRightDown(wxCommandEvent& evt);
- void OnTabRightUp(wxCommandEvent& evt);
- void OnNavigationKey(wxNavigationKeyEvent& event);
- void OnTabBgDClick(wxCommandEvent& evt);
-#endif
-
-protected:
-
- wxAuiManager m_mgr;
- wxAuiTabContainer m_tabs;
- int m_curpage;
- int m_tab_id_counter;
- wxWindow* m_dummy_wnd;
-
- wxSize m_requested_bmp_size;
- int m_requested_tabctrl_height;
- wxFont m_selected_font;
- wxFont m_normal_font;
- int m_tab_ctrl_height;
-
- int m_last_drag_x;
- unsigned int m_flags;
-
-#ifndef SWIG
- DECLARE_CLASS(wxAuiNotebook)
- DECLARE_EVENT_TABLE()
-#endif
-};
-
-
-
-
-// wx event machinery
-
-#ifndef SWIG
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 0)
-#if wxABI_VERSION >= 20805
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 0)
-#endif
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&);
-
-#define wxAuiNotebookEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiNotebookEventFunction, &func)
-
-#define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_BUTTON(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn))
-
-#if wxABI_VERSION >= 20805
-#define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn))
-#define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn))
-#endif
-
-#else
-
-// wxpython/swig event work
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN;
-%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP;
-
-%pythoncode {
- EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 1 )
- EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 1 )
- EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 1 )
- EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 1 )
- EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 1 )
- EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 1 )
- EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 1 )
- EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 1 )
- EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 1 )
- EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 1 )
- EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 1 )
- EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 )
- EVT_AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP , 1 )
- EVT_AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 )
- EVT_AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 1 )
-}
-#endif
-
-
-#endif // wxUSE_AUI
-#endif // _WX_AUINOTEBOOK_H_
diff --git a/desmume/src/windows/wx/include/wx/aui/dockart.h b/desmume/src/windows/wx/include/wx/aui/dockart.h
deleted file mode 100644
index 0c5bfe2a6..000000000
--- a/desmume/src/windows/wx/include/wx/aui/dockart.h
+++ /dev/null
@@ -1,173 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aui/dockart.h
-// Purpose: wxaui: wx advanced user interface - docking window manager
-// Author: Benjamin I. Williams
-// Modified by:
-// Created: 2005-05-17
-// RCS-ID: $Id: dockart.h 43154 2006-11-07 10:29:02Z BIW $
-// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
-// Licence: wxWindows Library Licence, Version 3.1
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DOCKART_H_
-#define _WX_DOCKART_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_AUI
-
-#include "wx/pen.h"
-#include "wx/brush.h"
-#include "wx/bitmap.h"
-#include "wx/colour.h"
-
-// dock art provider code - a dock provider provides all drawing
-// functionality to the wxAui dock manager. This allows the dock
-// manager to have plugable look-and-feels
-
-class WXDLLIMPEXP_AUI wxAuiDockArt
-{
-public:
-
- wxAuiDockArt() { }
- virtual ~wxAuiDockArt() { }
-
- virtual int GetMetric(int id) = 0;
- virtual void SetMetric(int id, int new_val) = 0;
- virtual void SetFont(int id, const wxFont& font) = 0;
- virtual wxFont GetFont(int id) = 0;
- virtual wxColour GetColour(int id) = 0;
- virtual void SetColour(int id, const wxColor& colour) = 0;
- wxColour GetColor(int id) { return GetColour(id); }
- void SetColor(int id, const wxColour& color) { SetColour(id, color); }
-
- virtual void DrawSash(wxDC& dc,
- wxWindow* window,
- int orientation,
- const wxRect& rect) = 0;
-
- virtual void DrawBackground(wxDC& dc,
- wxWindow* window,
- int orientation,
- const wxRect& rect) = 0;
-
- virtual void DrawCaption(wxDC& dc,
- wxWindow* window,
- const wxString& text,
- const wxRect& rect,
- wxAuiPaneInfo& pane) = 0;
-
- virtual void DrawGripper(wxDC& dc,
- wxWindow* window,
- const wxRect& rect,
- wxAuiPaneInfo& pane) = 0;
-
- virtual void DrawBorder(wxDC& dc,
- wxWindow* window,
- const wxRect& rect,
- wxAuiPaneInfo& pane) = 0;
-
- virtual void DrawPaneButton(wxDC& dc,
- wxWindow* window,
- int button,
- int button_state,
- const wxRect& rect,
- wxAuiPaneInfo& pane) = 0;
-};
-
-
-// this is the default art provider for wxAuiManager. Dock art
-// can be customized by creating a class derived from this one,
-// or replacing this class entirely
-
-class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
-{
-public:
-
- wxAuiDefaultDockArt();
-
- int GetMetric(int metric_id);
- void SetMetric(int metric_id, int new_val);
- wxColour GetColour(int id);
- void SetColour(int id, const wxColor& colour);
- void SetFont(int id, const wxFont& font);
- wxFont GetFont(int id);
-
- void DrawSash(wxDC& dc,
- wxWindow *window,
- int orientation,
- const wxRect& rect);
-
- void DrawBackground(wxDC& dc,
- wxWindow *window,
- int orientation,
- const wxRect& rect);
-
- void DrawCaption(wxDC& dc,
- wxWindow *window,
- const wxString& text,
- const wxRect& rect,
- wxAuiPaneInfo& pane);
-
- void DrawGripper(wxDC& dc,
- wxWindow *window,
- const wxRect& rect,
- wxAuiPaneInfo& pane);
-
- void DrawBorder(wxDC& dc,
- wxWindow *window,
- const wxRect& rect,
- wxAuiPaneInfo& pane);
-
- void DrawPaneButton(wxDC& dc,
- wxWindow *window,
- int button,
- int button_state,
- const wxRect& rect,
- wxAuiPaneInfo& pane);
-
-protected:
-
- void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
-
-protected:
-
- wxPen m_border_pen;
- wxBrush m_sash_brush;
- wxBrush m_background_brush;
- wxBrush m_gripper_brush;
- wxFont m_caption_font;
- wxBitmap m_inactive_close_bitmap;
- wxBitmap m_inactive_pin_bitmap;
- wxBitmap m_inactive_maximize_bitmap;
- wxBitmap m_inactive_restore_bitmap;
- wxBitmap m_active_close_bitmap;
- wxBitmap m_active_pin_bitmap;
- wxBitmap m_active_maximize_bitmap;
- wxBitmap m_active_restore_bitmap;
- wxPen m_gripper_pen1;
- wxPen m_gripper_pen2;
- wxPen m_gripper_pen3;
- wxColour m_base_colour;
- wxColour m_active_caption_colour;
- wxColour m_active_caption_gradient_colour;
- wxColour m_active_caption_text_colour;
- wxColour m_inactive_caption_colour;
- wxColour m_inactive_caption_gradient_colour;
- wxColour m_inactive_caption_text_colour;
- int m_border_size;
- int m_caption_size;
- int m_sash_size;
- int m_button_size;
- int m_gripper_size;
- int m_gradient_type;
-};
-
-
-
-#endif // wxUSE_AUI
-#endif //_WX_DOCKART_H_
diff --git a/desmume/src/windows/wx/include/wx/aui/floatpane.h b/desmume/src/windows/wx/include/wx/aui/floatpane.h
deleted file mode 100644
index 752959477..000000000
--- a/desmume/src/windows/wx/include/wx/aui/floatpane.h
+++ /dev/null
@@ -1,81 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aui/floatpane.h
-// Purpose: wxaui: wx advanced user interface - docking window manager
-// Author: Benjamin I. Williams
-// Modified by:
-// Created: 2005-05-17
-// RCS-ID: $Id: floatpane.h 43467 2006-11-17 13:07:01Z BIW $
-// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
-// Licence: wxWindows Library Licence, Version 3.1
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FLOATPANE_H_
-#define _WX_FLOATPANE_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_AUI
-
-#include "wx/frame.h"
-
-#if defined( __WXMSW__ ) || defined( __WXMAC__ ) || defined( __WXGTK__ )
-#include "wx/minifram.h"
-#define wxAuiFloatingFrameBaseClass wxMiniFrame
-#else
-#define wxAuiFloatingFrameBaseClass wxFrame
-#endif
-
-class WXDLLIMPEXP_AUI wxAuiFloatingFrame : public wxAuiFloatingFrameBaseClass
-{
-public:
- wxAuiFloatingFrame(wxWindow* parent,
- wxAuiManager* owner_mgr,
- const wxAuiPaneInfo& pane,
- wxWindowID id = wxID_ANY,
- long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
- wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT |
- wxCLIP_CHILDREN
- );
- virtual ~wxAuiFloatingFrame();
- void SetPaneWindow(const wxAuiPaneInfo& pane);
- wxAuiManager* GetOwnerManager() const;
-
-protected:
- virtual void OnMoveStart();
- virtual void OnMoving(const wxRect& window_rect, wxDirection dir);
- virtual void OnMoveFinished();
-
-private:
- void OnSize(wxSizeEvent& event);
- void OnClose(wxCloseEvent& event);
- void OnMoveEvent(wxMoveEvent& event);
- void OnIdle(wxIdleEvent& event);
- void OnActivate(wxActivateEvent& event);
- static bool isMouseDown();
-
-private:
- wxWindow* m_pane_window; // pane window being managed
- bool m_solid_drag; // true if system uses solid window drag
- bool m_moving;
- wxRect m_last_rect;
- wxRect m_last2_rect;
- wxRect m_last3_rect;
- wxSize m_last_size;
- wxDirection m_lastDirection;
-
- wxAuiManager* m_owner_mgr;
- wxAuiManager m_mgr;
-
-#ifndef SWIG
- DECLARE_EVENT_TABLE()
- DECLARE_CLASS(wxAuiFloatingFrame)
-#endif // SWIG
-};
-
-#endif // wxUSE_AUI
-#endif //_WX_FLOATPANE_H_
-
diff --git a/desmume/src/windows/wx/include/wx/aui/framemanager.h b/desmume/src/windows/wx/include/wx/aui/framemanager.h
deleted file mode 100644
index c267ad233..000000000
--- a/desmume/src/windows/wx/include/wx/aui/framemanager.h
+++ /dev/null
@@ -1,856 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/aui/framemanager.h
-// Purpose: wxaui: wx advanced user interface - docking window manager
-// Author: Benjamin I. Williams
-// Modified by:
-// Created: 2005-05-17
-// RCS-ID: $Id: framemanager.h 57885 2009-01-07 14:51:49Z JS $
-// Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
-// Licence: wxWindows Library Licence, Version 3.1
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FRAMEMANAGER_H_
-#define _WX_FRAMEMANAGER_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_AUI
-
-#include "wx/dynarray.h"
-#include "wx/gdicmn.h"
-#include "wx/window.h"
-#include "wx/timer.h"
-#include "wx/sizer.h"
-
-enum wxAuiManagerDock
-{
- wxAUI_DOCK_NONE = 0,
- wxAUI_DOCK_TOP = 1,
- wxAUI_DOCK_RIGHT = 2,
- wxAUI_DOCK_BOTTOM = 3,
- wxAUI_DOCK_LEFT = 4,
- wxAUI_DOCK_CENTER = 5,
- wxAUI_DOCK_CENTRE = wxAUI_DOCK_CENTER
-};
-
-enum wxAuiManagerOption
-{
- wxAUI_MGR_ALLOW_FLOATING = 1 << 0,
- wxAUI_MGR_ALLOW_ACTIVE_PANE = 1 << 1,
- wxAUI_MGR_TRANSPARENT_DRAG = 1 << 2,
- wxAUI_MGR_TRANSPARENT_HINT = 1 << 3,
- wxAUI_MGR_VENETIAN_BLINDS_HINT = 1 << 4,
- wxAUI_MGR_RECTANGLE_HINT = 1 << 5,
- wxAUI_MGR_HINT_FADE = 1 << 6,
- wxAUI_MGR_NO_VENETIAN_BLINDS_FADE = 1 << 7,
- wxAUI_MGR_LIVE_RESIZE = 1 << 8,
-
- wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
- wxAUI_MGR_TRANSPARENT_HINT |
- wxAUI_MGR_HINT_FADE |
- wxAUI_MGR_NO_VENETIAN_BLINDS_FADE
-};
-
-
-enum wxAuiPaneDockArtSetting
-{
- wxAUI_DOCKART_SASH_SIZE = 0,
- wxAUI_DOCKART_CAPTION_SIZE = 1,
- wxAUI_DOCKART_GRIPPER_SIZE = 2,
- wxAUI_DOCKART_PANE_BORDER_SIZE = 3,
- wxAUI_DOCKART_PANE_BUTTON_SIZE = 4,
- wxAUI_DOCKART_BACKGROUND_COLOUR = 5,
- wxAUI_DOCKART_SASH_COLOUR = 6,
- wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7,
- wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8,
- wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9,
- wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10,
- wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11,
- wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12,
- wxAUI_DOCKART_BORDER_COLOUR = 13,
- wxAUI_DOCKART_GRIPPER_COLOUR = 14,
- wxAUI_DOCKART_CAPTION_FONT = 15,
- wxAUI_DOCKART_GRADIENT_TYPE = 16
-};
-
-enum wxAuiPaneDockArtGradients
-{
- wxAUI_GRADIENT_NONE = 0,
- wxAUI_GRADIENT_VERTICAL = 1,
- wxAUI_GRADIENT_HORIZONTAL = 2
-};
-
-enum wxAuiPaneButtonState
-{
- wxAUI_BUTTON_STATE_NORMAL = 0,
- wxAUI_BUTTON_STATE_HOVER = 1 << 1,
- wxAUI_BUTTON_STATE_PRESSED = 1 << 2,
- wxAUI_BUTTON_STATE_DISABLED = 1 << 3,
- wxAUI_BUTTON_STATE_HIDDEN = 1 << 4,
- wxAUI_BUTTON_STATE_CHECKED = 1 << 5
-};
-
-enum wxAuiButtonId
-{
- wxAUI_BUTTON_CLOSE = 101,
- wxAUI_BUTTON_MAXIMIZE_RESTORE = 102,
- wxAUI_BUTTON_MINIMIZE = 103,
- wxAUI_BUTTON_PIN = 104,
- wxAUI_BUTTON_OPTIONS = 105,
- wxAUI_BUTTON_WINDOWLIST = 106,
- wxAUI_BUTTON_LEFT = 107,
- wxAUI_BUTTON_RIGHT = 108,
- wxAUI_BUTTON_UP = 109,
- wxAUI_BUTTON_DOWN = 110,
- wxAUI_BUTTON_CUSTOM1 = 201,
- wxAUI_BUTTON_CUSTOM2 = 202,
- wxAUI_BUTTON_CUSTOM3 = 203
-};
-
-enum wxAuiPaneInsertLevel
-{
- wxAUI_INSERT_PANE = 0,
- wxAUI_INSERT_ROW = 1,
- wxAUI_INSERT_DOCK = 2
-};
-
-
-
-
-// forwards and array declarations
-class wxAuiDockUIPart;
-class wxAuiPaneButton;
-class wxAuiPaneInfo;
-class wxAuiDockInfo;
-class wxAuiDockArt;
-class wxAuiManagerEvent;
-
-#ifndef SWIG
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockInfo, wxAuiDockInfoArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiDockUIPart, wxAuiDockUIPartArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneButton, wxAuiPaneButtonArray, WXDLLIMPEXP_AUI);
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiPaneInfo, wxAuiPaneInfoArray, WXDLLIMPEXP_AUI);
-WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiPaneInfo*, wxAuiPaneInfoPtrArray, class WXDLLIMPEXP_AUI);
-WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxAuiDockInfo*, wxAuiDockInfoPtrArray, class WXDLLIMPEXP_AUI);
-#endif // SWIG
-
-extern WXDLLIMPEXP_AUI wxAuiDockInfo wxAuiNullDockInfo;
-extern WXDLLIMPEXP_AUI wxAuiPaneInfo wxAuiNullPaneInfo;
-
-
-
-class WXDLLIMPEXP_AUI wxAuiPaneInfo
-{
-public:
-
- wxAuiPaneInfo()
- {
- window = NULL;
- frame = NULL;
- state = 0;
- dock_direction = wxAUI_DOCK_LEFT;
- dock_layer = 0;
- dock_row = 0;
- dock_pos = 0;
- floating_pos = wxDefaultPosition;
- floating_size = wxDefaultSize;
- best_size = wxDefaultSize;
- min_size = wxDefaultSize;
- max_size = wxDefaultSize;
- dock_proportion = 0;
-
- DefaultPane();
- }
-
- ~wxAuiPaneInfo() {}
-
-#ifndef SWIG
- wxAuiPaneInfo(const wxAuiPaneInfo& c)
- {
- name = c.name;
- caption = c.caption;
- window = c.window;
- frame = c.frame;
- state = c.state;
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- dock_pos = c.dock_pos;
- best_size = c.best_size;
- min_size = c.min_size;
- max_size = c.max_size;
- floating_pos = c.floating_pos;
- floating_size = c.floating_size;
- dock_proportion = c.dock_proportion;
- buttons = c.buttons;
- rect = c.rect;
- }
-
- wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c)
- {
- name = c.name;
- caption = c.caption;
- window = c.window;
- frame = c.frame;
- state = c.state;
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- dock_pos = c.dock_pos;
- best_size = c.best_size;
- min_size = c.min_size;
- max_size = c.max_size;
- floating_pos = c.floating_pos;
- floating_size = c.floating_size;
- dock_proportion = c.dock_proportion;
- buttons = c.buttons;
- rect = c.rect;
- return *this;
- }
-#endif // SWIG
-
- // Write the safe parts of a newly loaded PaneInfo structure "source" into "this"
- // used on loading perspectives etc.
- void SafeSet(wxAuiPaneInfo source)
- {
- // note source is not passed by reference so we can overwrite, to keep the
- // unsafe bits of "dest"
- source.window = window;
- source.frame = frame;
- source.buttons = buttons;
- // now assign
- *this = source;
- }
-
- bool IsOk() const { return (window != NULL) ? true : false; }
- bool IsFixed() const { return !HasFlag(optionResizable); }
- bool IsResizable() const { return HasFlag(optionResizable); }
- bool IsShown() const { return !HasFlag(optionHidden); }
- bool IsFloating() const { return HasFlag(optionFloating); }
- bool IsDocked() const { return !HasFlag(optionFloating); }
- bool IsToolbar() const { return HasFlag(optionToolbar); }
- bool IsTopDockable() const { return HasFlag(optionTopDockable); }
- bool IsBottomDockable() const { return HasFlag(optionBottomDockable); }
- bool IsLeftDockable() const { return HasFlag(optionLeftDockable); }
- bool IsRightDockable() const { return HasFlag(optionRightDockable); }
- bool IsFloatable() const { return HasFlag(optionFloatable); }
- bool IsMovable() const { return HasFlag(optionMovable); }
- bool IsDestroyOnClose() const { return HasFlag(optionDestroyOnClose); }
- bool IsMaximized() const { return HasFlag(optionMaximized); }
- bool HasCaption() const { return HasFlag(optionCaption); }
- bool HasGripper() const { return HasFlag(optionGripper); }
- bool HasBorder() const { return HasFlag(optionPaneBorder); }
- bool HasCloseButton() const { return HasFlag(buttonClose); }
- bool HasMaximizeButton() const { return HasFlag(buttonMaximize); }
- bool HasMinimizeButton() const { return HasFlag(buttonMinimize); }
- bool HasPinButton() const { return HasFlag(buttonPin); }
- bool HasGripperTop() const { return HasFlag(optionGripperTop); }
-
-#ifdef SWIG
- %typemap(out) wxAuiPaneInfo& { $result = $self; Py_INCREF($result); }
-#endif
- wxAuiPaneInfo& Window(wxWindow* w) { window = w; return *this; }
- wxAuiPaneInfo& Name(const wxString& n) { name = n; return *this; }
- wxAuiPaneInfo& Caption(const wxString& c) { caption = c; return *this; }
- wxAuiPaneInfo& Left() { dock_direction = wxAUI_DOCK_LEFT; return *this; }
- wxAuiPaneInfo& Right() { dock_direction = wxAUI_DOCK_RIGHT; return *this; }
- wxAuiPaneInfo& Top() { dock_direction = wxAUI_DOCK_TOP; return *this; }
- wxAuiPaneInfo& Bottom() { dock_direction = wxAUI_DOCK_BOTTOM; return *this; }
- wxAuiPaneInfo& Center() { dock_direction = wxAUI_DOCK_CENTER; return *this; }
- wxAuiPaneInfo& Centre() { dock_direction = wxAUI_DOCK_CENTRE; return *this; }
- wxAuiPaneInfo& Direction(int direction) { dock_direction = direction; return *this; }
- wxAuiPaneInfo& Layer(int layer) { dock_layer = layer; return *this; }
- wxAuiPaneInfo& Row(int row) { dock_row = row; return *this; }
- wxAuiPaneInfo& Position(int pos) { dock_pos = pos; return *this; }
- wxAuiPaneInfo& BestSize(const wxSize& size) { best_size = size; return *this; }
- wxAuiPaneInfo& MinSize(const wxSize& size) { min_size = size; return *this; }
- wxAuiPaneInfo& MaxSize(const wxSize& size) { max_size = size; return *this; }
- wxAuiPaneInfo& BestSize(int x, int y) { best_size.Set(x,y); return *this; }
- wxAuiPaneInfo& MinSize(int x, int y) { min_size.Set(x,y); return *this; }
- wxAuiPaneInfo& MaxSize(int x, int y) { max_size.Set(x,y); return *this; }
- wxAuiPaneInfo& FloatingPosition(const wxPoint& pos) { floating_pos = pos; return *this; }
- wxAuiPaneInfo& FloatingPosition(int x, int y) { floating_pos.x = x; floating_pos.y = y; return *this; }
- wxAuiPaneInfo& FloatingSize(const wxSize& size) { floating_size = size; return *this; }
- wxAuiPaneInfo& FloatingSize(int x, int y) { floating_size.Set(x,y); return *this; }
- wxAuiPaneInfo& Fixed() { return SetFlag(optionResizable, false); }
- wxAuiPaneInfo& Resizable(bool resizable = true) { return SetFlag(optionResizable, resizable); }
- wxAuiPaneInfo& Dock() { return SetFlag(optionFloating, false); }
- wxAuiPaneInfo& Float() { return SetFlag(optionFloating, true); }
- wxAuiPaneInfo& Hide() { return SetFlag(optionHidden, true); }
- wxAuiPaneInfo& Show(bool show = true) { return SetFlag(optionHidden, !show); }
- wxAuiPaneInfo& CaptionVisible(bool visible = true) { return SetFlag(optionCaption, visible); }
- wxAuiPaneInfo& Maximize() { return SetFlag(optionMaximized, true); }
- wxAuiPaneInfo& Restore() { return SetFlag(optionMaximized, false); }
- wxAuiPaneInfo& PaneBorder(bool visible = true) { return SetFlag(optionPaneBorder, visible); }
- wxAuiPaneInfo& Gripper(bool visible = true) { return SetFlag(optionGripper, visible); }
- wxAuiPaneInfo& GripperTop(bool attop = true) { return SetFlag(optionGripperTop, attop); }
- wxAuiPaneInfo& CloseButton(bool visible = true) { return SetFlag(buttonClose, visible); }
- wxAuiPaneInfo& MaximizeButton(bool visible = true) { return SetFlag(buttonMaximize, visible); }
- wxAuiPaneInfo& MinimizeButton(bool visible = true) { return SetFlag(buttonMinimize, visible); }
- wxAuiPaneInfo& PinButton(bool visible = true) { return SetFlag(buttonPin, visible); }
- wxAuiPaneInfo& DestroyOnClose(bool b = true) { return SetFlag(optionDestroyOnClose, b); }
- wxAuiPaneInfo& TopDockable(bool b = true) { return SetFlag(optionTopDockable, b); }
- wxAuiPaneInfo& BottomDockable(bool b = true) { return SetFlag(optionBottomDockable, b); }
- wxAuiPaneInfo& LeftDockable(bool b = true) { return SetFlag(optionLeftDockable, b); }
- wxAuiPaneInfo& RightDockable(bool b = true) { return SetFlag(optionRightDockable, b); }
- wxAuiPaneInfo& Floatable(bool b = true) { return SetFlag(optionFloatable, b); }
- wxAuiPaneInfo& Movable(bool b = true) { return SetFlag(optionMovable, b); }
-#if wxABI_VERSION >= 20807
- wxAuiPaneInfo& DockFixed(bool b = true) { return SetFlag(optionDockFixed, b); }
-#endif
-
- wxAuiPaneInfo& Dockable(bool b = true)
- {
- return TopDockable(b).BottomDockable(b).LeftDockable(b).RightDockable(b);
- }
-
- wxAuiPaneInfo& DefaultPane()
- {
- state |= optionTopDockable | optionBottomDockable |
- optionLeftDockable | optionRightDockable |
- optionFloatable | optionMovable | optionResizable |
- optionCaption | optionPaneBorder | buttonClose;
- return *this;
- }
-
- wxAuiPaneInfo& CentrePane() { return CenterPane(); }
- wxAuiPaneInfo& CenterPane()
- {
- state = 0;
- return Center().PaneBorder().Resizable();
- }
-
- wxAuiPaneInfo& ToolbarPane()
- {
- DefaultPane();
- state |= (optionToolbar | optionGripper);
- state &= ~(optionResizable | optionCaption);
- if (dock_layer == 0)
- dock_layer = 10;
- return *this;
- }
-
- wxAuiPaneInfo& SetFlag(unsigned int flag, bool option_state)
- {
- if (option_state)
- state |= flag;
- else
- state &= ~flag;
- return *this;
- }
-
- bool HasFlag(unsigned int flag) const
- {
- return (state & flag) ? true:false;
- }
-
-#ifdef SWIG
- %typemap(out) wxAuiPaneInfo& ;
-#endif
-
-public:
-
- // NOTE: You can add and subtract flags from this list,
- // but do not change the values of the flags, because
- // they are stored in a binary integer format in the
- // perspective string. If you really need to change the
- // values around, you'll have to ensure backwards-compatibility
- // in the perspective loading code.
- enum wxAuiPaneState
- {
- optionFloating = 1 << 0,
- optionHidden = 1 << 1,
- optionLeftDockable = 1 << 2,
- optionRightDockable = 1 << 3,
- optionTopDockable = 1 << 4,
- optionBottomDockable = 1 << 5,
- optionFloatable = 1 << 6,
- optionMovable = 1 << 7,
- optionResizable = 1 << 8,
- optionPaneBorder = 1 << 9,
- optionCaption = 1 << 10,
- optionGripper = 1 << 11,
- optionDestroyOnClose = 1 << 12,
- optionToolbar = 1 << 13,
- optionActive = 1 << 14,
- optionGripperTop = 1 << 15,
- optionMaximized = 1 << 16,
- optionDockFixed = 1 << 17,
-
- buttonClose = 1 << 21,
- buttonMaximize = 1 << 22,
- buttonMinimize = 1 << 23,
- buttonPin = 1 << 24,
-
- buttonCustom1 = 1 << 26,
- buttonCustom2 = 1 << 27,
- buttonCustom3 = 1 << 28,
-
- savedHiddenState = 1 << 30, // used internally
- actionPane = 1 << 31 // used internally
- };
-
-public:
- wxString name; // name of the pane
- wxString caption; // caption displayed on the window
-
- wxWindow* window; // window that is in this pane
- wxFrame* frame; // floating frame window that holds the pane
- unsigned int state; // a combination of wxPaneState values
-
- int dock_direction; // dock direction (top, bottom, left, right, center)
- int dock_layer; // layer number (0 = innermost layer)
- int dock_row; // row number on the docking bar (0 = first row)
- int dock_pos; // position inside the row (0 = first position)
-
- wxSize best_size; // size that the layout engine will prefer
- wxSize min_size; // minimum size the pane window can tolerate
- wxSize max_size; // maximum size the pane window can tolerate
-
- wxPoint floating_pos; // position while floating
- wxSize floating_size; // size while floating
- int dock_proportion; // proportion while docked
-
- wxAuiPaneButtonArray buttons; // buttons on the pane
-
- wxRect rect; // current rectangle (populated by wxAUI)
-};
-
-
-
-class WXDLLIMPEXP_FWD_AUI wxAuiFloatingFrame;
-
-class WXDLLIMPEXP_AUI wxAuiManager : public wxEvtHandler
-{
-friend class wxAuiFloatingFrame;
-
-public:
-
- wxAuiManager(wxWindow* managed_wnd = NULL,
- unsigned int flags = wxAUI_MGR_DEFAULT);
- virtual ~wxAuiManager();
- void UnInit();
-
- void SetFlags(unsigned int flags);
- unsigned int GetFlags() const;
-
- void SetManagedWindow(wxWindow* managed_wnd);
- wxWindow* GetManagedWindow() const;
-
- static wxAuiManager* GetManager(wxWindow* window);
-
- void SetArtProvider(wxAuiDockArt* art_provider);
- wxAuiDockArt* GetArtProvider() const;
-
- wxAuiPaneInfo& GetPane(wxWindow* window);
- wxAuiPaneInfo& GetPane(const wxString& name);
- wxAuiPaneInfoArray& GetAllPanes();
-
- bool AddPane(wxWindow* window,
- const wxAuiPaneInfo& pane_info);
-
- bool AddPane(wxWindow* window,
- const wxAuiPaneInfo& pane_info,
- const wxPoint& drop_pos);
-
- bool AddPane(wxWindow* window,
- int direction = wxLEFT,
- const wxString& caption = wxEmptyString);
-
- bool InsertPane(wxWindow* window,
- const wxAuiPaneInfo& insert_location,
- int insert_level = wxAUI_INSERT_PANE);
-
- bool DetachPane(wxWindow* window);
-
- void Update();
-
- wxString SavePaneInfo(wxAuiPaneInfo& pane);
- void LoadPaneInfo(wxString pane_part, wxAuiPaneInfo &pane);
- wxString SavePerspective();
- bool LoadPerspective(const wxString& perspective, bool update = true);
-
- void SetDockSizeConstraint(double width_pct, double height_pct);
- void GetDockSizeConstraint(double* width_pct, double* height_pct) const;
-
- void ClosePane(wxAuiPaneInfo& pane_info);
- void MaximizePane(wxAuiPaneInfo& pane_info);
- void RestorePane(wxAuiPaneInfo& pane_info);
- void RestoreMaximizedPane();
-
-public:
-
- virtual wxAuiFloatingFrame* CreateFloatingFrame(wxWindow* parent, const wxAuiPaneInfo& p);
-
- void StartPaneDrag(
- wxWindow* pane_window,
- const wxPoint& offset);
-
- wxRect CalculateHintRect(
- wxWindow* pane_window,
- const wxPoint& pt,
- const wxPoint& offset);
-
- void DrawHintRect(
- wxWindow* pane_window,
- const wxPoint& pt,
- const wxPoint& offset);
-
- virtual void ShowHint(const wxRect& rect);
- virtual void HideHint();
-
-public:
-
- // deprecated -- please use SetManagedWindow() and
- // and GetManagedWindow() instead
-
- wxDEPRECATED( void SetFrame(wxFrame* frame) );
- wxDEPRECATED( wxFrame* GetFrame() const );
-
-protected:
-
- void UpdateHintWindowConfig();
-
- void DoFrameLayout();
-
- void LayoutAddPane(wxSizer* container,
- wxAuiDockInfo& dock,
- wxAuiPaneInfo& pane,
- wxAuiDockUIPartArray& uiparts,
- bool spacer_only);
-
- void LayoutAddDock(wxSizer* container,
- wxAuiDockInfo& dock,
- wxAuiDockUIPartArray& uiparts,
- bool spacer_only);
-
- wxSizer* LayoutAll(wxAuiPaneInfoArray& panes,
- wxAuiDockInfoArray& docks,
- wxAuiDockUIPartArray& uiparts,
- bool spacer_only = false);
-
- virtual bool ProcessDockResult(wxAuiPaneInfo& target,
- const wxAuiPaneInfo& new_pos);
-
- bool DoDrop(wxAuiDockInfoArray& docks,
- wxAuiPaneInfoArray& panes,
- wxAuiPaneInfo& drop,
- const wxPoint& pt,
- const wxPoint& action_offset = wxPoint(0,0));
-
- wxAuiDockUIPart* HitTest(int x, int y);
- wxAuiDockUIPart* GetPanePart(wxWindow* pane);
- int GetDockPixelOffset(wxAuiPaneInfo& test);
- void OnFloatingPaneMoveStart(wxWindow* window);
- void OnFloatingPaneMoving(wxWindow* window, wxDirection dir );
- void OnFloatingPaneMoved(wxWindow* window, wxDirection dir);
- void OnFloatingPaneActivated(wxWindow* window);
- void OnFloatingPaneClosed(wxWindow* window, wxCloseEvent& evt);
- void OnFloatingPaneResized(wxWindow* window, const wxSize& size);
- void Render(wxDC* dc);
- void Repaint(wxDC* dc = NULL);
- void ProcessMgrEvent(wxAuiManagerEvent& event);
- void UpdateButtonOnScreen(wxAuiDockUIPart* button_ui_part,
- const wxMouseEvent& event);
- void GetPanePositionsAndSizes(wxAuiDockInfo& dock,
- wxArrayInt& positions,
- wxArrayInt& sizes);
-
-#if wxABI_VERSION >= 20810
- /// Ends a resize action, or for live update, resizes the sash
- bool DoEndResizeAction(wxMouseEvent& event);
-#endif
-
-public:
-
- // public events (which can be invoked externally)
- void OnRender(wxAuiManagerEvent& evt);
- void OnPaneButton(wxAuiManagerEvent& evt);
-
-protected:
-
- // protected events
- void OnPaint(wxPaintEvent& evt);
- void OnEraseBackground(wxEraseEvent& evt);
- void OnSize(wxSizeEvent& evt);
- void OnSetCursor(wxSetCursorEvent& evt);
- void OnLeftDown(wxMouseEvent& evt);
- void OnLeftUp(wxMouseEvent& evt);
- void OnMotion(wxMouseEvent& evt);
- void OnLeaveWindow(wxMouseEvent& evt);
- void OnChildFocus(wxChildFocusEvent& evt);
- void OnHintFadeTimer(wxTimerEvent& evt);
- void OnFindManager(wxAuiManagerEvent& evt);
-
-protected:
-
- enum
- {
- actionNone = 0,
- actionResize,
- actionClickButton,
- actionClickCaption,
- actionDragToolbarPane,
- actionDragFloatingPane
- };
-
-protected:
-
- wxWindow* m_frame; // the window being managed
- wxAuiDockArt* m_art; // dock art object which does all drawing
- unsigned int m_flags; // manager flags wxAUI_MGR_*
-
- wxAuiPaneInfoArray m_panes; // array of panes structures
- wxAuiDockInfoArray m_docks; // array of docks structures
- wxAuiDockUIPartArray m_uiparts; // array of UI parts (captions, buttons, etc)
-
- int m_action; // current mouse action
- wxPoint m_action_start; // position where the action click started
- wxPoint m_action_offset; // offset from upper left of the item clicked
- wxAuiDockUIPart* m_action_part; // ptr to the part the action happened to
- wxWindow* m_action_window; // action frame or window (NULL if none)
- wxRect m_action_hintrect; // hint rectangle for the action
- wxRect m_last_rect;
- wxAuiDockUIPart* m_hover_button;// button uipart being hovered over
- wxRect m_last_hint; // last hint rectangle
- wxPoint m_last_mouse_move; // last mouse move position (see OnMotion)
- bool m_skipping;
- bool m_has_maximized;
-
- double m_dock_constraint_x; // 0.0 .. 1.0; max pct of window width a dock can consume
- double m_dock_constraint_y; // 0.0 .. 1.0; max pct of window height a dock can consume
-
- wxFrame* m_hint_wnd; // transparent hint window, if supported by platform
- wxTimer m_hint_fadetimer; // transparent fade timer
- wxByte m_hint_fadeamt; // transparent fade amount
- wxByte m_hint_fademax; // maximum value of hint fade
-
- void* m_reserved;
-
-#ifndef SWIG
- DECLARE_EVENT_TABLE()
- DECLARE_CLASS(wxAuiManager)
-#endif // SWIG
-};
-
-
-
-// event declarations/classes
-
-class WXDLLIMPEXP_AUI wxAuiManagerEvent : public wxEvent
-{
-public:
- wxAuiManagerEvent(wxEventType type=wxEVT_NULL) : wxEvent(0, type)
- {
- manager = NULL;
- pane = NULL;
- button = 0;
- veto_flag = false;
- canveto_flag = true;
- dc = NULL;
- }
-#ifndef SWIG
- wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c)
- {
- manager = c.manager;
- pane = c.pane;
- button = c.button;
- veto_flag = c.veto_flag;
- canveto_flag = c.canveto_flag;
- dc = c.dc;
- }
-#endif
- wxEvent *Clone() const { return new wxAuiManagerEvent(*this); }
-
- void SetManager(wxAuiManager* mgr) { manager = mgr; }
- void SetPane(wxAuiPaneInfo* p) { pane = p; }
- void SetButton(int b) { button = b; }
- void SetDC(wxDC* pdc) { dc = pdc; }
-
- wxAuiManager* GetManager() const { return manager; }
- wxAuiPaneInfo* GetPane() const { return pane; }
- int GetButton() const { return button; }
- wxDC* GetDC() const { return dc; }
-
- void Veto(bool veto = true) { veto_flag = veto; }
- bool GetVeto() const { return veto_flag; }
- void SetCanVeto(bool can_veto) { canveto_flag = can_veto; }
- bool CanVeto() const { return canveto_flag && veto_flag; }
-
-public:
- wxAuiManager* manager;
- wxAuiPaneInfo* pane;
- int button;
- bool veto_flag;
- bool canveto_flag;
- wxDC* dc;
-
-#ifndef SWIG
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxAuiManagerEvent)
-#endif
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiDockInfo
-{
-public:
- wxAuiDockInfo()
- {
- dock_direction = 0;
- dock_layer = 0;
- dock_row = 0;
- size = 0;
- min_size = 0;
- resizable = true;
- fixed = false;
- toolbar = false;
- reserved1 = false;
- }
-
-#ifndef SWIG
- wxAuiDockInfo(const wxAuiDockInfo& c)
- {
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- size = c.size;
- min_size = c.min_size;
- resizable = c.resizable;
- fixed = c.fixed;
- toolbar = c.toolbar;
- panes = c.panes;
- rect = c.rect;
- reserved1 = c.reserved1;
- }
-
- wxAuiDockInfo& operator=(const wxAuiDockInfo& c)
- {
- dock_direction = c.dock_direction;
- dock_layer = c.dock_layer;
- dock_row = c.dock_row;
- size = c.size;
- min_size = c.min_size;
- resizable = c.resizable;
- fixed = c.fixed;
- toolbar = c.toolbar;
- panes = c.panes;
- rect = c.rect;
- reserved1 = c.reserved1;
- return *this;
- }
-#endif // SWIG
-
- bool IsOk() const { return (dock_direction != 0) ? true : false; }
- bool IsHorizontal() const { return (dock_direction == wxAUI_DOCK_TOP ||
- dock_direction == wxAUI_DOCK_BOTTOM) ? true:false; }
- bool IsVertical() const { return (dock_direction == wxAUI_DOCK_LEFT ||
- dock_direction == wxAUI_DOCK_RIGHT ||
- dock_direction == wxAUI_DOCK_CENTER) ? true:false; }
-public:
- wxAuiPaneInfoPtrArray panes; // array of panes
- wxRect rect; // current rectangle
- int dock_direction; // dock direction (top, bottom, left, right, center)
- int dock_layer; // layer number (0 = innermost layer)
- int dock_row; // row number on the docking bar (0 = first row)
- int size; // size of the dock
- int min_size; // minimum size of a dock (0 if there is no min)
- bool resizable; // flag indicating whether the dock is resizable
- bool toolbar; // flag indicating dock contains only toolbars
- bool fixed; // flag indicating that the dock operates on
- // absolute coordinates as opposed to proportional
- bool reserved1;
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiDockUIPart
-{
-public:
- enum
- {
- typeCaption,
- typeGripper,
- typeDock,
- typeDockSizer,
- typePane,
- typePaneSizer,
- typeBackground,
- typePaneBorder,
- typePaneButton
- };
-
- int type; // ui part type (see enum above)
- int orientation; // orientation (either wxHORIZONTAL or wxVERTICAL)
- wxAuiDockInfo* dock; // which dock the item is associated with
- wxAuiPaneInfo* pane; // which pane the item is associated with
- wxAuiPaneButton* button; // which pane button the item is associated with
- wxSizer* cont_sizer; // the part's containing sizer
- wxSizerItem* sizer_item; // the sizer item of the part
- wxRect rect; // client coord rectangle of the part itself
-};
-
-
-class WXDLLIMPEXP_AUI wxAuiPaneButton
-{
-public:
- int button_id; // id of the button (e.g. buttonClose)
-};
-
-
-
-#ifndef SWIG
-// wx event machinery
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_BUTTON, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_CLOSE, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_MAXIMIZE, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_PANE_RESTORE, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_RENDER, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_AUI, wxEVT_AUI_FIND_MANAGER, 0)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxAuiManagerEventFunction)(wxAuiManagerEvent&);
-
-#define wxAuiManagerEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxAuiManagerEventFunction, &func)
-
-#define EVT_AUI_PANE_BUTTON(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANE_BUTTON, wxAuiManagerEventHandler(func))
-#define EVT_AUI_PANE_CLOSE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(func))
-#define EVT_AUI_PANE_MAXIMIZE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANE_MAXIMIZE, wxAuiManagerEventHandler(func))
-#define EVT_AUI_PANE_RESTORE(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_PANE_RESTORE, wxAuiManagerEventHandler(func))
-#define EVT_AUI_RENDER(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_RENDER, wxAuiManagerEventHandler(func))
-#define EVT_AUI_FIND_MANAGER(func) \
- wx__DECLARE_EVT0(wxEVT_AUI_FIND_MANAGER, wxAuiManagerEventHandler(func))
-
-#else
-
-%constant wxEventType wxEVT_AUI_PANE_BUTTON;
-%constant wxEventType wxEVT_AUI_PANE_CLOSE;
-%constant wxEventType wxEVT_AUI_PANE_MAXIMIZE;
-%constant wxEventType wxEVT_AUI_PANE_RESTORE;
-%constant wxEventType wxEVT_AUI_RENDER;
-%constant wxEventType wxEVT_AUI_FIND_MANAGER;
-
-%pythoncode {
- EVT_AUI_PANE_BUTTON = wx.PyEventBinder( wxEVT_AUI_PANE_BUTTON )
- EVT_AUI_PANE_CLOSE = wx.PyEventBinder( wxEVT_AUI_PANE_CLOSE )
- EVT_AUI_PANE_MAXIMIZE = wx.PyEventBinder( wxEVT_AUI_PANE_MAXIMIZE )
- EVT_AUI_PANE_RESTORE = wx.PyEventBinder( wxEVT_AUI_PANE_RESTORE )
- EVT_AUI_RENDER = wx.PyEventBinder( wxEVT_AUI_RENDER )
- EVT_AUI_FIND_MANAGER = wx.PyEventBinder( wxEVT_AUI_FIND_MANAGER )
-}
-#endif // SWIG
-
-#endif // wxUSE_AUI
-#endif //_WX_FRAMEMANAGER_H_
-
diff --git a/desmume/src/windows/wx/include/wx/aui/tabmdi.h b/desmume/src/windows/wx/include/wx/aui/tabmdi.h
deleted file mode 100644
index 6fa7ac095..000000000
--- a/desmume/src/windows/wx/include/wx/aui/tabmdi.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/generic/tabmdi.h
-// Purpose: Generic MDI (Multiple Document Interface) classes
-// Author: Hans Van Leemputten
-// Modified by: Benjamin I. Williams / Kirix Corporation
-// Created: 29/07/2002
-// RCS-ID: $Id: tabmdi.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) Hans Van Leemputten
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_AUITABMDI_H_
-#define _WX_AUITABMDI_H_
-
-#if wxUSE_AUI
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/frame.h"
-#include "wx/panel.h"
-#include "wx/notebook.h"
-#include "wx/icon.h"
-#include "wx/aui/auibook.h"
-
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_AUI wxAuiMDIParentFrame;
-class WXDLLIMPEXP_FWD_AUI wxAuiMDIClientWindow;
-class WXDLLIMPEXP_FWD_AUI wxAuiMDIChildFrame;
-
-//-----------------------------------------------------------------------------
-// wxAuiMDIParentFrame
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_AUI wxAuiMDIParentFrame : public wxFrame
-{
-public:
- wxAuiMDIParentFrame();
- wxAuiMDIParentFrame(wxWindow *parent,
- wxWindowID winid,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
- const wxString& name = wxFrameNameStr);
-
- ~wxAuiMDIParentFrame();
-
- bool Create(wxWindow *parent,
- wxWindowID winid,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
- const wxString& name = wxFrameNameStr );
-
- void SetArtProvider(wxAuiTabArt* provider);
- wxAuiTabArt* GetArtProvider();
- wxAuiNotebook* GetNotebook() const;
-
-#if wxUSE_MENUS
- wxMenu* GetWindowMenu() const { return m_pWindowMenu; }
- void SetWindowMenu(wxMenu* pMenu);
-
- virtual void SetMenuBar(wxMenuBar *pMenuBar);
-#endif // wxUSE_MENUS
-
- void SetChildMenuBar(wxAuiMDIChildFrame *pChild);
-
- virtual bool ProcessEvent(wxEvent& event);
-
- wxAuiMDIChildFrame *GetActiveChild() const;
- void SetActiveChild(wxAuiMDIChildFrame* pChildFrame);
-
- wxAuiMDIClientWindow *GetClientWindow() const;
- virtual wxAuiMDIClientWindow *OnCreateClient();
-
- virtual void Cascade() { /* Has no effect */ }
- virtual void Tile(wxOrientation orient = wxHORIZONTAL);
- virtual void ArrangeIcons() { /* Has no effect */ }
- virtual void ActivateNext();
- virtual void ActivatePrevious();
-
-protected:
- wxAuiMDIClientWindow* m_pClientWindow;
- wxAuiMDIChildFrame* m_pActiveChild;
- wxEvent* m_pLastEvt;
-
-#if wxUSE_MENUS
- wxMenu *m_pWindowMenu;
- wxMenuBar *m_pMyMenuBar;
-#endif // wxUSE_MENUS
-
-protected:
- void Init();
-
-#if wxUSE_MENUS
- void RemoveWindowMenu(wxMenuBar *pMenuBar);
- void AddWindowMenu(wxMenuBar *pMenuBar);
-
- void DoHandleMenu(wxCommandEvent &event);
-#endif // wxUSE_MENUS
-
- virtual void DoGetClientSize(int *width, int *height) const;
-
-private:
- DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS(wxAuiMDIParentFrame)
-};
-
-//-----------------------------------------------------------------------------
-// wxAuiMDIChildFrame
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_AUI wxAuiMDIChildFrame : public wxPanel
-{
-public:
- wxAuiMDIChildFrame();
- wxAuiMDIChildFrame(wxAuiMDIParentFrame *parent,
- wxWindowID winid,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
-
- virtual ~wxAuiMDIChildFrame();
- bool Create(wxAuiMDIParentFrame *parent,
- wxWindowID winid,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
-
-#if wxUSE_MENUS
- virtual void SetMenuBar(wxMenuBar *menu_bar);
- virtual wxMenuBar *GetMenuBar() const;
-#endif // wxUSE_MENUS
-
- virtual void SetTitle(const wxString& title);
- virtual wxString GetTitle() const;
-
- virtual void SetIcons(const wxIconBundle& icons);
- virtual const wxIconBundle& GetIcons() const;
-
- virtual void SetIcon(const wxIcon& icon);
- virtual const wxIcon& GetIcon() const;
-
- virtual void Activate();
- virtual bool Destroy();
-
-#if wxUSE_STATUSBAR
- // no status bars
- virtual wxStatusBar* CreateStatusBar(int WXUNUSED(number) = 1,
- long WXUNUSED(style) = 1,
- wxWindowID WXUNUSED(winid) = 1,
- const wxString& WXUNUSED(name) = wxEmptyString)
- { return (wxStatusBar*)NULL; }
-
- virtual wxStatusBar *GetStatusBar() const { return (wxStatusBar*)NULL; }
- virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number)=0 ) {}
- virtual void SetStatusWidths( int WXUNUSED(n), const int WXUNUSED(widths_field)[] ) {}
-#endif
-
- // no size hints
- virtual void DoSetSizeHints(int WXUNUSED(minW),
- int WXUNUSED(minH),
- int WXUNUSED(maxW) = wxDefaultCoord,
- int WXUNUSED(maxH) = wxDefaultCoord,
- int WXUNUSED(incW) = wxDefaultCoord,
- int WXUNUSED(incH) = wxDefaultCoord) {}
-#if wxUSE_TOOLBAR
- // no toolbar bars
- virtual wxToolBar* CreateToolBar(long WXUNUSED(style),
- wxWindowID WXUNUSED(winid),
- const wxString& WXUNUSED(name))
- { return (wxToolBar*)NULL; }
- virtual wxToolBar *GetToolBar() const { return (wxToolBar*)NULL; }
-#endif
-
-
- // no maximize etc
- virtual void Maximize(bool WXUNUSED(maximize) = true) { /* Has no effect */ }
- virtual void Restore() { /* Has no effect */ }
- virtual void Iconize(bool WXUNUSED(iconize) = true) { /* Has no effect */ }
- virtual bool IsMaximized() const { return true; }
- virtual bool IsIconized() const { return false; }
- virtual bool ShowFullScreen(bool WXUNUSED(show), long WXUNUSED(style)) { return false; }
- virtual bool IsFullScreen() const { return false; }
-
- virtual bool IsTopLevel() const { return false; }
-
- void OnMenuHighlight(wxMenuEvent& evt);
- void OnActivate(wxActivateEvent& evt);
- void OnCloseWindow(wxCloseEvent& evt);
-
- void SetMDIParentFrame(wxAuiMDIParentFrame* parent);
- wxAuiMDIParentFrame* GetMDIParentFrame() const;
-
-protected:
- void Init();
- virtual bool Show(bool show = true);
- virtual void DoSetSize(int x, int y, int width, int height, int size_flags);
- virtual void DoMoveWindow(int x, int y, int width, int height);
-
-public:
- // This function needs to be called when a size change is confirmed,
- // we needed this function to prevent anybody from the outside
- // changing the panel... it messes the UI layout when we would allow it.
- void ApplyMDIChildFrameRect();
- void DoShow(bool show);
-
-protected:
- wxAuiMDIParentFrame* m_pMDIParentFrame;
- wxRect m_mdi_newrect;
- wxRect m_mdi_currect;
- wxString m_title;
- wxIcon m_icon;
- wxIconBundle m_icon_bundle;
- bool m_activate_on_create;
-
-#if wxUSE_MENUS
- wxMenuBar* m_pMenuBar;
-#endif // wxUSE_MENUS
-
-
-
-private:
- DECLARE_DYNAMIC_CLASS(wxAuiMDIChildFrame)
- DECLARE_EVENT_TABLE()
-
- friend class wxAuiMDIClientWindow;
-};
-
-//-----------------------------------------------------------------------------
-// wxAuiMDIClientWindow
-//-----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_AUI wxAuiMDIClientWindow : public wxAuiNotebook
-{
-public:
- wxAuiMDIClientWindow();
- wxAuiMDIClientWindow(wxAuiMDIParentFrame *parent, long style = 0);
- ~wxAuiMDIClientWindow();
-
- virtual bool CreateClient(wxAuiMDIParentFrame *parent,
- long style = wxVSCROLL | wxHSCROLL);
-
- virtual int SetSelection(size_t page);
-
-protected:
-
- void PageChanged(int old_selection, int new_selection);
- void OnPageClose(wxAuiNotebookEvent& evt);
- void OnPageChanged(wxAuiNotebookEvent& evt);
- void OnSize(wxSizeEvent& evt);
-
-private:
- DECLARE_DYNAMIC_CLASS(wxAuiMDIClientWindow)
- DECLARE_EVENT_TABLE()
-};
-#endif // wxUSE_AUI
-
-#endif // _WX_AUITABMDI_H_
diff --git a/desmume/src/windows/wx/include/wx/beforestd.h b/desmume/src/windows/wx/include/wx/beforestd.h
deleted file mode 100644
index aacfc7c41..000000000
--- a/desmume/src/windows/wx/include/wx/beforestd.h
+++ /dev/null
@@ -1,65 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/beforestd.h
-// Purpose: #include before STL headers
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 07/07/03
-// RCS-ID: $Id: beforestd.h 42906 2006-11-01 14:16:42Z VZ $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-/**
- Unfortunately, when compiling at maximum warning level, the standard
- headers themselves may generate warnings -- and really lots of them. So
- before including them, this header should be included to temporarily
- suppress the warnings and after this the header afterstd.h should be
- included to enable them back again.
-
- Note that there are intentionally no inclusion guards in this file, because
- it can be included several times.
- */
-
-// VC 7.x isn't as bad as VC6 and doesn't give these warnings but eVC (which
-// defines _MSC_VER as 1201) does need to be included as it's VC6-like
-#if defined(__VISUALC__) && __VISUALC__ <= 1201
- // MSVC 5 does not have this
- #if __VISUALC__ > 1100
- // we have to disable (and reenable in afterstd.h) this one because,
- // even though it is of level 4, it is not disabled by warning(push, 1)
- // below for VC7.1!
-
- // unreachable code
- #pragma warning(disable:4702)
-
- #pragma warning(push, 1)
- #else // VC 5
- // 'expression' : signed/unsigned mismatch
- #pragma warning(disable:4018)
-
- // 'identifier' : unreferenced formal parameter
- #pragma warning(disable:4100)
-
- // 'conversion' : conversion from 'type1' to 'type2',
- // possible loss of data
- #pragma warning(disable:4244)
-
- // C++ language change: to explicitly specialize class template
- // 'identifier' use the following syntax
- #pragma warning(disable:4663)
- #endif
-
- // these warning have to be disabled and not just temporarily disabled
- // because they will be given at the end of the compilation of the
- // current source and there is absolutely nothing we can do about them
-
- // 'foo': unreferenced inline function has been removed
- #pragma warning(disable:4514)
-
- // 'function' : function not inlined
- #pragma warning(disable:4710)
-
- // 'id': identifier was truncated to 'num' characters in the debug info
- #pragma warning(disable:4786)
-#endif // VC++ < 7
-
diff --git a/desmume/src/windows/wx/include/wx/bitmap.h b/desmume/src/windows/wx/include/wx/bitmap.h
deleted file mode 100644
index 92d456478..000000000
--- a/desmume/src/windows/wx/include/wx/bitmap.h
+++ /dev/null
@@ -1,241 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/bitmap.h
-// Purpose: wxBitmap class interface
-// Author: Vaclav Slavik
-// Modified by:
-// Created: 22.04.01
-// RCS-ID: $Id: bitmap.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BITMAP_H_BASE_
-#define _WX_BITMAP_H_BASE_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/string.h"
-#include "wx/gdicmn.h" // for wxBitmapType
-#include "wx/colour.h"
-
-class WXDLLIMPEXP_FWD_CORE wxBitmap;
-class WXDLLIMPEXP_FWD_CORE wxBitmapHandler;
-class WXDLLIMPEXP_FWD_CORE wxIcon;
-class WXDLLIMPEXP_FWD_CORE wxImage;
-class WXDLLIMPEXP_FWD_CORE wxMask;
-class WXDLLIMPEXP_FWD_CORE wxPalette;
-
-// ----------------------------------------------------------------------------
-// wxVariant support
-// ----------------------------------------------------------------------------
-
-#if wxUSE_VARIANT
-#include "wx/variant.h"
-DECLARE_VARIANT_OBJECT_EXPORTED(wxBitmap,WXDLLEXPORT)
-#endif
-
-// ----------------------------------------------------------------------------
-// wxMask represents the transparent area of the bitmap
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxMaskBase : public wxObject
-{
-public:
- // create the mask from bitmap pixels of the given colour
- bool Create(const wxBitmap& bitmap, const wxColour& colour);
-
-#if wxUSE_PALETTE
- // create the mask from bitmap pixels with the given palette index
- bool Create(const wxBitmap& bitmap, int paletteIndex);
-#endif // wxUSE_PALETTE
-
- // create the mask from the given mono bitmap
- bool Create(const wxBitmap& bitmap);
-
-protected:
- // this function is called from Create() to free the existing mask data
- virtual void FreeData() = 0;
-
- // these functions must be overridden to implement the corresponding public
- // Create() methods, they shouldn't call FreeData() as it's already called
- // by the public wrappers
- virtual bool InitFromColour(const wxBitmap& bitmap,
- const wxColour& colour) = 0;
- virtual bool InitFromMonoBitmap(const wxBitmap& bitmap) = 0;
-};
-
-#if defined(__WXMGL__) || \
- defined(__WXDFB__) || \
- defined(__WXMAC__) || \
- defined(__WXGTK__) || \
- defined(__WXCOCOA__) || \
- defined(__WXMOTIF__) || \
- defined(__WXX11__)
- #define wxUSE_BITMAP_BASE 1
-#else
- #define wxUSE_BITMAP_BASE 0
-#endif
-
-// Only used by some ports
-// FIXME -- make all ports (but MSW which uses wxGDIImage) use these base classes
-#if wxUSE_BITMAP_BASE
-
-// ----------------------------------------------------------------------------
-// wxBitmapHandler: class which knows how to create/load/save bitmaps in
-// different formats
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxBitmapHandlerBase : public wxObject
-{
-public:
- wxBitmapHandlerBase() { m_type = wxBITMAP_TYPE_INVALID; }
- virtual ~wxBitmapHandlerBase() { }
-
- virtual bool Create(wxBitmap *bitmap, const void* data, long flags,
- int width, int height, int depth = 1);
- virtual bool LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight);
- virtual bool SaveFile(const wxBitmap *bitmap, const wxString& name,
- int type, const wxPalette *palette = NULL);
-
- void SetName(const wxString& name) { m_name = name; }
- void SetExtension(const wxString& ext) { m_extension = ext; }
- void SetType(wxBitmapType type) { m_type = type; }
- const wxString& GetName() const { return m_name; }
- const wxString& GetExtension() const { return m_extension; }
- wxBitmapType GetType() const { return m_type; }
-
-private:
- wxString m_name;
- wxString m_extension;
- wxBitmapType m_type;
-
- DECLARE_ABSTRACT_CLASS(wxBitmapHandlerBase)
-};
-
-class WXDLLEXPORT wxBitmapBase : public wxGDIObject
-{
-public:
- /*
- Derived class must implement these:
-
- wxBitmap();
- wxBitmap(int width, int height, int depth = -1);
- wxBitmap(const char bits[], int width, int height, int depth = 1);
- wxBitmap(const char* const* bits);
- wxBitmap(const wxString &filename, wxBitmapType type = wxBITMAP_TYPE_XPM);
- wxBitmap(const wxImage& image, int depth = -1);
-
- bool Create(int width, int height, int depth = -1);
-
- static void InitStandardHandlers();
- */
-
- virtual bool Ok() const { return IsOk(); }
- virtual bool IsOk() const = 0;
-
- virtual int GetHeight() const = 0;
- virtual int GetWidth() const = 0;
- virtual int GetDepth() const = 0;
-
- virtual wxImage ConvertToImage() const = 0;
-
- virtual wxMask *GetMask() const = 0;
- virtual void SetMask(wxMask *mask) = 0;
-
- virtual wxBitmap GetSubBitmap(const wxRect& rect) const = 0;
-
- virtual bool SaveFile(const wxString &name, wxBitmapType type,
- const wxPalette *palette = (wxPalette *)NULL) const = 0;
- virtual bool LoadFile(const wxString &name, wxBitmapType type) = 0;
-
- /*
- If raw bitmap access is supported (see wx/rawbmp.h), the following
- methods should be implemented:
-
- virtual bool GetRawData(wxRawBitmapData *data) = 0;
- virtual void UngetRawData(wxRawBitmapData *data) = 0;
- */
-
-#if wxUSE_PALETTE
- virtual wxPalette *GetPalette() const = 0;
- virtual void SetPalette(const wxPalette& palette) = 0;
-#endif // wxUSE_PALETTE
-
- // copies the contents and mask of the given (colour) icon to the bitmap
- virtual bool CopyFromIcon(const wxIcon& icon) = 0;
-
- // implementation:
- virtual void SetHeight(int height) = 0;
- virtual void SetWidth(int width) = 0;
- virtual void SetDepth(int depth) = 0;
-
- // Format handling
- static inline wxList& GetHandlers() { return sm_handlers; }
- static void AddHandler(wxBitmapHandlerBase *handler);
- static void InsertHandler(wxBitmapHandlerBase *handler);
- static bool RemoveHandler(const wxString& name);
- static wxBitmapHandler *FindHandler(const wxString& name);
- static wxBitmapHandler *FindHandler(const wxString& extension, wxBitmapType bitmapType);
- static wxBitmapHandler *FindHandler(wxBitmapType bitmapType);
-
- //static void InitStandardHandlers();
- // (wxBitmap must implement this one)
-
- static void CleanUpHandlers();
-
- // this method is only used by the generic implementation of wxMask
- // currently but could be useful elsewhere in the future: it can be
- // overridden to quantize the colour to correspond to bitmap colour depth
- // if necessary; default implementation simply returns the colour as is
- virtual wxColour QuantizeColour(const wxColour& colour) const
- {
- return colour;
- }
-
-protected:
- static wxList sm_handlers;
-
- DECLARE_ABSTRACT_CLASS(wxBitmapBase)
-};
-
-#endif // wxUSE_BITMAP_BASE
-
-#if defined(__WXPALMOS__)
- #include "wx/palmos/bitmap.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/bitmap.h"
-#elif defined(__WXMOTIF__)
- #include "wx/x11/bitmap.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/bitmap.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/bitmap.h"
-#elif defined(__WXX11__)
- #include "wx/x11/bitmap.h"
-#elif defined(__WXMGL__)
- #include "wx/mgl/bitmap.h"
-#elif defined(__WXDFB__)
- #include "wx/dfb/bitmap.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/bitmap.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/bitmap.h"
-#elif defined(__WXPM__)
- #include "wx/os2/bitmap.h"
-#endif
-
-// we must include generic mask.h after wxBitmap definition
-#if defined(__WXMGL__) || defined(__WXDFB__)
- #define wxUSE_GENERIC_MASK 1
-#else
- #define wxUSE_GENERIC_MASK 0
-#endif
-
-#if wxUSE_GENERIC_MASK
- #include "wx/generic/mask.h"
-#endif
-
-#endif // _WX_BITMAP_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/bmpbuttn.h b/desmume/src/windows/wx/include/wx/bmpbuttn.h
deleted file mode 100644
index c37d2cd7c..000000000
--- a/desmume/src/windows/wx/include/wx/bmpbuttn.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/bmpbutton.h
-// Purpose: wxBitmapButton class interface
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 25.08.00
-// RCS-ID: $Id: bmpbuttn.h 45498 2007-04-16 13:03:05Z VZ $
-// Copyright: (c) 2000 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BMPBUTTON_H_BASE_
-#define _WX_BMPBUTTON_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_BMPBUTTON
-
-#include "wx/bitmap.h"
-#include "wx/button.h"
-
-extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxBitmapButton: a button which shows bitmaps instead of the usual string.
-// It has different bitmaps for different states (focused/disabled/pressed)
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxBitmapButtonBase : public wxButton
-{
-public:
- wxBitmapButtonBase()
- {
- m_marginX =
- m_marginY = 0;
- }
-
- // set the bitmaps
- void SetBitmapLabel(const wxBitmap& bitmap)
- { m_bmpNormal = bitmap; OnSetBitmap(); }
- void SetBitmapSelected(const wxBitmap& sel)
- { m_bmpSelected = sel; OnSetBitmap(); }
- void SetBitmapFocus(const wxBitmap& focus)
- { m_bmpFocus = focus; OnSetBitmap(); }
- void SetBitmapDisabled(const wxBitmap& disabled)
- { m_bmpDisabled = disabled; OnSetBitmap(); }
- void SetBitmapHover(const wxBitmap& hover)
- { m_bmpHover = hover; OnSetBitmap(); }
-
- // retrieve the bitmaps
- const wxBitmap& GetBitmapLabel() const { return m_bmpNormal; }
- const wxBitmap& GetBitmapSelected() const { return m_bmpSelected; }
- const wxBitmap& GetBitmapFocus() const { return m_bmpFocus; }
- const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
- const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
- wxBitmap& GetBitmapLabel() { return m_bmpNormal; }
- wxBitmap& GetBitmapSelected() { return m_bmpSelected; }
- wxBitmap& GetBitmapFocus() { return m_bmpFocus; }
- wxBitmap& GetBitmapDisabled() { return m_bmpDisabled; }
- wxBitmap& GetBitmapHover() { return m_bmpHover; }
-
- // set/get the margins around the button
- virtual void SetMargins(int x, int y) { m_marginX = x; m_marginY = y; }
- int GetMarginX() const { return m_marginX; }
- int GetMarginY() const { return m_marginY; }
-
- // deprecated synonym for SetBitmapLabel()
-#if WXWIN_COMPATIBILITY_2_6
- wxDEPRECATED( void SetLabel(const wxBitmap& bitmap) );
-
- // prevent virtual function hiding
- virtual void SetLabel(const wxString& label)
- { wxWindow::SetLabel(label); }
-#endif // WXWIN_COMPATIBILITY_2_6
-
-protected:
- // function called when any of the bitmaps changes
- virtual void OnSetBitmap() { InvalidateBestSize(); Refresh(); }
-
- // the bitmaps for various states
- wxBitmap m_bmpNormal,
- m_bmpSelected,
- m_bmpFocus,
- m_bmpDisabled,
- m_bmpHover;
-
- // the margins around the bitmap
- int m_marginX,
- m_marginY;
-
-
- DECLARE_NO_COPY_CLASS(wxBitmapButtonBase)
-};
-
-#if WXWIN_COMPATIBILITY_2_6
-inline void wxBitmapButtonBase::SetLabel(const wxBitmap& bitmap)
-{
- SetBitmapLabel(bitmap);
-}
-#endif // WXWIN_COMPATIBILITY_2_6
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/bmpbuttn.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/bmpbuttn.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/bmpbuttn.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/bmpbuttn.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/bmpbuttn.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/bmpbuttn.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/bmpbuttn.h"
-#elif defined(__WXPM__)
- #include "wx/os2/bmpbuttn.h"
-#endif
-
-#endif // wxUSE_BMPBUTTON
-
-#endif // _WX_BMPBUTTON_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/bmpcbox.h b/desmume/src/windows/wx/include/wx/bmpcbox.h
deleted file mode 100644
index 09fb32c4c..000000000
--- a/desmume/src/windows/wx/include/wx/bmpcbox.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/bmpcbox.h
-// Purpose: wxBitmapComboBox base header
-// Author: Jaakko Salli
-// Modified by:
-// Created: Aug-31-2006
-// Copyright: (c) Jaakko Salli
-// RCS-ID: $Id: bmpcbox.h 42046 2006-10-16 09:30:01Z ABX $
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BMPCBOX_H_BASE_
-#define _WX_BMPCBOX_H_BASE_
-
-
-#include "wx/defs.h"
-
-#if wxUSE_BITMAPCOMBOBOX
-
-#include "wx/bitmap.h"
-
-
-extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxBitmapComboBoxNameStr[];
-
-
-class WXDLLIMPEXP_ADV wxBitmapComboBoxBase
-{
-public:
- // ctors and such
- wxBitmapComboBoxBase() { }
-
- virtual ~wxBitmapComboBoxBase() { }
-
- // Returns the image of the item with the given index.
- virtual wxBitmap GetItemBitmap(unsigned int n) const = 0;
-
- // Sets the image for the given item.
- virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) = 0;
-
- // Returns size of the image used in list
- virtual wxSize GetBitmapSize() const = 0;
-};
-
-
-#include "wx/generic/bmpcbox.h"
-
-#endif // wxUSE_BITMAPCOMBOBOX
-
-#endif // _WX_BMPCBOX_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/bookctrl.h b/desmume/src/windows/wx/include/wx/bookctrl.h
deleted file mode 100644
index ba1bdfe5b..000000000
--- a/desmume/src/windows/wx/include/wx/bookctrl.h
+++ /dev/null
@@ -1,403 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/bookctrl.h
-// Purpose: wxBookCtrlBase: common base class for wxList/Tree/Notebook
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 19.08.03
-// RCS-ID: $Id: bookctrl.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BOOKCTRL_H_
-#define _WX_BOOKCTRL_H_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_BOOKCTRL
-
-#include "wx/control.h"
-#include "wx/dynarray.h"
-
-WX_DEFINE_EXPORTED_ARRAY_PTR(wxWindow *, wxArrayPages);
-
-class WXDLLIMPEXP_FWD_CORE wxImageList;
-class WXDLLIMPEXP_FWD_CORE wxBookCtrlBaseEvent;
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// wxBookCtrl hit results
-enum
-{
- wxBK_HITTEST_NOWHERE = 1, // not on tab
- wxBK_HITTEST_ONICON = 2, // on icon
- wxBK_HITTEST_ONLABEL = 4, // on label
- wxBK_HITTEST_ONITEM = wxBK_HITTEST_ONICON | wxBK_HITTEST_ONLABEL,
- wxBK_HITTEST_ONPAGE = 8 // not on tab control, but over the selected page
-};
-
-// wxBookCtrl flags (common for wxNotebook, wxListbook, wxChoicebook, wxTreebook)
-#define wxBK_DEFAULT 0x0000
-#define wxBK_TOP 0x0010
-#define wxBK_BOTTOM 0x0020
-#define wxBK_LEFT 0x0040
-#define wxBK_RIGHT 0x0080
-#define wxBK_ALIGN_MASK (wxBK_TOP | wxBK_BOTTOM | wxBK_LEFT | wxBK_RIGHT)
-
-// ----------------------------------------------------------------------------
-// wxBookCtrlBase
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxBookCtrlBase : public wxControl
-{
-public:
- // construction
- // ------------
-
- wxBookCtrlBase()
- {
- Init();
- }
-
- wxBookCtrlBase(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyString)
- {
- Init();
-
- (void)Create(parent, winid, pos, size, style, name);
- }
-
- // quasi ctor
- bool Create(wxWindow *parent,
- wxWindowID winid,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyString);
-
- // dtor
- virtual ~wxBookCtrlBase();
-
-
- // accessors
- // ---------
-
- // get number of pages in the dialog
- virtual size_t GetPageCount() const { return m_pages.size(); }
-
- // get the panel which represents the given page
- wxWindow *GetPage(size_t n) { return m_pages[n]; }
- wxWindow *GetPage(size_t n) const { return m_pages[n]; }
-
- // get the current page or NULL if none
- wxWindow *GetCurrentPage() const
- {
- const int n = GetSelection();
- return n == wxNOT_FOUND ? NULL : GetPage(n);
- }
-
- // get the currently selected page or wxNOT_FOUND if none
- virtual int GetSelection() const = 0;
-
- // set/get the title of a page
- virtual bool SetPageText(size_t n, const wxString& strText) = 0;
- virtual wxString GetPageText(size_t n) const = 0;
-
-
- // image list stuff: each page may have an image associated with it (all
- // images belong to the same image list)
- // ---------------------------------------------------------------------
-
- // sets the image list to use, it is *not* deleted by the control
- virtual void SetImageList(wxImageList *imageList);
-
- // as SetImageList() but we will delete the image list ourselves
- void AssignImageList(wxImageList *imageList);
-
- // get pointer (may be NULL) to the associated image list
- wxImageList* GetImageList() const { return m_imageList; }
-
- // sets/returns item's image index in the current image list
- virtual int GetPageImage(size_t n) const = 0;
- virtual bool SetPageImage(size_t n, int imageId) = 0;
-
-
- // geometry
- // --------
-
- // resize the notebook so that all pages will have the specified size
- virtual void SetPageSize(const wxSize& size);
-
- // calculate the size of the control from the size of its page
- virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const = 0;
-
- // get/set size of area between book control area and page area
- unsigned int GetInternalBorder() const { return m_internalBorder; }
- void SetInternalBorder(unsigned int border) { m_internalBorder = border; }
-
- // Sets/gets the margin around the controller
- void SetControlMargin(int margin) { m_controlMargin = margin; }
- int GetControlMargin() const { return m_controlMargin; }
-
- // returns true if we have wxBK_TOP or wxBK_BOTTOM style
- bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
-
- // set/get option to shrink to fit current page
- void SetFitToCurrentPage(bool fit) { m_fitToCurrentPage = fit; }
- bool GetFitToCurrentPage() const { return m_fitToCurrentPage; }
-
- // returns the sizer containing the control, if any
- wxSizer* GetControlSizer() const { return m_controlSizer; }
-
- // operations
- // ----------
-
- // remove one page from the control and delete it
- virtual bool DeletePage(size_t n);
-
- // remove one page from the notebook, without deleting it
- virtual bool RemovePage(size_t n)
- {
- DoInvalidateBestSize();
- return DoRemovePage(n) != NULL;
- }
-
- // remove all pages and delete them
- virtual bool DeleteAllPages()
- {
- DoInvalidateBestSize();
- WX_CLEAR_ARRAY(m_pages);
- return true;
- }
-
- // adds a new page to the control
- virtual bool AddPage(wxWindow *page,
- const wxString& text,
- bool bSelect = false,
- int imageId = -1)
- {
- DoInvalidateBestSize();
- return InsertPage(GetPageCount(), page, text, bSelect, imageId);
- }
-
- // the same as AddPage(), but adds the page at the specified position
- virtual bool InsertPage(size_t n,
- wxWindow *page,
- const wxString& text,
- bool bSelect = false,
- int imageId = -1) = 0;
-
- // set the currently selected page, return the index of the previously
- // selected one (or -1 on error)
- //
- // NB: this function will generate PAGE_CHANGING/ED events
- virtual int SetSelection(size_t n) = 0;
-
- // acts as SetSelection but does not generate events
- virtual int ChangeSelection(size_t n) = 0;
-
-
- // cycle thru the pages
- void AdvanceSelection(bool forward = true)
- {
- int nPage = GetNextPage(forward);
- if ( nPage != -1 )
- {
- // cast is safe because of the check above
- SetSelection((size_t)nPage);
- }
- }
-
- // hit test: returns which page is hit and, optionally, where (icon, label)
- virtual int HitTest(const wxPoint& WXUNUSED(pt),
- long * WXUNUSED(flags) = NULL) const
- {
- return wxNOT_FOUND;
- }
-
-
- // we do have multiple pages
- virtual bool HasMultiplePages() const { return true; }
-
-
-protected:
- // flags for DoSetSelection()
- enum
- {
- SetSelection_SendEvent = 1
- };
-
- // set the selection to the given page, sending the events (which can
- // possibly prevent the page change from taking place) if SendEvent flag is
- // included
- virtual int DoSetSelection(size_t nPage, int flags = 0);
-
- // if the derived class uses DoSetSelection() for implementing
- // [Set|Change]Selection, it must override UpdateSelectedPage(),
- // CreatePageChangingEvent() and MakeChangedEvent(), but as it might not
- // use it, these functions are not pure virtual
-
- // called to notify the control about a new current page
- virtual void UpdateSelectedPage(size_t WXUNUSED(newsel))
- { wxFAIL_MSG(wxT("Override this function!")); }
-
- // create a new "page changing" event
- virtual wxBookCtrlBaseEvent* CreatePageChangingEvent() const
- { wxFAIL_MSG(wxT("Override this function!")); return NULL; }
-
- // modify the event created by CreatePageChangingEvent() to "page changed"
- // event, usually by just calling SetEventType() on it
- virtual void MakeChangedEvent(wxBookCtrlBaseEvent& WXUNUSED(event))
- { wxFAIL_MSG(wxT("Override this function!")); }
-
-
- // Should we accept NULL page pointers in Add/InsertPage()?
- //
- // Default is no but derived classes may override it if they can treat NULL
- // pages in some sensible way (e.g. wxTreebook overrides this to allow
- // having nodes without any associated page)
- virtual bool AllowNullPage() const { return false; }
-
- // remove the page and return a pointer to it
- virtual wxWindow *DoRemovePage(size_t page) = 0;
-
- // our best size is the size which fits all our pages
- virtual wxSize DoGetBestSize() const;
-
- // helper: get the next page wrapping if we reached the end
- int GetNextPage(bool forward) const;
-
- // Lay out controls
- void DoSize();
-
- // This method also invalidates the size of the controller and should be
- // called instead of just InvalidateBestSize() whenever pages are added or
- // removed as this also affects the controller
- void DoInvalidateBestSize();
-
-#if wxUSE_HELP
- // Show the help for the corresponding page
- void OnHelp(wxHelpEvent& event);
-#endif // wxUSE_HELP
-
-
- // the array of all pages of this control
- wxArrayPages m_pages;
-
- // the associated image list or NULL
- wxImageList *m_imageList;
-
- // true if we must delete m_imageList
- bool m_ownsImageList;
-
- // get the page area
- wxRect GetPageRect() const;
-
- // event handlers
- virtual wxSize GetControllerSize() const;
- void OnSize(wxSizeEvent& event);
-
- // controller buddy if available, NULL otherwise (usually for native book controls like wxNotebook)
- wxControl *m_bookctrl;
-
- // Whether to shrink to fit current page
- bool m_fitToCurrentPage;
-
- // the sizer containing the choice control
- wxSizer *m_controlSizer;
-
- // the margin around the choice control
- int m_controlMargin;
-
-private:
-
- // common part of all ctors
- void Init();
-
- // internal border
- unsigned int m_internalBorder;
-
- DECLARE_ABSTRACT_CLASS(wxBookCtrlBase)
- DECLARE_NO_COPY_CLASS(wxBookCtrlBase)
- DECLARE_EVENT_TABLE()
-};
-
-// ----------------------------------------------------------------------------
-// wxBookCtrlBaseEvent: page changing events generated by derived classes
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxBookCtrlBaseEvent : public wxNotifyEvent
-{
-public:
- wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0,
- int nSel = -1, int nOldSel = -1)
- : wxNotifyEvent(commandType, winid)
- {
- m_nSel = nSel;
- m_nOldSel = nOldSel;
- }
-
- wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event)
- : wxNotifyEvent(event)
- {
- m_nSel = event.m_nSel;
- m_nOldSel = event.m_nOldSel;
- }
-
- // accessors
- // the currently selected page (-1 if none)
- int GetSelection() const { return m_nSel; }
- void SetSelection(int nSel) { m_nSel = nSel; }
- // the page that was selected before the change (-1 if none)
- int GetOldSelection() const { return m_nOldSel; }
- void SetOldSelection(int nOldSel) { m_nOldSel = nOldSel; }
-
-private:
- int m_nSel, // currently selected page
- m_nOldSel; // previously selected page
-};
-
-// make a default book control for given platform
-#if wxUSE_NOTEBOOK
- // dedicated to majority of desktops
- #include "wx/notebook.h"
- #define wxBookCtrl wxNotebook
- #define wxBookCtrlEvent wxNotebookEvent
- #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
- #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
- #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn)
- #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn)
- #define wxBookctrlEventHandler(func) wxNotebookEventHandler(func)
-#else
- // dedicated to Smartphones
- #include "wx/choicebk.h"
- #define wxBookCtrl wxChoicebook
- #define wxBookCtrlEvent wxChoicebookEvent
- #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED
- #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING
- #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn)
- #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn)
- #define wxBookctrlEventHandler(func) wxChoicebookEventHandler(func)
-#endif
-
-#if WXWIN_COMPATIBILITY_2_6
- #define wxBC_TOP wxBK_TOP
- #define wxBC_BOTTOM wxBK_BOTTOM
- #define wxBC_LEFT wxBK_LEFT
- #define wxBC_RIGHT wxBK_RIGHT
- #define wxBC_DEFAULT wxBK_DEFAULT
-#endif
-
-#endif // wxUSE_BOOKCTRL
-
-#endif // _WX_BOOKCTRL_H_
diff --git a/desmume/src/windows/wx/include/wx/brush.h b/desmume/src/windows/wx/include/wx/brush.h
deleted file mode 100644
index cbf728728..000000000
--- a/desmume/src/windows/wx/include/wx/brush.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/brush.h
-// Purpose: Includes platform-specific wxBrush file
-// Author: Julian Smart
-// Modified by:
-// Created:
-// RCS-ID: $Id: brush.h 40865 2006-08-27 09:42:42Z VS $
-// Copyright: Julian Smart
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BRUSH_H_BASE_
-#define _WX_BRUSH_H_BASE_
-
-#include "wx/defs.h"
-#include "wx/object.h"
-#include "wx/gdiobj.h"
-
-// wxBrushBase
-class WXDLLEXPORT wxBrushBase: public wxGDIObject
-{
-public:
- virtual ~wxBrushBase() { }
-
- virtual int GetStyle() const = 0;
-
- virtual bool IsHatch() const
- { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
-};
-
-#if defined(__WXPALMOS__)
- #include "wx/palmos/brush.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/brush.h"
-#elif defined(__WXMOTIF__) || defined(__WXX11__)
- #include "wx/x11/brush.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/brush.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/brush.h"
-#elif defined(__WXMGL__)
- #include "wx/mgl/brush.h"
-#elif defined(__WXDFB__)
- #include "wx/dfb/brush.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/brush.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/brush.h"
-#elif defined(__WXPM__)
- #include "wx/os2/brush.h"
-#endif
-
-#endif
- // _WX_BRUSH_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/buffer.h b/desmume/src/windows/wx/include/wx/buffer.h
deleted file mode 100644
index 605f4f19c..000000000
--- a/desmume/src/windows/wx/include/wx/buffer.h
+++ /dev/null
@@ -1,314 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/buffer.h
-// Purpose: auto buffer classes: buffers which automatically free memory
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 12.04.99
-// RCS-ID: $Id: buffer.h 45761 2007-05-02 17:09:30Z VS $
-// Copyright: (c) 1998 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BUFFER_H
-#define _WX_BUFFER_H
-
-#include "wx/wxchar.h"
-
-#include // malloc() and free()
-
-// ----------------------------------------------------------------------------
-// Special classes for (wide) character strings: they use malloc/free instead
-// of new/delete
-// ----------------------------------------------------------------------------
-
-#define DEFINE_BUFFER(classname, chartype, strdupfunc) \
-class WXDLLIMPEXP_BASE classname \
-{ \
-public: \
- classname(const chartype *str = NULL) \
- : m_str(str ? strdupfunc(str) : NULL) \
- { \
- } \
- \
- classname(size_t len) \
- : m_str((chartype *)malloc((len + 1)*sizeof(chartype))) \
- { \
- m_str[len] = (chartype)0; \
- } \
- \
- /* no need to check for NULL, free() does it */ \
- ~classname() { free(m_str); } \
- \
- /* \
- WARNING: \
- \
- the copy ctor and assignment operators change the passed in object \
- even although it is declared as "const", so: \
- \
- a) it shouldn't be really const \
- b) you shouldn't use it afterwards (or know that it was reset) \
- \
- This is very ugly but is unfortunately needed to make the normal use\
- of classname buffer objects possible and is very similar to what \
- std::auto_ptr<> does (as if it were an excuse...) \
- */ \
- \
- /* \
- because of the remark above, release() is declared const even if it \
- isn't really const \
- */ \
- chartype *release() const \
- { \
- chartype *p = m_str; \
- ((classname *)this)->m_str = NULL; \
- return p; \
- } \
- \
- void reset() \
- { \
- free(m_str); \
- m_str = NULL; \
- } \
- \
- classname(const classname& src) \
- : m_str(src.release()) \
- { \
- } \
- \
- classname& operator=(const chartype *str) \
- { \
- free(m_str); \
- m_str = str ? strdupfunc(str) : NULL; \
- return *this; \
- } \
- \
- classname& operator=(const classname& src) \
- { \
- free(m_str); \
- m_str = src.release(); \
- \
- return *this; \
- } \
- \
- bool extend(size_t len) \
- { \
- chartype * \
- str = (chartype *)realloc(m_str, (len + 1)*sizeof(chartype)); \
- if ( !str ) \
- return false; \
- \
- m_str = str; \
- \
- return true; \
- } \
- \
- chartype *data() { return m_str; } \
- const chartype *data() const { return m_str; } \
- operator const chartype *() const { return m_str; } \
- chartype operator[](size_t n) const { return m_str[n]; } \
- \
-private: \
- chartype *m_str; \
-}
-
-#if wxABI_VERSION >= 20804
-// needed for wxString::char_str() and wchar_str()
-#define DEFINE_WRITABLE_BUFFER(classname, baseclass, chartype) \
-class WXDLLIMPEXP_BASE classname : public baseclass \
-{ \
-public: \
- classname(const baseclass& src) : baseclass(src) {} \
- classname(const chartype *str = NULL) : baseclass(str) {} \
- \
- operator chartype*() { return this->data(); } \
-}
-#endif // wxABI_VERSION >= 20804
-
-DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA);
-#if wxABI_VERSION >= 20804
-DEFINE_WRITABLE_BUFFER(wxWritableCharBuffer, wxCharBuffer, char);
-#endif
-
-#if wxUSE_WCHAR_T
-
-DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW);
-#if wxABI_VERSION >= 20804
-DEFINE_WRITABLE_BUFFER(wxWritableWCharBuffer, wxWCharBuffer, wchar_t);
-#endif
-
-#endif // wxUSE_WCHAR_T
-
-#undef DEFINE_BUFFER
-#undef DEFINE_WRITABLE_BUFFER
-
-#if wxUSE_UNICODE
- typedef wxWCharBuffer wxWxCharBuffer;
-
- #define wxMB2WXbuf wxWCharBuffer
- #define wxWX2MBbuf wxCharBuffer
- #define wxWC2WXbuf wxChar*
- #define wxWX2WCbuf wxChar*
-#else // ANSI
- typedef wxCharBuffer wxWxCharBuffer;
-
- #define wxMB2WXbuf wxChar*
- #define wxWX2MBbuf wxChar*
- #define wxWC2WXbuf wxCharBuffer
- #define wxWX2WCbuf wxWCharBuffer
-#endif // Unicode/ANSI
-
-// ----------------------------------------------------------------------------
-// A class for holding growable data buffers (not necessarily strings)
-// ----------------------------------------------------------------------------
-
-// This class manages the actual data buffer pointer and is ref-counted.
-class wxMemoryBufferData
-{
-public:
- // the initial size and also the size added by ResizeIfNeeded()
- enum { DefBufSize = 1024 };
-
- friend class wxMemoryBuffer;
-
- // everyting is private as it can only be used by wxMemoryBuffer
-private:
- wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize)
- : m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0)
- {
- }
- ~wxMemoryBufferData() { free(m_data); }
-
-
- void ResizeIfNeeded(size_t newSize)
- {
- if (newSize > m_size)
- {
- void *dataOld = m_data;
- m_data = realloc(m_data, newSize + wxMemoryBufferData::DefBufSize);
- if ( !m_data )
- {
- free(dataOld);
- }
-
- m_size = newSize + wxMemoryBufferData::DefBufSize;
- }
- }
-
- void IncRef() { m_ref += 1; }
- void DecRef()
- {
- m_ref -= 1;
- if (m_ref == 0) // are there no more references?
- delete this;
- }
-
-
- // the buffer containing the data
- void *m_data;
-
- // the size of the buffer
- size_t m_size;
-
- // the amount of data currently in the buffer
- size_t m_len;
-
- // the reference count
- size_t m_ref;
-
- DECLARE_NO_COPY_CLASS(wxMemoryBufferData)
-};
-
-
-class wxMemoryBuffer
-{
-public:
- // ctor and dtor
- wxMemoryBuffer(size_t size = wxMemoryBufferData::DefBufSize)
- {
- m_bufdata = new wxMemoryBufferData(size);
- m_bufdata->IncRef();
- }
-
- ~wxMemoryBuffer() { m_bufdata->DecRef(); }
-
-
- // copy and assignment
- wxMemoryBuffer(const wxMemoryBuffer& src)
- : m_bufdata(src.m_bufdata)
- {
- m_bufdata->IncRef();
- }
-
- wxMemoryBuffer& operator=(const wxMemoryBuffer& src)
- {
- m_bufdata->DecRef();
- m_bufdata = src.m_bufdata;
- m_bufdata->IncRef();
- return *this;
- }
-
-
- // Accessors
- void *GetData() const { return m_bufdata->m_data; }
- size_t GetBufSize() const { return m_bufdata->m_size; }
- size_t GetDataLen() const { return m_bufdata->m_len; }
-
- void SetBufSize(size_t size) { m_bufdata->ResizeIfNeeded(size); }
- void SetDataLen(size_t len)
- {
- wxASSERT(len <= m_bufdata->m_size);
- m_bufdata->m_len = len;
- }
-
- // Ensure the buffer is big enough and return a pointer to it
- void *GetWriteBuf(size_t sizeNeeded)
- {
- m_bufdata->ResizeIfNeeded(sizeNeeded);
- return m_bufdata->m_data;
- }
-
- // Update the length after the write
- void UngetWriteBuf(size_t sizeUsed) { SetDataLen(sizeUsed); }
-
- // Like the above, but appends to the buffer
- void *GetAppendBuf(size_t sizeNeeded)
- {
- m_bufdata->ResizeIfNeeded(m_bufdata->m_len + sizeNeeded);
- return (char*)m_bufdata->m_data + m_bufdata->m_len;
- }
-
- // Update the length after the append
- void UngetAppendBuf(size_t sizeUsed)
- {
- SetDataLen(m_bufdata->m_len + sizeUsed);
- }
-
- // Other ways to append to the buffer
- void AppendByte(char data)
- {
- wxCHECK_RET( m_bufdata->m_data, _T("invalid wxMemoryBuffer") );
-
- m_bufdata->ResizeIfNeeded(m_bufdata->m_len + 1);
- *(((char*)m_bufdata->m_data) + m_bufdata->m_len) = data;
- m_bufdata->m_len += 1;
- }
-
- void AppendData(const void *data, size_t len)
- {
- memcpy(GetAppendBuf(len), data, len);
- UngetAppendBuf(len);
- }
-
- operator const char *() const { return (const char*)GetData(); }
-
-private:
- wxMemoryBufferData* m_bufdata;
-};
-
-// ----------------------------------------------------------------------------
-// template class for any kind of data
-// ----------------------------------------------------------------------------
-
-// TODO
-
-#endif // _WX_BUFFER_H
diff --git a/desmume/src/windows/wx/include/wx/build.h b/desmume/src/windows/wx/include/wx/build.h
deleted file mode 100644
index 989d5e611..000000000
--- a/desmume/src/windows/wx/include/wx/build.h
+++ /dev/null
@@ -1,149 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/build.h
-// Purpose: Runtime build options checking
-// Author: Vadim Zeitlin, Vaclav Slavik
-// Modified by:
-// Created: 07.05.02
-// RCS-ID: $Id: build.h 35858 2005-10-09 15:48:42Z MBN $
-// Copyright: (c) 2002 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BUILD_H_
-#define _WX_BUILD_H_
-
-#include "wx/version.h"
-
-// NB: This file contains macros for checking binary compatibility of libraries
-// in multilib buildm, plugins and user components.
-// The WX_BUILD_OPTIONS_SIGNATURE macro expands into string that should
-// uniquely identify binary compatible builds: i.e. if two builds of the
-// library are binary compatible, their signature string should be the
-// same; if two builds are binary incompatible, their signatures should
-// be different.
-//
-// Therefore, wxUSE_XXX flags that affect binary compatibility (vtables,
-// function signatures) should be accounted for here. So should compilers
-// and compiler versions (but note that binary compatible compiler versions
-// such as gcc-2.95.2 and gcc-2.95.3 should have same signature!).
-
-// ----------------------------------------------------------------------------
-// WX_BUILD_OPTIONS_SIGNATURE
-// ----------------------------------------------------------------------------
-
-#define __WX_BO_STRINGIZE(x) __WX_BO_STRINGIZE0(x)
-#define __WX_BO_STRINGIZE0(x) #x
-
-#if (wxMINOR_VERSION % 2) == 0
- #define __WX_BO_VERSION(x,y,z) \
- __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y)
-#else
- #define __WX_BO_VERSION(x,y,z) \
- __WX_BO_STRINGIZE(x) "." __WX_BO_STRINGIZE(y) "." __WX_BO_STRINGIZE(z)
-#endif
-
-#ifdef __WXDEBUG__
- #define __WX_BO_DEBUG "debug"
-#else
- #define __WX_BO_DEBUG "no debug"
-#endif
-
-#if wxUSE_UNICODE
- #define __WX_BO_UNICODE "Unicode"
-#else
- #define __WX_BO_UNICODE "ANSI"
-#endif
-
-// GCC and Intel C++ share same C++ ABI (and possibly others in the future),
-// check if compiler versions are compatible:
-#if defined(__GXX_ABI_VERSION)
- #define __WX_BO_COMPILER \
- ",compiler with C++ ABI " __WX_BO_STRINGIZE(__GXX_ABI_VERSION)
-#elif defined(__INTEL_COMPILER)
- #define __WX_BO_COMPILER ",Intel C++"
-#elif defined(__GNUG__)
- #define __WX_BO_COMPILER ",GCC " \
- __WX_BO_STRINGIZE(__GNUC__) "." __WX_BO_STRINGIZE(__GNUC_MINOR__)
-#elif defined(__VISUALC__)
- #define __WX_BO_COMPILER ",Visual C++"
-#elif defined(__BORLANDC__)
- #define __WX_BO_COMPILER ",Borland C++"
-#elif defined(__DIGITALMARS__)
- #define __WX_BO_COMPILER ",DigitalMars"
-#elif defined(__WATCOMC__)
- #define __WX_BO_COMPILER ",Watcom C++"
-#else
- #define __WX_BO_COMPILER
-#endif
-
-// WXWIN_COMPATIBILITY macros affect presence of virtual functions
-#if WXWIN_COMPATIBILITY_2_4
- #define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4"
-#else
- #define __WX_BO_WXWIN_COMPAT_2_4
-#endif
-#if WXWIN_COMPATIBILITY_2_6
- #define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6"
-#else
- #define __WX_BO_WXWIN_COMPAT_2_6
-#endif
-
-// deriving wxWin containers from STL ones changes them completely:
-#if wxUSE_STL
- #define __WX_BO_STL ",STL containers"
-#else
- #define __WX_BO_STL ",wx containers"
-#endif
-
-// This macro is passed as argument to wxConsoleApp::CheckBuildOptions()
-#define WX_BUILD_OPTIONS_SIGNATURE \
- __WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
- " (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
- __WX_BO_COMPILER \
- __WX_BO_STL \
- __WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \
- ")"
-
-
-// ----------------------------------------------------------------------------
-// WX_CHECK_BUILD_OPTIONS
-// ----------------------------------------------------------------------------
-
-// Use this macro to check build options. Adding it to a file in DLL will
-// ensure that the DLL checks build options in same way IMPLEMENT_APP() does.
-#define WX_CHECK_BUILD_OPTIONS(libName) \
- static struct wxBuildOptionsChecker \
- { \
- wxBuildOptionsChecker() \
- { \
- wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
- libName); \
- } \
- } gs_buildOptionsCheck;
-
-
-#if WXWIN_COMPATIBILITY_2_4
-
-// ----------------------------------------------------------------------------
-// wxBuildOptions
-// ----------------------------------------------------------------------------
-
-// NB: Don't use this class in new code, it relies on the ctor being always
-// inlined. WX_BUILD_OPTIONS_SIGNATURE always works.
-class wxBuildOptions
-{
-public:
- // the ctor must be inline to get the compilation settings of the code
- // which included this header
- wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {}
-
-private:
- const char *m_signature;
-
- // actually only CheckBuildOptions() should be our friend but well...
- friend class wxAppConsole;
-};
-
-#endif // WXWIN_COMPATIBILITY_2_4
-
-#endif // _WX_BUILD_H_
diff --git a/desmume/src/windows/wx/include/wx/busyinfo.h b/desmume/src/windows/wx/include/wx/busyinfo.h
deleted file mode 100644
index ae6355287..000000000
--- a/desmume/src/windows/wx/include/wx/busyinfo.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/busyinfo.h
-// Purpose: Information window (when app is busy)
-// Author: Vaclav Slavik
-// Copyright: (c) 1999 Vaclav Slavik
-// RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __BUSYINFO_H_BASE__
-#define __BUSYINFO_H_BASE__
-
-#include "wx/defs.h"
-
-#if wxUSE_BUSYINFO
-
-#include "wx/generic/busyinfo.h"
-
-#endif // wxUSE_BUSYINFO
-
-#endif // __BUSYINFO_H_BASE__
diff --git a/desmume/src/windows/wx/include/wx/button.h b/desmume/src/windows/wx/include/wx/button.h
deleted file mode 100644
index a4448f81f..000000000
--- a/desmume/src/windows/wx/include/wx/button.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/button.h
-// Purpose: wxButtonBase class
-// Author: Vadim Zetlin
-// Modified by:
-// Created: 15.08.00
-// RCS-ID: $Id: button.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) Vadim Zetlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_BUTTON_H_BASE_
-#define _WX_BUTTON_H_BASE_
-
-#include "wx/defs.h"
-
-// ----------------------------------------------------------------------------
-// wxButton flags shared with other classes
-// ----------------------------------------------------------------------------
-
-#if wxUSE_TOGGLEBTN || wxUSE_BUTTON
-
-// These flags affect label alignment
-#define wxBU_LEFT 0x0040
-#define wxBU_TOP 0x0080
-#define wxBU_RIGHT 0x0100
-#define wxBU_BOTTOM 0x0200
-#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
-#endif
-
-#if wxUSE_BUTTON
-
-// ----------------------------------------------------------------------------
-// wxButton specific flags
-// ----------------------------------------------------------------------------
-
-// These two flags are obsolete
-#define wxBU_NOAUTODRAW 0x0000
-#define wxBU_AUTODRAW 0x0004
-
-// by default, the buttons will be created with some (system dependent)
-// minimal size to make them look nicer, giving this style will make them as
-// small as possible
-#define wxBU_EXACTFIT 0x0001
-
-#include "wx/control.h"
-
-class WXDLLIMPEXP_FWD_CORE wxBitmap;
-
-extern WXDLLEXPORT_DATA(const wxChar) wxButtonNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxButton: a push button
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxButtonBase : public wxControl
-{
-public:
- wxButtonBase() { }
-
- // show the image in the button in addition to the label
- virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
-
- // set the margins around the image
- virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
-
- // this wxButton method is called when the button becomes the default one
- // on its panel
- virtual void SetDefault() { }
-
- // Buttons on MSW can look bad if they are not native colours, because
- // then they become owner-drawn and not theme-drawn. Disable it here
- // in wxButtonBase to make it consistent.
- virtual bool ShouldInheritColours() const { return false; }
-
- // returns the default button size for this platform
- static wxSize GetDefaultSize();
-
-protected:
- DECLARE_NO_COPY_CLASS(wxButtonBase)
-};
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/button.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/button.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/button.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/button.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/button.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/button.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/button.h"
-#elif defined(__WXPM__)
- #include "wx/os2/button.h"
-#elif defined(__WXPALMOS__)
- #include "wx/palmos/button.h"
-#endif
-
-#endif // wxUSE_BUTTON
-
-#endif
- // _WX_BUTTON_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/calctrl.h b/desmume/src/windows/wx/include/wx/calctrl.h
deleted file mode 100644
index ace3b2262..000000000
--- a/desmume/src/windows/wx/include/wx/calctrl.h
+++ /dev/null
@@ -1,232 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/calctrl.h
-// Purpose: date-picker control
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 29.12.99
-// RCS-ID: $Id: calctrl.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) 1999 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-/*
- TODO
-
- 1. implement multiple selections for date ranges
- 2. background bitmap for the calendar?
- */
-
-#ifndef _WX_CALCTRL_H_
-#define _WX_CALCTRL_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_CALENDARCTRL
-
-#include "wx/dateevt.h"
-#include "wx/colour.h"
-#include "wx/font.h"
-
-// ----------------------------------------------------------------------------
-// wxCalendarCtrl flags
-// ----------------------------------------------------------------------------
-
-enum
-{
- // show Sunday as the first day of the week (default)
- wxCAL_SUNDAY_FIRST = 0x0000,
-
- // show Monder as the first day of the week
- wxCAL_MONDAY_FIRST = 0x0001,
-
- // highlight holidays
- wxCAL_SHOW_HOLIDAYS = 0x0002,
-
- // disable the year change control, show only the month change one
- wxCAL_NO_YEAR_CHANGE = 0x0004,
-
- // don't allow changing neither month nor year (implies
- // wxCAL_NO_YEAR_CHANGE)
- wxCAL_NO_MONTH_CHANGE = 0x000c,
-
- // use MS-style month-selection instead of combo-spin combination
- wxCAL_SEQUENTIAL_MONTH_SELECTION = 0x0010,
-
- // show the neighbouring weeks in the previous and next month
- wxCAL_SHOW_SURROUNDING_WEEKS = 0x0020
-};
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// return values for the HitTest() method
-enum wxCalendarHitTestResult
-{
- wxCAL_HITTEST_NOWHERE, // outside of anything
- wxCAL_HITTEST_HEADER, // on the header (weekdays)
- wxCAL_HITTEST_DAY, // on a day in the calendar
- wxCAL_HITTEST_INCMONTH,
- wxCAL_HITTEST_DECMONTH,
- wxCAL_HITTEST_SURROUNDING_WEEK
-};
-
-// border types for a date
-enum wxCalendarDateBorder
-{
- wxCAL_BORDER_NONE, // no border (default)
- wxCAL_BORDER_SQUARE, // a rectangular border
- wxCAL_BORDER_ROUND // a round border
-};
-
-// ----------------------------------------------------------------------------
-// wxCalendarDateAttr: custom attributes for a calendar date
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxCalendarDateAttr
-{
-#if !defined(__VISAGECPP__)
-protected:
- // This has to be before the use of Init(), for MSVC++ 1.5
- // But dorks up Visualage!
- void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
- {
- m_border = border;
- m_holiday = false;
- }
-#endif
-public:
- // ctors
- wxCalendarDateAttr() { Init(); }
- wxCalendarDateAttr(const wxColour& colText,
- const wxColour& colBack = wxNullColour,
- const wxColour& colBorder = wxNullColour,
- const wxFont& font = wxNullFont,
- wxCalendarDateBorder border = wxCAL_BORDER_NONE)
- : m_colText(colText), m_colBack(colBack),
- m_colBorder(colBorder), m_font(font)
- {
- Init(border);
- }
- wxCalendarDateAttr(wxCalendarDateBorder border,
- const wxColour& colBorder = wxNullColour)
- : m_colBorder(colBorder)
- {
- Init(border);
- }
-
- // setters
- void SetTextColour(const wxColour& colText) { m_colText = colText; }
- void SetBackgroundColour(const wxColour& colBack) { m_colBack = colBack; }
- void SetBorderColour(const wxColour& col) { m_colBorder = col; }
- void SetFont(const wxFont& font) { m_font = font; }
- void SetBorder(wxCalendarDateBorder border) { m_border = border; }
- void SetHoliday(bool holiday) { m_holiday = holiday; }
-
- // accessors
- bool HasTextColour() const { return m_colText.Ok(); }
- bool HasBackgroundColour() const { return m_colBack.Ok(); }
- bool HasBorderColour() const { return m_colBorder.Ok(); }
- bool HasFont() const { return m_font.Ok(); }
- bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
-
- bool IsHoliday() const { return m_holiday; }
-
- const wxColour& GetTextColour() const { return m_colText; }
- const wxColour& GetBackgroundColour() const { return m_colBack; }
- const wxColour& GetBorderColour() const { return m_colBorder; }
- const wxFont& GetFont() const { return m_font; }
- wxCalendarDateBorder GetBorder() const { return m_border; }
-#if defined(__VISAGECPP__)
-protected:
- // This has to be here for VisualAge
- void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
- {
- m_border = border;
- m_holiday = false;
- }
-#endif
-private:
- wxColour m_colText,
- m_colBack,
- m_colBorder;
- wxFont m_font;
- wxCalendarDateBorder m_border;
- bool m_holiday;
-};
-
-// ----------------------------------------------------------------------------
-// wxCalendarCtrl events
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_ADV wxCalendarCtrl;
-
-class WXDLLIMPEXP_ADV wxCalendarEvent : public wxDateEvent
-{
-friend class wxCalendarCtrl;
-public:
- wxCalendarEvent() { Init(); }
- inline wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type);
-
- void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
- wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
-
-protected:
- void Init()
- {
- m_wday = wxDateTime::Inv_WeekDay;
- }
-
-private:
- wxDateTime::WeekDay m_wday;
-
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
-};
-
-// ----------------------------------------------------------------------------
-// wxCalendarCtrl
-// ----------------------------------------------------------------------------
-
-// so far we only have a generic version, so keep it simple
-#include "wx/generic/calctrl.h"
-
-
-// now we can define the inline ctor using wxCalendarCtrl
-inline
-wxCalendarEvent::wxCalendarEvent(wxCalendarCtrl *cal, wxEventType type)
- : wxDateEvent(cal, cal->GetDate(), type)
-{
-}
-
-// ----------------------------------------------------------------------------
-// calendar event types and macros for handling them
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_SEL_CHANGED, 950)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DAY_CHANGED, 951)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_MONTH_CHANGED, 952)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_YEAR_CHANGED, 953)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_DOUBLECLICKED, 954)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_CALENDAR_WEEKDAY_CLICKED, 955)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
-
-#define wxCalendarEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCalendarEventFunction, &func)
-
-#define wx__DECLARE_CALEVT(evt, id, fn) \
- wx__DECLARE_EVT1(wxEVT_CALENDAR_ ## evt, id, wxCalendarEventHandler(fn))
-
-#define EVT_CALENDAR(id, fn) wx__DECLARE_CALEVT(DOUBLECLICKED, id, fn)
-#define EVT_CALENDAR_SEL_CHANGED(id, fn) wx__DECLARE_CALEVT(SEL_CHANGED, id, fn)
-#define EVT_CALENDAR_DAY(id, fn) wx__DECLARE_CALEVT(DAY_CHANGED, id, fn)
-#define EVT_CALENDAR_MONTH(id, fn) wx__DECLARE_CALEVT(MONTH_CHANGED, id, fn)
-#define EVT_CALENDAR_YEAR(id, fn) wx__DECLARE_CALEVT(YEAR_CHANGED, id, fn)
-#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) wx__DECLARE_CALEVT(WEEKDAY_CLICKED, id, fn)
-
-#endif // wxUSE_CALENDARCTRL
-
-#endif // _WX_CALCTRL_H_
-
diff --git a/desmume/src/windows/wx/include/wx/caret.h b/desmume/src/windows/wx/include/wx/caret.h
deleted file mode 100644
index 25b606699..000000000
--- a/desmume/src/windows/wx/include/wx/caret.h
+++ /dev/null
@@ -1,252 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/caret.h
-// Purpose: wxCaretBase class - the interface of wxCaret
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 23.05.99
-// RCS-ID: $Id: caret.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CARET_H_BASE_
-#define _WX_CARET_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_CARET
-
-// ---------------------------------------------------------------------------
-// forward declarations
-// ---------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_CORE wxWindow;
-class WXDLLIMPEXP_FWD_CORE wxWindowBase;
-
-// ----------------------------------------------------------------------------
-// headers we have to include
-// ----------------------------------------------------------------------------
-
-#include "wx/gdicmn.h" // for wxPoint, wxSize
-
-// ----------------------------------------------------------------------------
-// A caret is a blinking cursor showing the position where the typed text will
-// appear. It can be either a solid block or a custom bitmap (TODO)
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxCaretBase
-{
-public:
- // ctors
- // -----
- // default - use Create
- wxCaretBase() { Init(); }
- // create the caret of given (in pixels) width and height and associate
- // with the given window
- wxCaretBase(wxWindowBase *window, int width, int height)
- {
- Init();
-
- (void)Create(window, width, height);
- }
- // same as above
- wxCaretBase(wxWindowBase *window, const wxSize& size)
- {
- Init();
-
- (void)Create(window, size);
- }
-
- // a virtual dtor has been provided since this class has virtual members
- virtual ~wxCaretBase() { }
-
- // Create() functions - same as ctor but returns the success code
- // --------------------------------------------------------------
-
- // same as ctor
- bool Create(wxWindowBase *window, int width, int height)
- { return DoCreate(window, width, height); }
- // same as ctor
- bool Create(wxWindowBase *window, const wxSize& size)
- { return DoCreate(window, size.x, size.y); }
-
- // accessors
- // ---------
-
- // is the caret valid?
- bool IsOk() const { return m_width != 0 && m_height != 0; }
-
- // is the caret currently shown?
- bool IsVisible() const { return m_countVisible > 0; }
-
- // get the caret position
- void GetPosition(int *x, int *y) const
- {
- if ( x ) *x = m_x;
- if ( y ) *y = m_y;
- }
- wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
-
- // get the caret size
- void GetSize(int *width, int *height) const
- {
- if ( width ) *width = m_width;
- if ( height ) *height = m_height;
- }
- wxSize GetSize() const { return wxSize(m_width, m_height); }
-
- // get the window we're associated with
- wxWindow *GetWindow() const { return (wxWindow *)m_window; }
-
- // change the size of the caret
- void SetSize(int width, int height) {
- m_width = width;
- m_height = height;
- DoSize();
- }
- void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
-
-
- // operations
- // ----------
-
- // move the caret to given position (in logical coords)
- void Move(int x, int y) { m_x = x; m_y = y; DoMove(); }
- void Move(const wxPoint& pt) { m_x = pt.x; m_y = pt.y; DoMove(); }
-
- // show/hide the caret (should be called by wxWindow when needed):
- // Show() must be called as many times as Hide() + 1 to make the caret
- // visible
- virtual void Show(bool show = true)
- {
- if ( show )
- {
- if ( m_countVisible++ == 0 )
- DoShow();
- }
- else
- {
- if ( --m_countVisible == 0 )
- DoHide();
- }
- }
- virtual void Hide() { Show(false); }
-
- // blink time is measured in milliseconds and is the time elapsed
- // between 2 inversions of the caret (blink time of the caret is common
- // to all carets in the Universe, so these functions are static)
- static int GetBlinkTime();
- static void SetBlinkTime(int milliseconds);
-
- // implementation from now on
- // --------------------------
-
- // these functions should be called by wxWindow when the window gets/loses
- // the focus - we create/show and hide/destroy the caret here
- virtual void OnSetFocus() { }
- virtual void OnKillFocus() { }
-
-protected:
- // these functions may be overriden in the derived classes, but they
- // should call the base class version first
- virtual bool DoCreate(wxWindowBase *window, int width, int height)
- {
- m_window = window;
- m_width = width;
- m_height = height;
-
- return true;
- }
-
- // pure virtuals to implement in the derived class
- virtual void DoShow() = 0;
- virtual void DoHide() = 0;
- virtual void DoMove() = 0;
- virtual void DoSize() { }
-
- // the common initialization
- void Init()
- {
- m_window = (wxWindowBase *)NULL;
- m_x = m_y = 0;
- m_width = m_height = 0;
- m_countVisible = 0;
- }
-
- // the size of the caret
- int m_width, m_height;
-
- // the position of the caret
- int m_x, m_y;
-
- // the window we're associated with
- wxWindowBase *m_window;
-
- // visibility count: the caret is visible only if it's positive
- int m_countVisible;
-
-private:
- DECLARE_NO_COPY_CLASS(wxCaretBase)
-};
-
-// ---------------------------------------------------------------------------
-// now include the real thing
-// ---------------------------------------------------------------------------
-
-#if defined(__WXMSW__)
- #include "wx/msw/caret.h"
-#else
- #include "wx/generic/caret.h"
-#endif // platform
-
-// ----------------------------------------------------------------------------
-// wxCaretSuspend: a simple class which hides the caret in its ctor and
-// restores it in the dtor, this should be used when drawing on the screen to
-// avoid overdrawing the caret
-// ----------------------------------------------------------------------------
-
-#ifdef wxHAS_CARET_USING_OVERLAYS
-
-// we don't need to hide the caret if it's rendered using overlays
-class WXDLLEXPORT wxCaretSuspend
-{
-public:
- wxCaretSuspend(wxWindow *WXUNUSED(win)) {}
-
- DECLARE_NO_COPY_CLASS(wxCaretSuspend)
-};
-
-#else // !wxHAS_CARET_USING_OVERLAYS
-
-class WXDLLEXPORT wxCaretSuspend
-{
-public:
- wxCaretSuspend(wxWindow *win)
- {
- m_caret = win->GetCaret();
- m_show = false;
- if ( m_caret && m_caret->IsVisible() )
- {
- m_caret->Hide();
- m_show = true;
- }
- }
-
- ~wxCaretSuspend()
- {
- if ( m_caret && m_show )
- m_caret->Show();
- }
-
-private:
- wxCaret *m_caret;
- bool m_show;
-
- DECLARE_NO_COPY_CLASS(wxCaretSuspend)
-};
-
-#endif // wxHAS_CARET_USING_OVERLAYS/!wxHAS_CARET_USING_OVERLAYS
-
-#endif // wxUSE_CARET
-
-#endif // _WX_CARET_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/checkbox.h b/desmume/src/windows/wx/include/wx/checkbox.h
deleted file mode 100644
index 3d76b4a19..000000000
--- a/desmume/src/windows/wx/include/wx/checkbox.h
+++ /dev/null
@@ -1,156 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/checkbox.h
-// Purpose: wxCheckBox class interface
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 07.09.00
-// RCS-ID: $Id: checkbox.h 39901 2006-06-30 10:51:44Z VS $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CHECKBOX_H_BASE_
-#define _WX_CHECKBOX_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_CHECKBOX
-
-#include "wx/control.h"
-
-
-/*
- * wxCheckBox style flags
- * (Using wxCHK_* because wxCB_* is used by wxComboBox).
- * Determine whether to use a 3-state or 2-state
- * checkbox. 3-state enables to differentiate
- * between 'unchecked', 'checked' and 'undetermined'.
- */
-#define wxCHK_2STATE 0x0000
-#define wxCHK_3STATE 0x1000
-
-/*
- * If this style is set the user can set the checkbox to the
- * undetermined state. If not set the undetermined set can only
- * be set programmatically.
- * This style can only be used with 3 state checkboxes.
- */
-#define wxCHK_ALLOW_3RD_STATE_FOR_USER 0x2000
-
-/*
- * The possible states of a 3-state checkbox (Compatible
- * with the 2-state checkbox).
- */
-enum wxCheckBoxState
-{
- wxCHK_UNCHECKED,
- wxCHK_CHECKED,
- wxCHK_UNDETERMINED /* 3-state checkbox only */
-};
-
-
-extern WXDLLEXPORT_DATA(const wxChar) wxCheckBoxNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxCheckBox: a control which shows a label and a box which may be checked
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxCheckBoxBase : public wxControl
-{
-public:
- wxCheckBoxBase() { }
-
- // set/get the checked status of the listbox
- virtual void SetValue(bool value) = 0;
- virtual bool GetValue() const = 0;
-
- bool IsChecked() const
- {
- wxASSERT_MSG( !Is3State(), wxT("Calling IsChecked() doesn't make sense for")
- wxT(" a three state checkbox, Use Get3StateValue() instead") );
-
- return GetValue();
- }
-
- wxCheckBoxState Get3StateValue() const
- {
- wxCheckBoxState state = DoGet3StateValue();
-
- if ( state == wxCHK_UNDETERMINED && !Is3State() )
- {
- // Undetermined state with a 2-state checkbox??
- wxFAIL_MSG( wxT("DoGet3StateValue() says the 2-state checkbox is ")
- wxT("in an undetermined/third state") );
-
- state = wxCHK_UNCHECKED;
- }
-
- return state;
- }
-
- void Set3StateValue(wxCheckBoxState state)
- {
- if ( state == wxCHK_UNDETERMINED && !Is3State() )
- {
- wxFAIL_MSG(wxT("Setting a 2-state checkbox to undetermined state"));
- state = wxCHK_UNCHECKED;
- }
-
- DoSet3StateValue(state);
- }
-
- bool Is3State() const { return HasFlag(wxCHK_3STATE); }
-
- bool Is3rdStateAllowedForUser() const
- {
- return HasFlag(wxCHK_ALLOW_3RD_STATE_FOR_USER);
- }
-
- virtual bool HasTransparentBackground() { return true; }
-
- // wxCheckBox-specific processing after processing the update event
- virtual void DoUpdateWindowUI(wxUpdateUIEvent& event)
- {
- wxControl::DoUpdateWindowUI(event);
-
- if ( event.GetSetChecked() )
- SetValue(event.GetChecked());
- }
-
-protected:
- virtual void DoSet3StateValue(wxCheckBoxState WXUNUSED(state)) { wxFAIL; }
-
- virtual wxCheckBoxState DoGet3StateValue() const
- {
- wxFAIL;
- return wxCHK_UNCHECKED;
- }
-
-private:
- DECLARE_NO_COPY_CLASS(wxCheckBoxBase)
-};
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/checkbox.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/checkbox.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/checkbox.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/checkbox.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/checkbox.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/checkbox.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/checkbox.h"
-#elif defined(__WXPM__)
- #include "wx/os2/checkbox.h"
-#elif defined(__WXPALMOS__)
- #include "wx/palmos/checkbox.h"
-#endif
-
-#endif // wxUSE_CHECKBOX
-
-#endif
- // _WX_CHECKBOX_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/checklst.h b/desmume/src/windows/wx/include/wx/checklst.h
deleted file mode 100644
index b83c8536f..000000000
--- a/desmume/src/windows/wx/include/wx/checklst.h
+++ /dev/null
@@ -1,64 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/checklst.h
-// Purpose: wxCheckListBox class interface
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 12.09.00
-// RCS-ID: $Id: checklst.h 38319 2006-03-23 22:05:23Z VZ $
-// Copyright: (c) Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CHECKLST_H_BASE_
-#define _WX_CHECKLST_H_BASE_
-
-#if wxUSE_CHECKLISTBOX
-
-#include "wx/listbox.h"
-
-// ----------------------------------------------------------------------------
-// wxCheckListBox: a listbox whose items may be checked
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxCheckListBoxBase : public
- #ifdef __WXWINCE__
- // keep virtuals synchronised
- wxListBoxBase
- #else
- wxListBox
- #endif
-{
-public:
- wxCheckListBoxBase() { }
-
- // check list box specific methods
- virtual bool IsChecked(unsigned int item) const = 0;
- virtual void Check(unsigned int item, bool check = true) = 0;
-
- DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
-};
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/checklst.h"
-#elif defined(__WXWINCE__)
- #include "wx/msw/wince/checklst.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/checklst.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/checklst.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/checklst.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/checklst.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/checklst.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/checklst.h"
-#elif defined(__WXPM__)
- #include "wx/os2/checklst.h"
-#endif
-
-#endif // wxUSE_CHECKLISTBOX
-
-#endif
- // _WX_CHECKLST_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/chkconf.h b/desmume/src/windows/wx/include/wx/chkconf.h
deleted file mode 100644
index e0717b9d5..000000000
--- a/desmume/src/windows/wx/include/wx/chkconf.h
+++ /dev/null
@@ -1,1871 +0,0 @@
-/*
- * Name: wx/chkconf.h
- * Purpose: check the config settings for consistency
- * Author: Vadim Zeitlin
- * Modified by:
- * Created: 09.08.00
- * RCS-ID: $Id: chkconf.h 48113 2007-08-15 17:43:50Z DE $
- * Copyright: (c) 2000 Vadim Zeitlin
- * Licence: wxWindows licence
- */
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-/*
- Platform-specific checking.
- */
-
-#if defined(__WXPALMOS__)
-# include "wx/palmos/chkconf.h"
-#elif defined(__WXWINCE__)
-# include "wx/msw/wince/chkconf.h"
-#elif defined(__WXMSW__)
-# include "wx/msw/chkconf.h"
-#elif defined(__WXMAC__)
-# include "wx/mac/chkconf.h"
-#elif defined(__OS2__)
-# include "wx/os2/chkconf.h"
-#elif defined(__WXMGL__)
-# include "wx/mgl/chkconf.h"
-#elif defined(__WXDFB__)
-# include "wx/dfb/chkconf.h"
-#elif defined(__WXMOTIF__)
-# include "wx/motif/chkconf.h"
-#elif defined(__WXX11__)
-# include "wx/x11/chkconf.h"
-#endif
-
-#ifdef __WXUNIVERSAL__
-# include "wx/univ/chkconf.h"
-#endif
-
-/*
- this global setting determines what should we do if the setting FOO
- requires BAR and BAR is not set: we can either silently unset FOO as well
- (do this if you're trying to build the smallest possible library) or give an
- error and abort (default as leads to least surprizing behaviour)
- */
-#define wxABORT_ON_CONFIG_ERROR
-
-/*
- global features
- */
-
-/* GUI build by default */
-#if !defined(wxUSE_GUI)
-# define wxUSE_GUI 1
-#endif /* !defined(wxUSE_GUI) */
-
-/* Turn off wxUSE_ABI_INCOMPATIBLE_FEATURES if not specified. */
-#if !defined(wxUSE_ABI_INCOMPATIBLE_FEATURES)
-# define wxUSE_ABI_INCOMPATIBLE_FEATURES 0
-#endif /* !defined(wxUSE_ABI_INCOMPATIBLE_FEATURES) */
-
-/*
- If we're compiling without support for threads/exceptions we have to
- disable the corresponding features.
- */
-#ifdef wxNO_THREADS
-# undef wxUSE_THREADS
-# define wxUSE_THREADS 0
-#endif /* wxNO_THREADS */
-
-#ifdef wxNO_EXCEPTIONS
-# undef wxUSE_EXCEPTIONS
-# define wxUSE_EXCEPTIONS 0
-#endif /* wxNO_EXCEPTIONS */
-
-/* we also must disable exceptions if compiler doesn't support them */
-#if defined(_MSC_VER) && !defined(_CPPUNWIND)
-# undef wxUSE_EXCEPTIONS
-# define wxUSE_EXCEPTIONS 0
-#endif /* VC++ without exceptions support */
-
-
-/*
- tests for non GUI features
-
- please keep the options in alphabetical order!
- */
-
-#ifndef wxUSE_CRASHREPORT
- /* this one is special: as currently it is Windows-only, don't force it
- to be defined on other platforms */
-# if defined(wxABORT_ON_CONFIG_ERROR) && defined(__WXMSW__)
-# error "wxUSE_CRASHREPORT must be defined."
-# else
-# define wxUSE_CRASHREPORT 0
-# endif
-#endif /* !defined(wxUSE_CRASHREPORT) */
-
-#ifndef wxUSE_DYNLIB_CLASS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DYNLIB_CLASS must be defined."
-# else
-# define wxUSE_DYNLIB_CLASS 0
-# endif
-#endif /* !defined(wxUSE_DYNLIB_CLASS) */
-
-#ifndef wxUSE_EXCEPTIONS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_EXCEPTIONS must be defined."
-# else
-# define wxUSE_EXCEPTIONS 0
-# endif
-#endif /* !defined(wxUSE_EXCEPTIONS) */
-
-#ifndef wxUSE_FILESYSTEM
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILESYSTEM must be defined."
-# else
-# define wxUSE_FILESYSTEM 0
-# endif
-#endif /* !defined(wxUSE_FILESYSTEM) */
-
-#ifndef wxUSE_FS_ARCHIVE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FS_ARCHIVE must be defined."
-# else
-# define wxUSE_FS_ARCHIVE 0
-# endif
-#endif /* !defined(wxUSE_FS_ARCHIVE) */
-
-/* don't give an error about this one yet, it's not fully implemented */
-#ifndef wxUSE_FSVOLUME
-# define wxUSE_FSVOLUME 0
-#endif /* !defined(wxUSE_FSVOLUME) */
-
-#ifndef wxUSE_DYNAMIC_LOADER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DYNAMIC_LOADER must be defined."
-# else
-# define wxUSE_DYNAMIC_LOADER 0
-# endif
-#endif /* !defined(wxUSE_DYNAMIC_LOADER) */
-
-#ifndef wxUSE_LOG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOG must be defined."
-# else
-# define wxUSE_LOG 0
-# endif
-#endif /* !defined(wxUSE_LOG) */
-
-#ifndef wxUSE_LONGLONG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LONGLONG must be defined."
-# else
-# define wxUSE_LONGLONG 0
-# endif
-#endif /* !defined(wxUSE_LONGLONG) */
-
-#ifndef wxUSE_MIMETYPE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MIMETYPE must be defined."
-# else
-# define wxUSE_MIMETYPE 0
-# endif
-#endif /* !defined(wxUSE_MIMETYPE) */
-
-#ifndef wxUSE_ON_FATAL_EXCEPTION
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ON_FATAL_EXCEPTION must be defined."
-# else
-# define wxUSE_ON_FATAL_EXCEPTION 0
-# endif
-#endif /* !defined(wxUSE_ON_FATAL_EXCEPTION) */
-
-#ifndef wxUSE_PRINTF_POS_PARAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PRINTF_POS_PARAMS must be defined."
-# else
-# define wxUSE_PRINTF_POS_PARAMS 0
-# endif
-#endif /* !defined(wxUSE_PRINTF_POS_PARAMS) */
-
-#ifndef wxUSE_PROTOCOL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL must be defined."
-# else
-# define wxUSE_PROTOCOL 0
-# endif
-#endif /* !defined(wxUSE_PROTOCOL) */
-
-/* we may not define wxUSE_PROTOCOL_XXX if wxUSE_PROTOCOL is set to 0 */
-#if !wxUSE_PROTOCOL
-# undef wxUSE_PROTOCOL_HTTP
-# undef wxUSE_PROTOCOL_FTP
-# undef wxUSE_PROTOCOL_FILE
-# define wxUSE_PROTOCOL_HTTP 0
-# define wxUSE_PROTOCOL_FTP 0
-# define wxUSE_PROTOCOL_FILE 0
-#endif /* wxUSE_PROTOCOL */
-
-#ifndef wxUSE_PROTOCOL_HTTP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_HTTP must be defined."
-# else
-# define wxUSE_PROTOCOL_HTTP 0
-# endif
-#endif /* !defined(wxUSE_PROTOCOL_HTTP) */
-
-#ifndef wxUSE_PROTOCOL_FTP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_FTP must be defined."
-# else
-# define wxUSE_PROTOCOL_FTP 0
-# endif
-#endif /* !defined(wxUSE_PROTOCOL_FTP) */
-
-#ifndef wxUSE_PROTOCOL_FILE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_FILE must be defined."
-# else
-# define wxUSE_PROTOCOL_FILE 0
-# endif
-#endif /* !defined(wxUSE_PROTOCOL_FILE) */
-
-#ifndef wxUSE_REGEX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_REGEX must be defined."
-# else
-# define wxUSE_REGEX 0
-# endif
-#endif /* !defined(wxUSE_REGEX) */
-
-#ifndef wxUSE_STDPATHS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STDPATHS must be defined."
-# else
-# define wxUSE_STDPATHS 1
-# endif
-#endif /* !defined(wxUSE_STDPATHS) */
-
-#ifndef wxUSE_XML
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XML must be defined."
-# else
-# define wxUSE_XML 0
-# endif
-#endif /* !defined(wxUSE_XML) */
-
-#ifndef wxUSE_SOCKETS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SOCKETS must be defined."
-# else
-# define wxUSE_SOCKETS 0
-# endif
-#endif /* !defined(wxUSE_SOCKETS) */
-
-#ifndef wxUSE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STREAMS must be defined."
-# else
-# define wxUSE_STREAMS 0
-# endif
-#endif /* !defined(wxUSE_STREAMS) */
-
-#ifndef wxUSE_STOPWATCH
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STOPWATCH must be defined."
-# else
-# define wxUSE_STOPWATCH 0
-# endif
-#endif /* !defined(wxUSE_STOPWATCH) */
-
-#ifndef wxUSE_TEXTBUFFER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTBUFFER must be defined."
-# else
-# define wxUSE_TEXTBUFFER 0
-# endif
-#endif /* !defined(wxUSE_TEXTBUFFER) */
-
-#ifndef wxUSE_TEXTFILE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTFILE must be defined."
-# else
-# define wxUSE_TEXTFILE 0
-# endif
-#endif /* !defined(wxUSE_TEXTFILE) */
-
-#ifndef wxUSE_UNICODE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_UNICODE must be defined."
-# else
-# define wxUSE_UNICODE 0
-# endif
-#endif /* !defined(wxUSE_UNICODE) */
-
-#ifndef wxUSE_URL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_URL must be defined."
-# else
-# define wxUSE_URL 0
-# endif
-#endif /* !defined(wxUSE_URL) */
-
-#ifndef wxUSE_VARIANT
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_VARIANT must be defined."
-# else
-# define wxUSE_VARIANT 0
-# endif
-#endif /* wxUSE_VARIANT */
-
-/*
- all these tests are for GUI only
-
- please keep the options in alphabetical order!
- */
-#if wxUSE_GUI
-
-/*
- all of the settings tested below must be defined or we'd get an error from
- preprocessor about invalid integer expression
- */
-
-#ifndef wxUSE_ABOUTDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ABOUTDLG must be defined."
-# else
-# define wxUSE_ABOUTDLG 0
-# endif
-#endif /* !defined(wxUSE_ABOUTDLG) */
-
-#ifndef wxUSE_ACCEL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ACCEL must be defined."
-# else
-# define wxUSE_ACCEL 0
-# endif
-#endif /* !defined(wxUSE_ACCEL) */
-
-#ifndef wxUSE_ANIMATIONCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ANIMATIONCTRL must be defined."
-# else
-# define wxUSE_ANIMATIONCTRL 0
-# endif
-#endif /* !defined(wxUSE_ANIMATIONCTRL) */
-
-#ifndef wxUSE_BITMAPCOMBOBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BITMAPCOMBOBOX must be defined."
-# else
-# define wxUSE_BITMAPCOMBOBOX 0
-# endif
-#endif /* !defined(wxUSE_BITMAPCOMBOBOX) */
-
-#ifndef wxUSE_BMPBUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BMPBUTTON must be defined."
-# else
-# define wxUSE_BMPBUTTON 0
-# endif
-#endif /* !defined(wxUSE_BMPBUTTON) */
-
-#ifndef wxUSE_BUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BUTTON must be defined."
-# else
-# define wxUSE_BUTTON 0
-# endif
-#endif /* !defined(wxUSE_BUTTON) */
-
-#ifndef wxUSE_CALENDARCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CALENDARCTRL must be defined."
-# else
-# define wxUSE_CALENDARCTRL 0
-# endif
-#endif /* !defined(wxUSE_CALENDARCTRL) */
-
-#ifndef wxUSE_CARET
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CARET must be defined."
-# else
-# define wxUSE_CARET 0
-# endif
-#endif /* !defined(wxUSE_CARET) */
-
-#ifndef wxUSE_CHECKBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHECKBOX must be defined."
-# else
-# define wxUSE_CHECKBOX 0
-# endif
-#endif /* !defined(wxUSE_CHECKBOX) */
-
-#ifndef wxUSE_CHECKLISTBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHECKLISTBOX must be defined."
-# else
-# define wxUSE_CHECKLISTBOX 0
-# endif
-#endif /* !defined(wxUSE_CHECKLISTBOX) */
-
-#ifndef wxUSE_CHOICE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHOICE must be defined."
-# else
-# define wxUSE_CHOICE 0
-# endif
-#endif /* !defined(wxUSE_CHOICE) */
-
-#ifndef wxUSE_CHOICEBOOK
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHOICEBOOK must be defined."
-# else
-# define wxUSE_CHOICEBOOK 0
-# endif
-#endif /* !defined(wxUSE_CHOICEBOOK) */
-
-#ifndef wxUSE_CHOICEDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CHOICEDLG must be defined."
-# else
-# define wxUSE_CHOICEDLG 0
-# endif
-#endif /* !defined(wxUSE_CHOICEDLG) */
-
-#ifndef wxUSE_CLIPBOARD
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CLIPBOARD must be defined."
-# else
-# define wxUSE_CLIPBOARD 0
-# endif
-#endif /* !defined(wxUSE_CLIPBOARD) */
-
-#ifndef wxUSE_COLLPANE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLLPANE must be defined."
-# else
-# define wxUSE_COLLPANE 0
-# endif
-#endif /* !defined(wxUSE_COLLPANE) */
-
-#ifndef wxUSE_COLOURDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLOURDLG must be defined."
-# else
-# define wxUSE_COLOURDLG 0
-# endif
-#endif /* !defined(wxUSE_COLOURDLG) */
-
-#ifndef wxUSE_COLOURPICKERCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLOURPICKERCTRL must be defined."
-# else
-# define wxUSE_COLOURPICKERCTRL 0
-# endif
-#endif /* !defined(wxUSE_COLOURPICKERCTRL) */
-
-#ifndef wxUSE_COMBOBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMBOBOX must be defined."
-# else
-# define wxUSE_COMBOBOX 0
-# endif
-#endif /* !defined(wxUSE_COMBOBOX) */
-
-#ifndef wxUSE_COMBOCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COMBOCTRL must be defined."
-# else
-# define wxUSE_COMBOCTRL 0
-# endif
-#endif /* !defined(wxUSE_COMBOCTRL) */
-
-#ifndef wxUSE_DATAOBJ
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DATAOBJ must be defined."
-# else
-# define wxUSE_DATAOBJ 0
-# endif
-#endif /* !defined(wxUSE_DATAOBJ) */
-
-#ifndef wxUSE_DATAVIEWCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DATAVIEWCTRL must be defined."
-# else
-# define wxUSE_DATAVIEWCTRL 0
-# endif
-#endif /* !defined(wxUSE_DATAVIEWCTRL) */
-
-#ifndef wxUSE_DATEPICKCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DATEPICKCTRL must be defined."
-# else
-# define wxUSE_DATEPICKCTRL 0
-# endif
-#endif /* !defined(wxUSE_DATEPICKCTRL) */
-
-#ifndef wxUSE_DIRPICKERCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DIRPICKERCTRL must be defined."
-# else
-# define wxUSE_DIRPICKERCTRL 0
-# endif
-#endif /* !defined(wxUSE_DIRPICKERCTRL) */
-
-#ifndef wxUSE_DISPLAY
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DISPLAY must be defined."
-# else
-# define wxUSE_DISPLAY 0
-# endif
-#endif /* !defined(wxUSE_DISPLAY) */
-
-#ifndef wxUSE_DOC_VIEW_ARCHITECTURE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
-# else
-# define wxUSE_DOC_VIEW_ARCHITECTURE 0
-# endif
-#endif /* !defined(wxUSE_DOC_VIEW_ARCHITECTURE) */
-
-#ifndef wxUSE_FILEDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILEDLG must be defined."
-# else
-# define wxUSE_FILEDLG 0
-# endif
-#endif /* !defined(wxUSE_FILEDLG) */
-
-#ifndef wxUSE_FILEPICKERCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILEPICKERCTRL must be defined."
-# else
-# define wxUSE_FILEPICKERCTRL 0
-# endif
-#endif /* !defined(wxUSE_FILEPICKERCTRL) */
-
-#ifndef wxUSE_FONTDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FONTDLG must be defined."
-# else
-# define wxUSE_FONTDLG 0
-# endif
-#endif /* !defined(wxUSE_FONTDLG) */
-
-#ifndef wxUSE_FONTMAP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FONTMAP must be defined."
-# else
-# define wxUSE_FONTMAP 0
-# endif
-#endif /* !defined(wxUSE_FONTMAP) */
-
-#ifndef wxUSE_FONTPICKERCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FONTPICKERCTRL must be defined."
-# else
-# define wxUSE_FONTPICKERCTRL 0
-# endif
-#endif /* !defined(wxUSE_FONTPICKERCTRL) */
-
-#ifndef wxUSE_GAUGE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GAUGE must be defined."
-# else
-# define wxUSE_GAUGE 0
-# endif
-#endif /* !defined(wxUSE_GAUGE) */
-
-#ifndef wxUSE_GRAPHICS_CONTEXT
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GRAPHICS_CONTEXT must be defined."
-# else
-# define wxUSE_GRAPHICS_CONTEXT 0
-# endif
-#endif /* !defined(wxUSE_GRAPHICS_CONTEXT) */
-
-
-#ifndef wxUSE_GRID
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GRID must be defined."
-# else
-# define wxUSE_GRID 0
-# endif
-#endif /* !defined(wxUSE_GRID) */
-
-#ifndef wxUSE_HELP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HELP must be defined."
-# else
-# define wxUSE_HELP 0
-# endif
-#endif /* !defined(wxUSE_HELP) */
-
-#ifndef wxUSE_HYPERLINKCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HYPERLINKCTRL must be defined."
-# else
-# define wxUSE_HYPERLINKCTRL 0
-# endif
-#endif /* !defined(wxUSE_HYPERLINKCTRL) */
-
-#ifndef wxUSE_HTML
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HTML must be defined."
-# else
-# define wxUSE_HTML 0
-# endif
-#endif /* !defined(wxUSE_HTML) */
-
-#ifndef wxUSE_LIBMSPACK
-# ifndef __UNIX__
- /* set to 0 on platforms that don't have libmspack */
-# define wxUSE_LIBMSPACK 0
-# else
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LIBMSPACK must be defined."
-# else
-# define wxUSE_LIBMSPACK 0
-# endif
-# endif
-#endif /* !defined(wxUSE_LIBMSPACK) */
-
-#ifndef wxUSE_ICO_CUR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ICO_CUR must be defined."
-# else
-# define wxUSE_ICO_CUR 0
-# endif
-#endif /* !defined(wxUSE_ICO_CUR) */
-
-#ifndef wxUSE_IFF
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_IFF must be defined."
-# else
-# define wxUSE_IFF 0
-# endif
-#endif /* !defined(wxUSE_IFF) */
-
-#ifndef wxUSE_IMAGLIST
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_IMAGLIST must be defined."
-# else
-# define wxUSE_IMAGLIST 0
-# endif
-#endif /* !defined(wxUSE_IMAGLIST) */
-
-#ifndef wxUSE_JOYSTICK
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_JOYSTICK must be defined."
-# else
-# define wxUSE_JOYSTICK 0
-# endif
-#endif /* !defined(wxUSE_JOYSTICK) */
-
-#ifndef wxUSE_LISTBOOK
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LISTBOOK must be defined."
-# else
-# define wxUSE_LISTBOOK 0
-# endif
-#endif /* !defined(wxUSE_LISTBOOK) */
-
-#ifndef wxUSE_LISTBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LISTBOX must be defined."
-# else
-# define wxUSE_LISTBOX 0
-# endif
-#endif /* !defined(wxUSE_LISTBOX) */
-
-#ifndef wxUSE_LISTCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LISTCTRL must be defined."
-# else
-# define wxUSE_LISTCTRL 0
-# endif
-#endif /* !defined(wxUSE_LISTCTRL) */
-
-#ifndef wxUSE_LOGGUI
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOGGUI must be defined."
-# else
-# define wxUSE_LOGGUI 0
-# endif
-#endif /* !defined(wxUSE_LOGGUI) */
-
-#ifndef wxUSE_LOGWINDOW
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOGWINDOW must be defined."
-# else
-# define wxUSE_LOGWINDOW 0
-# endif
-#endif /* !defined(wxUSE_LOGWINDOW) */
-
-#ifndef wxUSE_LOG_DIALOG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOG_DIALOG must be defined."
-# else
-# define wxUSE_LOG_DIALOG 0
-# endif
-#endif /* !defined(wxUSE_LOG_DIALOG) */
-
-#ifndef wxUSE_MDI
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MDI must be defined."
-# else
-# define wxUSE_MDI 0
-# endif
-#endif /* !defined(wxUSE_MDI) */
-
-#ifndef wxUSE_MDI_ARCHITECTURE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MDI_ARCHITECTURE must be defined."
-# else
-# define wxUSE_MDI_ARCHITECTURE 0
-# endif
-#endif /* !defined(wxUSE_MDI_ARCHITECTURE) */
-
-#ifndef wxUSE_MENUS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MENUS must be defined."
-# else
-# define wxUSE_MENUS 0
-# endif
-#endif /* !defined(wxUSE_MENUS) */
-
-#ifndef wxUSE_MSGDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MSGDLG must be defined."
-# else
-# define wxUSE_MSGDLG 0
-# endif
-#endif /* !defined(wxUSE_MSGDLG) */
-
-#ifndef wxUSE_NOTEBOOK
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_NOTEBOOK must be defined."
-# else
-# define wxUSE_NOTEBOOK 0
-# endif
-#endif /* !defined(wxUSE_NOTEBOOK) */
-
-#ifndef wxUSE_ODCOMBOBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ODCOMBOBOX must be defined."
-# else
-# define wxUSE_ODCOMBOBOX 0
-# endif
-#endif /* !defined(wxUSE_ODCOMBOBOX) */
-
-#ifndef wxUSE_PALETTE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PALETTE must be defined."
-# else
-# define wxUSE_PALETTE 0
-# endif
-#endif /* !defined(wxUSE_PALETTE) */
-
-#ifndef wxUSE_POPUPWIN
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_POPUPWIN must be defined."
-# else
-# define wxUSE_POPUPWIN 0
-# endif
-#endif /* !defined(wxUSE_POPUPWIN) */
-
-#ifndef wxUSE_PRINTING_ARCHITECTURE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PRINTING_ARCHITECTURE must be defined."
-# else
-# define wxUSE_PRINTING_ARCHITECTURE 0
-# endif
-#endif /* !defined(wxUSE_PRINTING_ARCHITECTURE) */
-
-#ifndef wxUSE_RADIOBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RADIOBOX must be defined."
-# else
-# define wxUSE_RADIOBOX 0
-# endif
-#endif /* !defined(wxUSE_RADIOBOX) */
-
-#ifndef wxUSE_RADIOBTN
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RADIOBTN must be defined."
-# else
-# define wxUSE_RADIOBTN 0
-# endif
-#endif /* !defined(wxUSE_RADIOBTN) */
-
-#ifndef wxUSE_SASH
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SASH must be defined."
-# else
-# define wxUSE_SASH 0
-# endif
-#endif /* !defined(wxUSE_SASH) */
-
-#ifndef wxUSE_SCROLLBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SCROLLBAR must be defined."
-# else
-# define wxUSE_SCROLLBAR 0
-# endif
-#endif /* !defined(wxUSE_SCROLLBAR) */
-
-#ifndef wxUSE_SLIDER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SLIDER must be defined."
-# else
-# define wxUSE_SLIDER 0
-# endif
-#endif /* !defined(wxUSE_SLIDER) */
-
-#ifndef wxUSE_SOUND
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SOUND must be defined."
-# else
-# define wxUSE_SOUND 0
-# endif
-#endif /* !defined(wxUSE_SOUND) */
-
-#ifndef wxUSE_SPINBTN
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPINBTN must be defined."
-# else
-# define wxUSE_SPINBTN 0
-# endif
-#endif /* !defined(wxUSE_SPINBTN) */
-
-#ifndef wxUSE_SPINCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPINCTRL must be defined."
-# else
-# define wxUSE_SPINCTRL 0
-# endif
-#endif /* !defined(wxUSE_SPINCTRL) */
-
-#ifndef wxUSE_SPLASH
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPLASH must be defined."
-# else
-# define wxUSE_SPLASH 0
-# endif
-#endif /* !defined(wxUSE_SPLASH) */
-
-#ifndef wxUSE_SPLITTER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SPLITTER must be defined."
-# else
-# define wxUSE_SPLITTER 0
-# endif
-#endif /* !defined(wxUSE_SPLITTER) */
-
-#ifndef wxUSE_STATBMP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATBMP must be defined."
-# else
-# define wxUSE_STATBMP 0
-# endif
-#endif /* !defined(wxUSE_STATBMP) */
-
-#ifndef wxUSE_STATBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATBOX must be defined."
-# else
-# define wxUSE_STATBOX 0
-# endif
-#endif /* !defined(wxUSE_STATBOX) */
-
-#ifndef wxUSE_STATLINE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATLINE must be defined."
-# else
-# define wxUSE_STATLINE 0
-# endif
-#endif /* !defined(wxUSE_STATLINE) */
-
-#ifndef wxUSE_STATTEXT
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATTEXT must be defined."
-# else
-# define wxUSE_STATTEXT 0
-# endif
-#endif /* !defined(wxUSE_STATTEXT) */
-
-#ifndef wxUSE_STATUSBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STATUSBAR must be defined."
-# else
-# define wxUSE_STATUSBAR 0
-# endif
-#endif /* !defined(wxUSE_STATUSBAR) */
-
-#ifndef wxUSE_TAB_DIALOG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TAB_DIALOG must be defined."
-# else
-# define wxUSE_TAB_DIALOG 0
-# endif
-#endif /* !defined(wxUSE_TAB_DIALOG) */
-
-#ifndef wxUSE_TEXTCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTCTRL must be defined."
-# else
-# define wxUSE_TEXTCTRL 0
-# endif
-#endif /* !defined(wxUSE_TEXTCTRL) */
-
-#ifndef wxUSE_TIPWINDOW
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TIPWINDOW must be defined."
-# else
-# define wxUSE_TIPWINDOW 0
-# endif
-#endif /* !defined(wxUSE_TIPWINDOW) */
-
-#ifndef wxUSE_TOOLBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TOOLBAR must be defined."
-# else
-# define wxUSE_TOOLBAR 0
-# endif
-#endif /* !defined(wxUSE_TOOLBAR) */
-
-#ifndef wxUSE_TOOLTIPS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TOOLTIPS must be defined."
-# else
-# define wxUSE_TOOLTIPS 0
-# endif
-#endif /* !defined(wxUSE_TOOLTIPS) */
-
-#ifndef wxUSE_TREECTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TREECTRL must be defined."
-# else
-# define wxUSE_TREECTRL 0
-# endif
-#endif /* !defined(wxUSE_TREECTRL) */
-
-#ifndef wxUSE_VALIDATORS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_VALIDATORS must be defined."
-# else
-# define wxUSE_VALIDATORS 0
-# endif
-#endif /* !defined(wxUSE_VALIDATORS) */
-
-#ifndef wxUSE_WXHTML_HELP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_WXHTML_HELP must be defined."
-# else
-# define wxUSE_WXHTML_HELP 0
-# endif
-#endif /* !defined(wxUSE_WXHTML_HELP) */
-
-#ifndef wxUSE_XRC
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XRC must be defined."
-# else
-# define wxUSE_XRC 0
-# endif
-#endif /* !defined(wxUSE_XRC) */
-
-#endif /* wxUSE_GUI */
-
-/*
- check consistency of the settings
- */
-
-#if WXWIN_COMPATIBILITY_2_4
-# if !WXWIN_COMPATIBILITY_2_6
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "2.4.X compatibility requires 2.6.X compatibility"
-# else
-# undef WXWIN_COMPATIBILITY_2_6
-# define WXWIN_COMPATIBILITY_2_6 1
-# endif
-# endif
-#endif /* WXWIN_COMPATIBILITY_2_4 */
-
-#if wxUSE_ARCHIVE_STREAMS
-# if !wxUSE_DATETIME
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxArchive requires wxUSE_DATETIME"
-# else
-# undef wxUSE_ARCHIVE_STREAMS
-# define wxUSE_ARCHIVE_STREAMS 0
-# endif
-# endif
-#endif /* wxUSE_ARCHIVE_STREAMS */
-
-#if wxUSE_CRASHREPORT && !wxUSE_ON_FATAL_EXCEPTION
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CRASHREPORT requires wxUSE_ON_FATAL_EXCEPTION"
-# else
-# undef wxUSE_CRASHREPORT
-# define wxUSE_CRASHREPORT 0
-# endif
-#endif /* wxUSE_CRASHREPORT */
-
-#if wxUSE_PROTOCOL_FILE || wxUSE_PROTOCOL_FTP || wxUSE_PROTOCOL_HTTP
-# if !wxUSE_PROTOCOL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_XXX requires wxUSE_PROTOCOL"
-# else
-# undef wxUSE_PROTOCOL
-# define wxUSE_PROTOCOL 1
-# endif
-# endif
-#endif /* wxUSE_PROTOCOL_XXX */
-
-#if wxUSE_URL
-# if !wxUSE_PROTOCOL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_URL requires wxUSE_PROTOCOL"
-# else
-# undef wxUSE_PROTOCOL
-# define wxUSE_PROTOCOL 1
-# endif
-# endif
-#endif /* wxUSE_URL */
-
-#if wxUSE_PROTOCOL
-# if !wxUSE_SOCKETS
-# if wxUSE_PROTOCOL_HTTP || wxUSE_PROTOCOL_FTP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL_FTP/HTTP requires wxUSE_SOCKETS"
-# else
-# undef wxUSE_SOCKETS
-# define wxUSE_SOCKETS 1
-# endif
-# endif
-# endif
-
-# if !wxUSE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PROTOCOL requires wxUSE_STREAMS"
-# else
-# undef wxUSE_STREAMS
-# define wxUSE_STREAMS 1
-# endif
-# endif
-#endif /* wxUSE_PROTOCOL */
-
-/* have to test for wxUSE_HTML before wxUSE_FILESYSTEM */
-#if wxUSE_HTML
-# if !wxUSE_FILESYSTEM
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxHTML requires wxFileSystem"
-# else
-# undef wxUSE_FILESYSTEM
-# define wxUSE_FILESYSTEM 1
-# endif
-# endif
-#endif /* wxUSE_HTML */
-
-#if wxUSE_FS_ARCHIVE
-# if !wxUSE_FILESYSTEM
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxArchiveFSHandler requires wxFileSystem"
-# else
-# undef wxUSE_FILESYSTEM
-# define wxUSE_FILESYSTEM 1
-# endif
-# endif
-# if !wxUSE_ARCHIVE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxArchiveFSHandler requires wxArchive"
-# else
-# undef wxUSE_ARCHIVE_STREAMS
-# define wxUSE_ARCHIVE_STREAMS 1
-# endif
-# endif
-#endif /* wxUSE_FS_ARCHIVE */
-
-#if wxUSE_FILESYSTEM
-# if !wxUSE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILESYSTEM requires wxUSE_STREAMS"
-# else
-# undef wxUSE_STREAMS
-# define wxUSE_STREAMS 1
-# endif
-# endif
-# if !wxUSE_FILE && !wxUSE_FFILE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILESYSTEM requires either wxUSE_FILE or wxUSE_FFILE"
-# else
-# undef wxUSE_FILE
-# define wxUSE_FILE 1
-# undef wxUSE_FFILE
-# define wxUSE_FFILE 1
-# endif
-# endif
-#endif /* wxUSE_FILESYSTEM */
-
-#if wxUSE_FS_INET
-# if !wxUSE_PROTOCOL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
-# else
-# undef wxUSE_PROTOCOL
-# define wxUSE_PROTOCOL 1
-# endif
-# endif
-#endif /* wxUSE_FS_INET */
-
-#if wxUSE_STOPWATCH || wxUSE_DATETIME
-# if !wxUSE_LONGLONG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_STOPWATCH and wxUSE_DATETIME require wxUSE_LONGLONG"
-# else
-# undef wxUSE_LONGLONG
-# define wxUSE_LONGLONG 1
-# endif
-# endif
-#endif /* wxUSE_STOPWATCH */
-
-#if wxUSE_MIMETYPE && !wxUSE_TEXTFILE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MIMETYPE requires wxUSE_TEXTFILE"
-# else
-# undef wxUSE_TEXTFILE
-# define wxUSE_TEXTFILE 1
-# endif
-#endif /* wxUSE_MIMETYPE */
-
-#if wxUSE_ODBC
-# if !wxUSE_DATETIME
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxODBC requires wxUSE_DATETIME"
-# else
-# undef wxUSE_ODBC
-# define wxUSE_ODBC 0
-# endif
-# endif
-#endif /* wxUSE_ODBC */
-
-#if wxUSE_TEXTFILE && !wxUSE_TEXTBUFFER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
-# else
-# undef wxUSE_TEXTBUFFER
-# define wxUSE_TEXTBUFFER 1
-# endif
-#endif /* wxUSE_TEXTFILE */
-
-#if wxUSE_TEXTFILE && !wxUSE_FILE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TEXTFILE requires wxUSE_FILE"
-# else
-# undef wxUSE_FILE
-# define wxUSE_FILE 1
-# endif
-#endif /* wxUSE_TEXTFILE */
-
-#if wxUSE_XML && !wxUSE_WCHAR_T
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XML requires wxUSE_WCHAR_T"
-# else
-# undef wxUSE_XML
-# define wxUSE_XML 0
-# endif
-#endif /* wxUSE_XML */
-
-#if !wxUSE_DYNLIB_CLASS
-# if wxUSE_DYNAMIC_LOADER
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DYNAMIC_LOADER requires wxUSE_DYNLIB_CLASS."
-# else
-# define wxUSE_DYNLIB_CLASS 1
-# endif
-# endif
-#endif /* wxUSE_DYNLIB_CLASS */
-
-#if wxUSE_ZIPSTREAM
-# if !wxUSE_ZLIB
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxZip requires wxZlib"
-# else
-# undef wxUSE_ZLIB
-# define wxUSE_ZLIB 1
-# endif
-# endif
-# if !wxUSE_ARCHIVE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxZip requires wxArchive"
-# else
-# undef wxUSE_ARCHIVE_STREAMS
-# define wxUSE_ARCHIVE_STREAMS 1
-# endif
-# endif
-#endif /* wxUSE_ZIPSTREAM */
-
-#if wxUSE_TARSTREAM
- /* wxTar doesn't currently compile without wchar_t */
-# if !wxUSE_WCHAR_T
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxTar requires wchar_t"
-# else
-# undef wxUSE_TARSTREAM
-# define wxUSE_TARSTREAM 0
-# endif
-# endif
-#endif /* wxUSE_TARSTREAM */
-
-#if wxUSE_TARSTREAM
-# if !wxUSE_ARCHIVE_STREAMS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxTar requires wxArchive"
-# else
-# undef wxUSE_ARCHIVE_STREAMS
-# define wxUSE_ARCHIVE_STREAMS 1
-# endif
-# endif
-#endif /* wxUSE_TARSTREAM */
-
-/* the rest of the tests is for the GUI settings only */
-#if wxUSE_GUI
-
-#if wxUSE_BUTTON || \
- wxUSE_CALENDARCTRL || \
- wxUSE_CARET || \
- wxUSE_COMBOBOX || \
- wxUSE_BMPBUTTON || \
- wxUSE_CHECKBOX || \
- wxUSE_CHECKLISTBOX || \
- wxUSE_CHOICE || \
- wxUSE_GAUGE || \
- wxUSE_GRID || \
- wxUSE_LISTBOX || \
- wxUSE_LISTCTRL || \
- wxUSE_NOTEBOOK || \
- wxUSE_RADIOBOX || \
- wxUSE_RADIOBTN || \
- wxUSE_SCROLLBAR || \
- wxUSE_SLIDER || \
- wxUSE_SPINBTN || \
- wxUSE_SPINCTRL || \
- wxUSE_STATBMP || \
- wxUSE_STATBOX || \
- wxUSE_STATLINE || \
- wxUSE_STATTEXT || \
- wxUSE_STATUSBAR || \
- wxUSE_TEXTCTRL || \
- wxUSE_TOOLBAR || \
- wxUSE_TREECTRL
-# if !wxUSE_CONTROLS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_CONTROLS unset but some controls used"
-# else
-# undef wxUSE_CONTROLS
-# define wxUSE_CONTROLS 1
-# endif
-# endif
-#endif /* controls */
-
-#if wxUSE_BMPBUTTON
-# if !wxUSE_BUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BMPBUTTON requires wxUSE_BUTTON"
-# else
-# undef wxUSE_BUTTON
-# define wxUSE_BUTTON 1
-# endif
-# endif
-#endif /* wxUSE_BMPBUTTON */
-
-/*
- wxUSE_BOOKCTRL should be only used if any of the controls deriving from it
- are used
- */
-#ifdef wxUSE_BOOKCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_BOOKCTRL is defined automatically, don't define it"
-# else
-# undef wxUSE_BOOKCTRL
-# endif
-#endif
-
-#define wxUSE_BOOKCTRL (wxUSE_NOTEBOOK || \
- wxUSE_LISTBOOK || \
- wxUSE_CHOICEBOOK || \
- wxUSE_TOOLBOOK || \
- wxUSE_TREEBOOK)
-
-#if wxUSE_COLLPANE
-# if !wxUSE_BUTTON || !wxUSE_STATLINE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_COLLPANE requires wxUSE_BUTTON and wxUSE_STATLINE"
-# else
-# undef wxUSE_COLLPANE
-# define wxUSE_COLLPANE 0
-# endif
-# endif
-#endif /* wxUSE_COLLPANE */
-
-#if wxUSE_LISTBOOK
-# if !wxUSE_LISTCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxListbook requires wxListCtrl"
-# else
-# undef wxUSE_LISTCTRL
-# define wxUSE_LISTCTRL 1
-# endif
-# endif
-#endif /* wxUSE_LISTBOOK */
-
-#if wxUSE_CHOICEBOOK
-# if !wxUSE_CHOICE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxChoicebook requires wxChoice"
-# else
-# undef wxUSE_CHOICE
-# define wxUSE_CHOICE 1
-# endif
-# endif
-#endif /* wxUSE_CHOICEBOOK */
-
-#if wxUSE_TOOLBOOK
-# if !wxUSE_TOOLBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxToolbook requires wxToolBar"
-# else
-# undef wxUSE_TOOLBAR
-# define wxUSE_TOOLBAR 1
-# endif
-# endif
-#endif /* wxUSE_TOOLBOOK */
-
-#if !wxUSE_ODCOMBOBOX
-# if wxUSE_BITMAPCOMBOBOX
-# error "wxBitmapComboBox requires wxOwnerDrawnComboBox"
-# else
-# undef wxUSE_BITMAPCOMBOBOX
-# define wxUSE_BITMAPCOMBOBOX 0
-# endif
-#endif /* !wxUSE_ODCOMBOBOX */
-
-/* don't attempt to use native status bar on the platforms not having it */
-#ifndef wxUSE_NATIVE_STATUSBAR
-# define wxUSE_NATIVE_STATUSBAR 0
-#elif wxUSE_NATIVE_STATUSBAR
-# if defined(__WXUNIVERSAL__) || !( defined(__WXMSW__) || \
- defined(__WXMAC__) || \
- defined(__WXPALMOS__) )
-# undef wxUSE_NATIVE_STATUSBAR
-# define wxUSE_NATIVE_STATUSBAR 0
-# endif
-#endif
-
-#if wxUSE_GRAPHICS_CONTEXT && !wxUSE_GEOMETRY
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GRAPHICS_CONTEXT requires wxUSE_GEOMETRY"
-# else
-# undef wxUSE_GRAPHICS_CONTEXT
-# define wxUSE_GRAPHICS_CONTEXT 0
-# endif
-#endif /* wxUSE_GRAPHICS_CONTEXT */
-
-
-/* wxGTK-specific dependencies */
-#ifdef __WXGTK__
-# ifndef __WXUNIVERSAL__
-# if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "MDI requires wxUSE_MENUS in wxGTK"
-# else
-# undef wxUSE_MENUS
-# define wxUSE_MENUS 1
-# endif
-# endif
-# endif /* !__WXUNIVERSAL__ */
-
-# if wxUSE_JOYSTICK
-# if !wxUSE_THREADS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxJoystick requires threads in wxGTK"
-# else
-# undef wxUSE_JOYSTICK
-# define wxUSE_JOYSTICK 0
-# endif
-# endif
-# endif
-#endif /* wxGTK && !wxUniv */
-
-/* Hopefully we can emulate these dialogs in due course */
-#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
-# ifdef wxUSE_COLOURDLG
-# undef wxUSE_COLOURDLG
-# define wxUSE_COLOURDLG 0
-# endif
-#endif /* __SMARTPHONE__ && __WXWINCE__ */
-
-
-/* generic controls dependencies */
-#if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
-# if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
- /* all common controls are needed by these dialogs */
-# if !defined(wxUSE_CHOICE) || \
- !defined(wxUSE_TEXTCTRL) || \
- !defined(wxUSE_BUTTON) || \
- !defined(wxUSE_CHECKBOX) || \
- !defined(wxUSE_STATTEXT)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "These common controls are needed by common dialogs"
-# else
-# undef wxUSE_CHOICE
-# define wxUSE_CHOICE 1
-# undef wxUSE_TEXTCTRL
-# define wxUSE_TEXTCTRL 1
-# undef wxUSE_BUTTON
-# define wxUSE_BUTTON 1
-# undef wxUSE_CHECKBOX
-# define wxUSE_CHECKBOX 1
-# undef wxUSE_STATTEXT
-# define wxUSE_STATTEXT 1
-# endif
-# endif
-# endif
-#endif /* !wxMSW || wxUniv */
-
-/* common dependencies */
-#if wxUSE_CALENDARCTRL
-# if !(wxUSE_SPINBTN && wxUSE_COMBOBOX)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxCalendarCtrl requires wxSpinButton and wxComboBox"
-# else
-# undef wxUSE_SPINBTN
-# undef wxUSE_COMBOBOX
-# define wxUSE_SPINBTN 1
-# define wxUSE_COMBOBOX 1
-# endif
-# endif
-
-# if !wxUSE_DATETIME
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxCalendarCtrl requires wxUSE_DATETIME"
-# else
-# undef wxUSE_DATETIME
-# define wxUSE_DATETIME 1
-# endif
-# endif
-#endif /* wxUSE_CALENDARCTRL */
-
-#if wxUSE_DATEPICKCTRL
-# if !wxUSE_DATETIME
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxDatePickerCtrl requires wxUSE_DATETIME"
-# else
-# undef wxUSE_DATETIME
-# define wxUSE_DATETIME 1
-# endif
-# endif
-#endif /* wxUSE_DATEPICKCTRL */
-
-#if wxUSE_CHECKLISTBOX
-# if !wxUSE_LISTBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxCheckListBox requires wxListBox"
-# else
-# undef wxUSE_LISTBOX
-# define wxUSE_LISTBOX 1
-# endif
-# endif
-#endif /* wxUSE_CHECKLISTBOX */
-
-#if wxUSE_CHOICEDLG
-# if !wxUSE_LISTBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Choice dialogs requires wxListBox"
-# else
-# undef wxUSE_LISTBOX
-# define wxUSE_LISTBOX 1
-# endif
-# endif
-#endif /* wxUSE_CHOICEDLG */
-
-#if wxUSE_HELP
-# if !wxUSE_BMPBUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HELP requires wxUSE_BMPBUTTON"
-# else
-# undef wxUSE_BMPBUTTON
-# define wxUSE_BMPBUTTON 1
-# endif
-# endif
-
-# if !wxUSE_CHOICEDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_HELP requires wxUSE_CHOICEDLG"
-# else
-# undef wxUSE_CHOICEDLG
-# define wxUSE_CHOICEDLG 1
-# endif
-# endif
-#endif /* wxUSE_HELP */
-
-#if wxUSE_MS_HTML_HELP
- /*
- this doesn't make sense for platforms other than MSW but we still
- define it in wx/setup_inc.h so don't complain if it happens to be
- defined under another platform but just silently fix it.
- */
-# ifndef __WXMSW__
-# undef wxUSE_MS_HTML_HELP
-# define wxUSE_MS_HTML_HELP 0
-# endif
-#endif /* wxUSE_MS_HTML_HELP */
-
-#if wxUSE_WXHTML_HELP
-# if !wxUSE_HELP || !wxUSE_HTML || !wxUSE_COMBOBOX || !wxUSE_NOTEBOOK || !wxUSE_SPINCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Built in help controller can't be compiled"
-# else
-# undef wxUSE_HELP
-# define wxUSE_HELP 1
-# undef wxUSE_HTML
-# define wxUSE_HTML 1
-# undef wxUSE_COMBOBOX
-# define wxUSE_COMBOBOX 1
-# undef wxUSE_NOTEBOOK
-# define wxUSE_NOTEBOOK 1
-# undef wxUSE_SPINCTRL
-# define wxUSE_SPINCTRL 1
-# endif
-# endif
-#endif /* wxUSE_WXHTML_HELP */
-
-#if !wxUSE_IMAGE
-/*
- The default wxUSE_IMAGE setting is 1, so if it's set to 0 we assume the
- user explicitly wants this and disable all other features that require
- wxUSE_IMAGE.
- */
-# if wxUSE_DRAGIMAGE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_DRAGIMAGE requires wxUSE_IMAGE"
-# else
-# undef wxUSE_DRAGIMAGE
-# define wxUSE_DRAGIMAGE 0
-# endif
-# endif
-
-# if wxUSE_LIBPNG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LIBPNG requires wxUSE_IMAGE"
-# else
-# undef wxUSE_LIBPNG
-# define wxUSE_LIBPNG 0
-# endif
-# endif
-
-# if wxUSE_LIBJPEG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LIBJPEG requires wxUSE_IMAGE"
-# else
-# undef wxUSE_LIBJPEG
-# define wxUSE_LIBJPEG 0
-# endif
-# endif
-
-# if wxUSE_LIBTIFF
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LIBTIFF requires wxUSE_IMAGE"
-# else
-# undef wxUSE_LIBTIFF
-# define wxUSE_LIBTIFF 0
-# endif
-# endif
-
-# if wxUSE_GIF
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_GIF requires wxUSE_IMAGE"
-# else
-# undef wxUSE_GIF
-# define wxUSE_GIF 0
-# endif
-# endif
-
-# if wxUSE_PNM
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PNM requires wxUSE_IMAGE"
-# else
-# undef wxUSE_PNM
-# define wxUSE_PNM 0
-# endif
-# endif
-
-# if wxUSE_PCX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_PCX requires wxUSE_IMAGE"
-# else
-# undef wxUSE_PCX
-# define wxUSE_PCX 0
-# endif
-# endif
-
-# if wxUSE_IFF
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_IFF requires wxUSE_IMAGE"
-# else
-# undef wxUSE_IFF
-# define wxUSE_IFF 0
-# endif
-# endif
-
-# if wxUSE_TOOLBAR
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TOOLBAR requires wxUSE_IMAGE"
-# else
-# undef wxUSE_TOOLBAR
-# define wxUSE_TOOLBAR 0
-# endif
-# endif
-
-# if wxUSE_XPM
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XPM requires wxUSE_IMAGE"
-# else
-# undef wxUSE_XPM
-# define wxUSE_XPM 0
-# endif
-# endif
-
-#endif /* !wxUSE_IMAGE */
-
-#if wxUSE_DOC_VIEW_ARCHITECTURE
-# if !wxUSE_MENUS
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "DocView requires wxUSE_MENUS"
-# else
-# undef wxUSE_MENUS
-# define wxUSE_MENUS 1
-# endif
-# endif
-
-# if !wxUSE_CHOICEDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "DocView requires wxUSE_CHOICEDLG"
-# else
-# undef wxUSE_CHOICEDLG
-# define wxUSE_CHOICEDLG 1
-# endif
-# endif
-
-# if !wxUSE_STREAMS && !wxUSE_STD_IOSTREAM
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "DocView requires wxUSE_STREAMS or wxUSE_STD_IOSTREAM"
-# else
-# undef wxUSE_STREAMS
-# define wxUSE_STREAMS 1
-# endif
-# endif
-#endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
-
-#if wxUSE_PRINTING_ARCHITECTURE
-# if !wxUSE_COMBOBOX
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Print dialog requires wxUSE_COMBOBOX"
-# else
-# undef wxUSE_COMBOBOX
-# define wxUSE_COMBOBOX 1
-# endif
-# endif
-#endif /* wxUSE_PRINTING_ARCHITECTURE */
-
-#if wxUSE_MDI_ARCHITECTURE
-# if !wxUSE_MDI
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "MDI requires wxUSE_MDI"
-# else
-# undef wxUSE_MDI
-# define wxUSE_MDI 1
-# endif
-# endif
-
-# if !wxUSE_DOC_VIEW_ARCHITECTURE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_MDI_ARCHITECTURE requires wxUSE_DOC_VIEW_ARCHITECTURE"
-# else
-# undef wxUSE_DOC_VIEW_ARCHITECTURE
-# define wxUSE_DOC_VIEW_ARCHITECTURE 1
-# endif
-# endif
-#endif /* wxUSE_MDI_ARCHITECTURE */
-
-#if !wxUSE_FILEDLG
-# if wxUSE_DOC_VIEW_ARCHITECTURE || wxUSE_WXHTML_HELP
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_FILEDLG is required by wxUSE_DOC_VIEW_ARCHITECTURE and wxUSE_WXHTML_HELP!"
-# else
-# undef wxUSE_FILEDLG
-# define wxUSE_FILEDLG 1
-# endif
-# endif
-#endif /* wxUSE_FILEDLG */
-
-#if !wxUSE_GAUGE || !wxUSE_BUTTON
-# if wxUSE_PROGRESSDLG && !defined(__WXPALMOS__)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Generic progress dialog requires wxUSE_GAUGE and wxUSE_BUTTON"
-# else
-# undef wxUSE_GAUGE
-# undef wxUSE_BUTTON
-# define wxUSE_GAUGE 1
-# define wxUSE_BUTTON 1
-# endif
-# endif
-#endif /* !wxUSE_GAUGE */
-
-#if !wxUSE_BUTTON
-# if wxUSE_FONTDLG || \
- wxUSE_FILEDLG || \
- wxUSE_CHOICEDLG || \
- wxUSE_NUMBERDLG || \
- wxUSE_TEXTDLG || \
- wxUSE_DIRDLG || \
- wxUSE_STARTUP_TIPS || \
- wxUSE_WIZARDDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "Common and generic dialogs require wxUSE_BUTTON"
-# else
-# undef wxUSE_BUTTON
-# define wxUSE_BUTTON 1
-# endif
-# endif
-#endif /* !wxUSE_BUTTON */
-
-#if !wxUSE_TOOLBAR
-# if wxUSE_TOOLBAR_NATIVE
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_TOOLBAR is set to 0 but wxUSE_TOOLBAR_NATIVE is set to 1"
-# else
-# undef wxUSE_TOOLBAR_NATIVE
-# define wxUSE_TOOLBAR_NATIVE 0
-# endif
-# endif
-#endif
-
-#if !wxUSE_IMAGLIST
-# if wxUSE_TREECTRL || wxUSE_NOTEBOOK || wxUSE_LISTCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxImageList must be compiled as well"
-# else
-# undef wxUSE_IMAGLIST
-# define wxUSE_IMAGLIST 1
-# endif
-# endif
-#endif /* !wxUSE_IMAGLIST */
-
-#if !wxUSE_MSGDLG
-# ifdef wxABORT_ON_CONFIG_ERROR
- /* FIXME: should compile without it, of course, but doesn't */
-# error "wxMessageBox is always needed"
-# else
-# undef wxUSE_MSGDLG
-# define wxUSE_MSGDLG 1
-# endif
-#endif
-
-#if wxUSE_RADIOBOX
-# if !wxUSE_RADIOBTN
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RADIOBOX requires wxUSE_RADIOBTN"
-# else
-# undef wxUSE_RADIOBTN
-# define wxUSE_RADIOBTN 1
-# endif
-# endif
-# if !wxUSE_STATBOX && !defined(__WXPALMOS__)
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_RADIOBOX requires wxUSE_STATBOX"
-# else
-# undef wxUSE_STATBOX
-# define wxUSE_STATBOX 1
-# endif
-# endif
-#endif /* wxUSE_RADIOBOX */
-
-#if wxUSE_LOGWINDOW
-# if !wxUSE_TEXTCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOGWINDOW requires wxUSE_TEXTCTRL"
-# else
-# undef wxUSE_TEXTCTRL
-# define wxUSE_TEXTCTRL 1
-# endif
-# endif
-#endif /* wxUSE_LOGWINDOW */
-
-#if wxUSE_LOG_DIALOG
-# if !wxUSE_LISTCTRL || !wxUSE_BUTTON
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL and wxUSE_BUTTON"
-# else
-# undef wxUSE_LISTCTRL
-# define wxUSE_LISTCTRL 1
-# undef wxUSE_BUTTON
-# define wxUSE_BUTTON 1
-# endif
-# endif
-#endif /* wxUSE_LOG_DIALOG */
-
-#if wxUSE_CLIPBOARD && !wxUSE_DATAOBJ
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxClipboard requires wxDataObject"
-# else
-# undef wxUSE_DATAOBJ
-# define wxUSE_DATAOBJ 1
-# endif
-#endif /* wxUSE_CLIPBOARD */
-
-#if wxUSE_WX_RESOURCES && !wxUSE_PROLOGIO
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxr resources require PrologIO"
-# else
-# undef wxUSE_PROLOGIO
-# define wxUSE_PROLOGIO 1
-# endif
-#endif /* wxUSE_WX_RESOURCES */
-
-#if wxUSE_XRC && !wxUSE_XML
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_XRC requires wxUSE_XML"
-# else
-# undef wxUSE_XRC
-# define wxUSE_XRC 0
-# endif
-#endif /* wxUSE_XRC */
-
-#if wxUSE_SOCKETS && !wxUSE_STOPWATCH
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_SOCKETS requires wxUSE_STOPWATCH"
-# else
-# undef wxUSE_SOCKETS
-# define wxUSE_SOCKETS 0
-# endif
-#endif /* wxUSE_SOCKETS */
-
-#if !wxUSE_VARIANT
-# if wxUSE_DATAVIEWCTRL
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxDataViewCtrl requires wxVariant"
-# else
-# undef wxUSE_DATAVIEWCTRL
-# define wxUSE_DATAVIEWCTRL 0
-# endif
-# endif
-
-# if wxUSE_ODBC
-# ifdef wxABORT_ON_CONFIG_ERROR
-# error "wxUSE_ODBC requires wxVariant"
-# else
-# undef wxUSE_ODBC
-# define wxUSE_ODBC 0
-# endif
-# endif
-#endif /* wxUSE_VARIANT */
-
-#endif /* wxUSE_GUI */
diff --git a/desmume/src/windows/wx/include/wx/choicdlg.h b/desmume/src/windows/wx/include/wx/choicdlg.h
deleted file mode 100644
index 29cd37867..000000000
--- a/desmume/src/windows/wx/include/wx/choicdlg.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/choicdgg.h
-// Purpose: Includes generic choice dialog file
-// Author: Julian Smart
-// Modified by:
-// Created:
-// RCS-ID: $Id: choicdlg.h 33948 2005-05-04 18:57:50Z JS $
-// Copyright: Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CHOICDLG_H_BASE_
-#define _WX_CHOICDLG_H_BASE_
-
-#if wxUSE_CHOICEDLG
-
-#include "wx/generic/choicdgg.h"
-
-#endif
-
-#endif
- // _WX_CHOICDLG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/choice.h b/desmume/src/windows/wx/include/wx/choice.h
deleted file mode 100644
index 5c4ebb0cc..000000000
--- a/desmume/src/windows/wx/include/wx/choice.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/choice.h
-// Purpose: wxChoice class interface
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 26.07.99
-// RCS-ID: $Id: choice.h 42727 2006-10-30 16:04:27Z VZ $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CHOICE_H_BASE_
-#define _WX_CHOICE_H_BASE_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_CHOICE
-
-#include "wx/ctrlsub.h" // the base class
-
-// ----------------------------------------------------------------------------
-// global data
-// ----------------------------------------------------------------------------
-
-extern WXDLLEXPORT_DATA(const wxChar) wxChoiceNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxChoice allows to select one of a non-modifiable list of strings
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
-{
-public:
- wxChoiceBase() { }
- virtual ~wxChoiceBase();
-
- // all generic methods are in wxControlWithItems
-
- // get the current selection: this can only be different from the normal
- // selection if the popup items list is currently opened and the user
- // selected some item in it but didn't close the list yet; otherwise (and
- // currently always on platforms other than MSW) this is the same as
- // GetSelection()
- virtual int GetCurrentSelection() const { return GetSelection(); }
-
- // set/get the number of columns in the control (as they're not supported on
- // most platforms, they do nothing by default)
- virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
- virtual int GetColumns() const { return 1 ; }
-
- // emulate selecting the item event.GetInt()
- void Command(wxCommandEvent& event);
-
-private:
- DECLARE_NO_COPY_CLASS(wxChoiceBase)
-};
-
-// ----------------------------------------------------------------------------
-// include the platform-dependent class definition
-// ----------------------------------------------------------------------------
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/choice.h"
-#elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
- #include "wx/msw/wince/choicece.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/choice.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/choice.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/choice.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/choice.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/choice.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/choice.h"
-#elif defined(__WXPM__)
- #include "wx/os2/choice.h"
-#endif
-
-#endif // wxUSE_CHOICE
-
-#endif // _WX_CHOICE_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/choicebk.h b/desmume/src/windows/wx/include/wx/choicebk.h
deleted file mode 100644
index 85182ccbc..000000000
--- a/desmume/src/windows/wx/include/wx/choicebk.h
+++ /dev/null
@@ -1,154 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/choicebk.h
-// Purpose: wxChoicebook: wxChoice and wxNotebook combination
-// Author: Vadim Zeitlin
-// Modified by: Wlodzimierz ABX Skiba from wx/listbook.h
-// Created: 15.09.04
-// RCS-ID: $Id: choicebk.h 56623 2008-10-31 23:07:49Z VZ $
-// Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CHOICEBOOK_H_
-#define _WX_CHOICEBOOK_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_CHOICEBOOK
-
-#include "wx/bookctrl.h"
-#include "wx/choice.h"
-
-class WXDLLIMPEXP_FWD_CORE wxChoice;
-
-extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED;
-extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING;
-
-// wxChoicebook flags
-#define wxCHB_DEFAULT wxBK_DEFAULT
-#define wxCHB_TOP wxBK_TOP
-#define wxCHB_BOTTOM wxBK_BOTTOM
-#define wxCHB_LEFT wxBK_LEFT
-#define wxCHB_RIGHT wxBK_RIGHT
-#define wxCHB_ALIGN_MASK wxBK_ALIGN_MASK
-
-// ----------------------------------------------------------------------------
-// wxChoicebook
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxChoicebook : public wxBookCtrlBase
-{
-public:
- wxChoicebook()
- {
- Init();
- }
-
- wxChoicebook(wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyString)
- {
- Init();
-
- (void)Create(parent, id, pos, size, style, name);
- }
-
- // quasi ctor
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxString& name = wxEmptyString);
-
-
- virtual int GetSelection() const;
- virtual bool SetPageText(size_t n, const wxString& strText);
- virtual wxString GetPageText(size_t n) const;
- virtual int GetPageImage(size_t n) const;
- virtual bool SetPageImage(size_t n, int imageId);
- virtual wxSize CalcSizeFromPage(const wxSize& sizePage) const;
- virtual bool InsertPage(size_t n,
- wxWindow *page,
- const wxString& text,
- bool bSelect = false,
- int imageId = -1);
- virtual int SetSelection(size_t n) { return DoSetSelection(n, SetSelection_SendEvent); }
- virtual int ChangeSelection(size_t n) { return DoSetSelection(n); }
- virtual void SetImageList(wxImageList *imageList);
-
- virtual bool DeleteAllPages();
-
- // returns the choice control
- wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
-
-protected:
- virtual wxWindow *DoRemovePage(size_t page);
-
- // get the size which the choice control should have
- virtual wxSize GetControllerSize() const;
-
- void UpdateSelectedPage(size_t newsel)
- {
- m_selection = wx_static_cast(int, newsel);
- GetChoiceCtrl()->Select(newsel);
- }
-
- wxBookCtrlBaseEvent* CreatePageChangingEvent() const;
- void MakeChangedEvent(wxBookCtrlBaseEvent &event);
-
- // event handlers
- void OnChoiceSelected(wxCommandEvent& event);
-
- // the currently selected page or wxNOT_FOUND if none
- int m_selection;
-
-private:
- // common part of all constructors
- void Init();
-
- DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoicebook)
-};
-
-// ----------------------------------------------------------------------------
-// choicebook event class and related stuff
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxChoicebookEvent : public wxBookCtrlBaseEvent
-{
-public:
- wxChoicebookEvent(wxEventType commandType = wxEVT_NULL, int id = 0,
- int nSel = -1, int nOldSel = -1)
- : wxBookCtrlBaseEvent(commandType, id, nSel, nOldSel)
- {
- }
-
- wxChoicebookEvent(const wxChoicebookEvent& event)
- : wxBookCtrlBaseEvent(event)
- {
- }
-
- virtual wxEvent *Clone() const { return new wxChoicebookEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChoicebookEvent)
-};
-
-typedef void (wxEvtHandler::*wxChoicebookEventFunction)(wxChoicebookEvent&);
-
-#define wxChoicebookEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChoicebookEventFunction, &func)
-
-#define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxChoicebookEventHandler(fn))
-
-#define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxChoicebookEventHandler(fn))
-
-#endif // wxUSE_CHOICEBOOK
-
-#endif // _WX_CHOICEBOOK_H_
diff --git a/desmume/src/windows/wx/include/wx/clipbrd.h b/desmume/src/windows/wx/include/wx/clipbrd.h
deleted file mode 100644
index 6f6ab4bf9..000000000
--- a/desmume/src/windows/wx/include/wx/clipbrd.h
+++ /dev/null
@@ -1,145 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/clipbrd.h
-// Purpose: wxClipboad class and clipboard functions
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 19.10.99
-// RCS-ID: $Id: clipbrd.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) wxWidgets Team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CLIPBRD_H_BASE_
-#define _WX_CLIPBRD_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_CLIPBOARD
-
-
-#include "wx/object.h"
-#include "wx/wxchar.h"
-
-class WXDLLIMPEXP_FWD_CORE wxDataFormat;
-class WXDLLIMPEXP_FWD_CORE wxDataObject;
-class WXDLLIMPEXP_FWD_CORE wxClipboard;
-
-// ----------------------------------------------------------------------------
-// wxClipboard represents the system clipboard. Normally, you should use
-// wxTheClipboard which is a global pointer to the (unique) clipboard.
-//
-// Clipboard can be used to copy data to/paste data from. It works together
-// with wxDataObject.
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxClipboardBase : public wxObject
-{
-public:
- wxClipboardBase() {}
-
- // open the clipboard before Add/SetData() and GetData()
- virtual bool Open() = 0;
-
- // close the clipboard after Add/SetData() and GetData()
- virtual void Close() = 0;
-
- // query whether the clipboard is opened
- virtual bool IsOpened() const = 0;
-
- // add to the clipboard data
- //
- // NB: the clipboard owns the pointer and will delete it, so data must be
- // allocated on the heap
- virtual bool AddData( wxDataObject *data ) = 0;
-
- // set the clipboard data, this is the same as Clear() followed by
- // AddData()
- virtual bool SetData( wxDataObject *data ) = 0;
-
- // ask if data in correct format is available
- virtual bool IsSupported( const wxDataFormat& format ) = 0;
-
- // fill data with data on the clipboard (if available)
- virtual bool GetData( wxDataObject& data ) = 0;
-
- // clears wxTheClipboard and the system's clipboard if possible
- virtual void Clear() = 0;
-
- // flushes the clipboard: this means that the data which is currently on
- // clipboard will stay available even after the application exits (possibly
- // eating memory), otherwise the clipboard will be emptied on exit
- virtual bool Flush() { return false; }
-
- // X11 has two clipboards which get selected by this call. Empty on MSW.
- virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
-
- // Returns global instance (wxTheClipboard) of the object:
- static wxClipboard *Get();
-};
-
-// ----------------------------------------------------------------------------
-// globals
-// ----------------------------------------------------------------------------
-
-// The global clipboard object - backward compatible access macro:
-#define wxTheClipboard (wxClipboard::Get())
-
-// ----------------------------------------------------------------------------
-// include platform-specific class declaration
-// ----------------------------------------------------------------------------
-
-#if defined(__WXMSW__)
- #include "wx/msw/clipbrd.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/clipbrd.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/clipbrd.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/clipbrd.h"
-#elif defined(__WXX11__)
- #include "wx/x11/clipbrd.h"
-#elif defined(__WXMGL__)
- #include "wx/mgl/clipbrd.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/clipbrd.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/clipbrd.h"
-#elif defined(__WXPM__)
- #include "wx/os2/clipbrd.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// helpful class for opening the clipboard and automatically closing it
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxClipboardLocker
-{
-public:
- wxClipboardLocker(wxClipboard *clipboard = (wxClipboard *)NULL)
- {
- m_clipboard = clipboard ? clipboard : wxTheClipboard;
- if ( m_clipboard )
- {
- m_clipboard->Open();
- }
- }
-
- bool operator!() const { return !m_clipboard->IsOpened(); }
-
- ~wxClipboardLocker()
- {
- if ( m_clipboard )
- {
- m_clipboard->Close();
- }
- }
-
-private:
- wxClipboard *m_clipboard;
-
- DECLARE_NO_COPY_CLASS(wxClipboardLocker)
-};
-
-#endif // wxUSE_CLIPBOARD
-
-#endif // _WX_CLIPBRD_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/clntdata.h b/desmume/src/windows/wx/include/wx/clntdata.h
deleted file mode 100644
index 1707ac764..000000000
--- a/desmume/src/windows/wx/include/wx/clntdata.h
+++ /dev/null
@@ -1,273 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/clntdata.h
-// Purpose: A mixin class for holding a wxClientData or void pointer
-// Author: Robin Dunn
-// Modified by:
-// Created: 9-Oct-2001
-// RCS-ID: $Id: clntdata.h 36973 2006-01-18 16:45:41Z JS $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CLNTDATAH__
-#define _WX_CLNTDATAH__
-
-#include "wx/defs.h"
-#include "wx/string.h"
-#include "wx/hashmap.h"
-
-typedef int (*wxShadowObjectMethod)(void*, void*);
-WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
- wxShadowObjectMethod,
- wxShadowObjectMethods,
- class WXDLLIMPEXP_BASE
-);
-WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
- void *,
- wxShadowObjectFields,
- class WXDLLIMPEXP_BASE
-);
-
-class WXDLLIMPEXP_BASE wxShadowObject
-{
-public:
- wxShadowObject() { }
-
- void AddMethod( const wxString &name, wxShadowObjectMethod method )
- {
- wxShadowObjectMethods::iterator it = m_methods.find( name );
- if (it == m_methods.end())
- m_methods[ name ] = method;
- else
- it->second = method;
- }
-
- bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue )
- {
- wxShadowObjectMethods::iterator it = m_methods.find( name );
- if (it == m_methods.end())
- return false;
- wxShadowObjectMethod method = it->second;
- int ret = (*method)(window, param);
- if (returnValue)
- *returnValue = ret;
- return true;
- }
-
- void AddField( const wxString &name, void* initialValue = NULL )
- {
- wxShadowObjectFields::iterator it = m_fields.find( name );
- if (it == m_fields.end())
- m_fields[ name ] = initialValue;
- else
- it->second = initialValue;
- }
-
- void SetField( const wxString &name, void* value )
- {
- wxShadowObjectFields::iterator it = m_fields.find( name );
- if (it == m_fields.end())
- return;
- it->second = value;
- }
-
- void* GetField( const wxString &name, void *defaultValue = NULL )
- {
- wxShadowObjectFields::iterator it = m_fields.find( name );
- if (it == m_fields.end())
- return defaultValue;
- return it->second;
- }
-
-private:
- wxShadowObjectMethods m_methods;
- wxShadowObjectFields m_fields;
-};
-
-
-// ----------------------------------------------------------------------------
-
-// what kind of client data do we have?
-enum wxClientDataType
-{
- wxClientData_None, // we don't know yet because we don't have it at all
- wxClientData_Object, // our client data is typed and we own it
- wxClientData_Void // client data is untyped and we don't own it
-};
-
-class WXDLLIMPEXP_BASE wxClientData
-{
-public:
- wxClientData() { }
- virtual ~wxClientData() { }
-};
-
-class WXDLLIMPEXP_BASE wxStringClientData : public wxClientData
-{
-public:
- wxStringClientData() : m_data() { }
- wxStringClientData( const wxString &data ) : m_data(data) { }
- void SetData( const wxString &data ) { m_data = data; }
- const wxString& GetData() const { return m_data; }
-
-private:
- wxString m_data;
-};
-
-// This class is a mixin that provides storage and management of "client
-// data." The client data stored can either be a pointer to a wxClientData
-// object in which case it is managed by the container (i.e. it will delete
-// the data when it's destroyed) or an untyped pointer which won't be deleted
-// by the container - but not both of them
-//
-// NOTE: This functionality is currently duplicated in wxEvtHandler in order
-// to avoid having more than one vtable in that class hierarchy.
-
-class WXDLLIMPEXP_BASE wxClientDataContainer
-{
-public:
- wxClientDataContainer();
- virtual ~wxClientDataContainer();
-
- void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
- wxClientData *GetClientObject() const { return DoGetClientObject(); }
-
- void SetClientData( void *data ) { DoSetClientData(data); }
- void *GetClientData() const { return DoGetClientData(); }
-
-protected:
- // The user data: either an object which will be deleted by the container
- // when it's deleted or some raw pointer which we do nothing with. Only
- // one type of data can be used with the given window, i.e. you cannot set
- // the void data and then associate the container with wxClientData or vice
- // versa.
- union
- {
- wxClientData *m_clientObject;
- void *m_clientData;
- };
-
- // client data accessors
- virtual void DoSetClientObject( wxClientData *data );
- virtual wxClientData *DoGetClientObject() const;
-
- virtual void DoSetClientData( void *data );
- virtual void *DoGetClientData() const;
-
- // what kind of data do we have?
- wxClientDataType m_clientDataType;
-
-};
-
-#include "wx/vector.h"
-
-struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair
-{
- wxClientDataDictionaryPair( size_t idx ) : index( idx ), data( 0 ) { }
-
- size_t index;
- wxClientData* data;
-};
-
-_WX_DECLARE_VECTOR(
- wxClientDataDictionaryPair,
- wxClientDataDictionaryPairVector,
- WXDLLIMPEXP_BASE
-);
-
-// this class is used internally to maintain the association between items
-// of (some subclasses of) wxControlWithItems and their client data
-// NOTE: this class does not keep track of whether it contains
-// wxClientData or void*. The client must ensure that
-// it does not contain a mix of the two, and that
-// DestroyData is called if it contains wxClientData
-class WXDLLIMPEXP_BASE wxClientDataDictionary
-{
-public:
- wxClientDataDictionary() {}
-
- // deletes all the data
- void DestroyData()
- {
- for( size_t i = 0, end = m_vec.size(); i != end; ++i )
- delete m_vec[i].data;
- m_vec.clear();
- }
-
- // if data for the given index is not present, add it,
- // if it is present, delete the old data and replace it with
- // the new one
- void Set( size_t index, wxClientData* data, bool doDelete )
- {
- size_t ptr = Find( index );
-
- if( !data )
- {
- if( ptr == m_vec.size() ) return;
- if( doDelete )
- delete m_vec[ptr].data;
- m_vec.erase( ptr );
- }
- else
- {
- if( ptr == m_vec.size() )
- {
- m_vec.push_back( wxClientDataDictionaryPair( index ) );
- ptr = m_vec.size() - 1;
- }
-
- if( doDelete )
- delete m_vec[ptr].data;
- m_vec[ptr].data = data;
- }
- }
-
- // get the data associated with the given index,
- // return 0 if not found
- wxClientData* Get( size_t index ) const
- {
- size_t it = Find( index );
- if( it == m_vec.size() ) return 0;
- return (wxClientData*)m_vec[it].data; // const cast
- }
-
- // delete the data associated with the given index
- // it also decreases by one the indices of all the elements
- // with an index greater than the given index
- void Delete( size_t index, bool doDelete )
- {
- size_t todel = m_vec.size();
-
- for( size_t i = 0, end = m_vec.size(); i != end; ++i )
- {
- if( m_vec[i].index == index )
- todel = i;
- else if( m_vec[i].index > index )
- --(m_vec[i].index);
- }
-
- if( todel != m_vec.size() )
- {
- if( doDelete )
- delete m_vec[todel].data;
- m_vec.erase( todel );
- }
- }
-private:
- // returns MyVec.size() if not found
- size_t Find( size_t index ) const
- {
- for( size_t i = 0, end = m_vec.size(); i != end; ++i )
- {
- if( m_vec[i].index == index )
- return i;
- }
-
- return m_vec.size();
- }
-
- wxClientDataDictionaryPairVector m_vec;
-};
-
-#endif // _WX_CLNTDATAH__
-
diff --git a/desmume/src/windows/wx/include/wx/clrpicker.h b/desmume/src/windows/wx/include/wx/clrpicker.h
deleted file mode 100644
index 1dd2c4b3d..000000000
--- a/desmume/src/windows/wx/include/wx/clrpicker.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/clrpicker.h
-// Purpose: wxColourPickerCtrl base header
-// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
-// Modified by:
-// Created: 14/4/2006
-// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
-// RCS-ID: $Id: clrpicker.h 53135 2008-04-12 02:31:04Z VZ $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CLRPICKER_H_BASE_
-#define _WX_CLRPICKER_H_BASE_
-
-#include "wx/defs.h"
-
-
-#if wxUSE_COLOURPICKERCTRL
-
-#include "wx/pickerbase.h"
-
-
-class WXDLLIMPEXP_FWD_CORE wxColourPickerEvent;
-
-extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerWidgetNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxColourPickerCtrlNameStr[];
-
-
-// ----------------------------------------------------------------------------
-// wxColourPickerWidgetBase: a generic abstract interface which must be
-// implemented by controls used by wxColourPickerCtrl
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxColourPickerWidgetBase
-{
-public:
- wxColourPickerWidgetBase() { m_colour = *wxBLACK; }
- virtual ~wxColourPickerWidgetBase() {}
-
- wxColour GetColour() const
- { return m_colour; }
- virtual void SetColour(const wxColour &col)
- { m_colour = col; UpdateColour(); }
- virtual void SetColour(const wxString &col)
- { m_colour.Set(col); UpdateColour(); }
-
-protected:
-
- virtual void UpdateColour() = 0;
-
- // the current colour (may be invalid if none)
- wxColour m_colour;
-};
-
-
-// Styles which must be supported by all controls implementing wxColourPickerWidgetBase
-// NB: these styles must be defined to carefully-chosen values to
-// avoid conflicts with wxButton's styles
-
-// show the colour in HTML form (#AABBCC) as colour button label
-// (instead of no label at all)
-// NOTE: this style is supported just by wxColourButtonGeneric and
-// thus is not exposed in wxColourPickerCtrl
-#define wxCLRP_SHOW_LABEL 0x0008
-
-// map platform-dependent controls which implement the wxColourPickerWidgetBase
-// under the name "wxColourPickerWidget".
-// NOTE: wxColourPickerCtrl allocates a wxColourPickerWidget and relies on the
-// fact that all classes being mapped as wxColourPickerWidget have the
-// same prototype for their contructor (and also explains why we use
-// define instead of a typedef)
-// since GTK > 2.4, there is GtkColorButton
-#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
- #include "wx/gtk/clrpicker.h"
- #define wxColourPickerWidget wxColourButton
-#else
- #include "wx/generic/clrpickerg.h"
- #define wxColourPickerWidget wxGenericColourButton
-#endif
-
-
-// ----------------------------------------------------------------------------
-// wxColourPickerCtrl: platform-independent class which embeds a
-// platform-dependent wxColourPickerWidget and, if wxCLRP_USE_TEXTCTRL style is
-// used, a textctrl next to it.
-// ----------------------------------------------------------------------------
-
-#define wxCLRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
-#define wxCLRP_DEFAULT_STYLE 0
-
-class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase
-{
-public:
- wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {}
- virtual ~wxColourPickerCtrl() {}
-
-
- wxColourPickerCtrl(wxWindow *parent, wxWindowID id,
- const wxColour& col = *wxBLACK, const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxColourPickerCtrlNameStr)
- : m_bIgnoreNextTextCtrlUpdate(false)
- { Create(parent, id, col, pos, size, style, validator, name); }
-
- bool Create(wxWindow *parent, wxWindowID id,
- const wxColour& col = *wxBLACK,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxCLRP_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxColourPickerCtrlNameStr);
-
-
-public: // public API
-
- // get the colour chosen
- wxColour GetColour() const
- { return ((wxColourPickerWidget *)m_picker)->GetColour(); }
-
- // set currently displayed color
- void SetColour(const wxColour& col);
-
- // set colour using RGB(r,g,b) syntax or considering given text as a colour name;
- // returns true if the given text was successfully recognized.
- bool SetColour(const wxString& text);
-
-
-public: // internal functions
-
- // update the button colour to match the text control contents
- void UpdatePickerFromTextCtrl();
-
- // update the text control to match the button's colour
- void UpdateTextCtrlFromPicker();
-
- // event handler for our picker
- void OnColourChange(wxColourPickerEvent &);
-
-protected:
- virtual long GetPickerStyle(long style) const
- { return (style & wxCLRP_SHOW_LABEL); }
-
- // true if the next UpdateTextCtrl() call is to ignore
- bool m_bIgnoreNextTextCtrlUpdate;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl)
-};
-
-
-// ----------------------------------------------------------------------------
-// wxColourPickerEvent: used by wxColourPickerCtrl only
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, 1102)
-END_DECLARE_EVENT_TYPES()
-
-class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent
-{
-public:
- wxColourPickerEvent() {}
- wxColourPickerEvent(wxObject *generator, int id, const wxColour &col)
- : wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id),
- m_colour(col)
- {
- SetEventObject(generator);
- }
-
- wxColour GetColour() const { return m_colour; }
- void SetColour(const wxColour &c) { m_colour = c; }
-
-
- // default copy ctor, assignment operator and dtor are ok
- virtual wxEvent *Clone() const { return new wxColourPickerEvent(*this); }
-
-private:
- wxColour m_colour;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxColourPickerEvent)
-};
-
-// ----------------------------------------------------------------------------
-// event types and macros
-// ----------------------------------------------------------------------------
-
-typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&);
-
-#define wxColourPickerEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxColourPickerEventFunction, &func)
-
-#define EVT_COLOURPICKER_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn))
-
-
-#endif // wxUSE_COLOURPICKERCTRL
-
-#endif // _WX_CLRPICKER_H_BASE_
-
diff --git a/desmume/src/windows/wx/include/wx/cmdline.h b/desmume/src/windows/wx/include/wx/cmdline.h
deleted file mode 100644
index 50a17ce7a..000000000
--- a/desmume/src/windows/wx/include/wx/cmdline.h
+++ /dev/null
@@ -1,239 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/cmdline.h
-// Purpose: wxCmdLineParser and related classes for parsing the command
-// line options
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 04.01.00
-// RCS-ID: $Id: cmdline.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) 2000 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CMDLINE_H_
-#define _WX_CMDLINE_H_
-
-#include "wx/defs.h"
-
-#include "wx/string.h"
-#include "wx/arrstr.h"
-
-#if wxUSE_CMDLINE_PARSER
-
-class WXDLLIMPEXP_FWD_BASE wxDateTime;
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// by default, options are optional (sic) and each call to AddParam() allows
-// one more parameter - this may be changed by giving non-default flags to it
-enum
-{
- wxCMD_LINE_OPTION_MANDATORY = 0x01, // this option must be given
- wxCMD_LINE_PARAM_OPTIONAL = 0x02, // the parameter may be omitted
- wxCMD_LINE_PARAM_MULTIPLE = 0x04, // the parameter may be repeated
- wxCMD_LINE_OPTION_HELP = 0x08, // this option is a help request
- wxCMD_LINE_NEEDS_SEPARATOR = 0x10 // must have sep before the value
-};
-
-// an option value or parameter may be a string (the most common case), a
-// number or a date
-enum wxCmdLineParamType
-{
- wxCMD_LINE_VAL_STRING, // should be 0 (default)
- wxCMD_LINE_VAL_NUMBER,
- wxCMD_LINE_VAL_DATE,
- wxCMD_LINE_VAL_NONE
-};
-
-// for constructing the cmd line description using Init()
-enum wxCmdLineEntryType
-{
- wxCMD_LINE_SWITCH,
- wxCMD_LINE_OPTION,
- wxCMD_LINE_PARAM,
- wxCMD_LINE_NONE // to terminate the list
-};
-
-// ----------------------------------------------------------------------------
-// wxCmdLineEntryDesc is a description of one command line
-// switch/option/parameter
-// ----------------------------------------------------------------------------
-
-struct wxCmdLineEntryDesc
-{
- wxCmdLineEntryType kind;
- const wxChar *shortName;
- const wxChar *longName;
- const wxChar *description;
- wxCmdLineParamType type;
- int flags;
-};
-
-// ----------------------------------------------------------------------------
-// wxCmdLineParser is a class for parsing command line.
-//
-// It has the following features:
-//
-// 1. distinguishes options, switches and parameters; allows option grouping
-// 2. allows both short and long options
-// 3. automatically generates the usage message from the cmd line description
-// 4. does type checks on the options values (number, date, ...)
-//
-// To use it you should:
-//
-// 1. construct it giving it the cmd line to parse and optionally its desc
-// 2. construct the cmd line description using AddXXX() if not done in (1)
-// 3. call Parse()
-// 4. use GetXXX() to retrieve the parsed info
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxCmdLineParser
-{
-public:
- // ctors and initializers
- // ----------------------
-
- // default ctor or ctor giving the cmd line in either Unix or Win form
- wxCmdLineParser() { Init(); }
- wxCmdLineParser(int argc, char **argv) { Init(); SetCmdLine(argc, argv); }
-#if wxUSE_UNICODE
- wxCmdLineParser(int argc, wxChar **argv) { Init(); SetCmdLine(argc, argv); }
-#endif // wxUSE_UNICODE
- wxCmdLineParser(const wxString& cmdline) { Init(); SetCmdLine(cmdline); }
-
- // the same as above, but also gives the cmd line description - otherwise,
- // use AddXXX() later
- wxCmdLineParser(const wxCmdLineEntryDesc *desc)
- { Init(); SetDesc(desc); }
- wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, char **argv)
- { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
-#if wxUSE_UNICODE
- wxCmdLineParser(const wxCmdLineEntryDesc *desc, int argc, wxChar **argv)
- { Init(); SetCmdLine(argc, argv); SetDesc(desc); }
-#endif // wxUSE_UNICODE
- wxCmdLineParser(const wxCmdLineEntryDesc *desc, const wxString& cmdline)
- { Init(); SetCmdLine(cmdline); SetDesc(desc); }
-
- // set cmd line to parse after using one of the ctors which don't do it
- void SetCmdLine(int argc, char **argv);
-#if wxUSE_UNICODE
- void SetCmdLine(int argc, wxChar **argv);
-#endif // wxUSE_UNICODE
- void SetCmdLine(const wxString& cmdline);
-
- // not virtual, don't use this class polymorphically
- ~wxCmdLineParser();
-
- // set different parser options
- // ----------------------------
-
- // by default, '-' is switch char under Unix, '-' or '/' under Win:
- // switchChars contains all characters with which an option or switch may
- // start
- void SetSwitchChars(const wxString& switchChars);
-
- // long options are not POSIX-compliant, this option allows to disable them
- void EnableLongOptions(bool enable = true);
- void DisableLongOptions() { EnableLongOptions(false); }
-
- bool AreLongOptionsEnabled();
-
- // extra text may be shown by Usage() method if set by this function
- void SetLogo(const wxString& logo);
-
- // construct the cmd line description
- // ----------------------------------
-
- // take the cmd line description from the wxCMD_LINE_NONE terminated table
- void SetDesc(const wxCmdLineEntryDesc *desc);
-
- // a switch: i.e. an option without value
- void AddSwitch(const wxString& name, const wxString& lng = wxEmptyString,
- const wxString& desc = wxEmptyString,
- int flags = 0);
-
- // an option taking a value of the given type
- void AddOption(const wxString& name, const wxString& lng = wxEmptyString,
- const wxString& desc = wxEmptyString,
- wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
- int flags = 0);
-
- // a parameter
- void AddParam(const wxString& desc = wxEmptyString,
- wxCmdLineParamType type = wxCMD_LINE_VAL_STRING,
- int flags = 0);
-
- // actions
- // -------
-
- // parse the command line, return 0 if ok, -1 if "-h" or "--help" option
- // was encountered and the help message was given or a positive value if a
- // syntax error occurred
- //
- // if showUsage is true, Usage() is called in case of syntax error or if
- // help was requested
- int Parse(bool showUsage = true);
-
- // give the usage message describing all program options
- void Usage();
-
- // get the command line arguments
- // ------------------------------
-
- // returns true if the given switch was found
- bool Found(const wxString& name) const;
-
- // returns true if an option taking a string value was found and stores the
- // value in the provided pointer
- bool Found(const wxString& name, wxString *value) const;
-
- // returns true if an option taking an integer value was found and stores
- // the value in the provided pointer
- bool Found(const wxString& name, long *value) const;
-
-#if wxUSE_DATETIME
- // returns true if an option taking a date value was found and stores the
- // value in the provided pointer
- bool Found(const wxString& name, wxDateTime *value) const;
-#endif // wxUSE_DATETIME
-
- // gets the number of parameters found
- size_t GetParamCount() const;
-
- // gets the value of Nth parameter (as string only for now)
- wxString GetParam(size_t n = 0u) const;
-
- // Resets switches and options
- void Reset();
-
- // break down the command line in arguments
- static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
-
-private:
- // get usage string
- wxString GetUsageString();
-
- // common part of all ctors
- void Init();
-
- struct wxCmdLineParserData *m_data;
-
- DECLARE_NO_COPY_CLASS(wxCmdLineParser)
-};
-
-#else // !wxUSE_CMDLINE_PARSER
-
-// this function is always available (even if !wxUSE_CMDLINE_PARSER) because it
-// is used by wxWin itself under Windows
-class WXDLLIMPEXP_BASE wxCmdLineParser
-{
-public:
- static wxArrayString ConvertStringToArgs(const wxChar *cmdline);
-};
-
-#endif // wxUSE_CMDLINE_PARSER/!wxUSE_CMDLINE_PARSER
-
-#endif // _WX_CMDLINE_H_
-
diff --git a/desmume/src/windows/wx/include/wx/cmdproc.h b/desmume/src/windows/wx/include/wx/cmdproc.h
deleted file mode 100644
index 0b101a14a..000000000
--- a/desmume/src/windows/wx/include/wx/cmdproc.h
+++ /dev/null
@@ -1,144 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/cmdproc.h
-// Purpose: undo/redo capable command processing framework
-// Author: Julian Smart (extracted from docview.h by VZ)
-// Modified by:
-// Created: 05.11.00
-// RCS-ID: $Id: cmdproc.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CMDPROC_H_
-#define _WX_CMDPROC_H_
-
-#include "wx/defs.h"
-#include "wx/object.h"
-#include "wx/list.h"
-
-class WXDLLIMPEXP_FWD_CORE wxMenu;
-
-// ----------------------------------------------------------------------------
-// wxCommand: a single command capable of performing itself
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxCommand : public wxObject
-{
-public:
- wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
- virtual ~wxCommand(){}
-
- // Override this to perform a command
- virtual bool Do() = 0;
-
- // Override this to undo a command
- virtual bool Undo() = 0;
-
- virtual bool CanUndo() const { return m_canUndo; }
- virtual wxString GetName() const { return m_commandName; }
-
-protected:
- bool m_canUndo;
- wxString m_commandName;
-
-private:
- DECLARE_CLASS(wxCommand)
-};
-
-// ----------------------------------------------------------------------------
-// wxCommandProcessor: wxCommand manager
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxCommandProcessor : public wxObject
-{
-public:
- // if max number of commands is -1, it is unlimited
- wxCommandProcessor(int maxCommands = -1);
- virtual ~wxCommandProcessor();
-
- // Pass a command to the processor. The processor calls Do(); if
- // successful, is appended to the command history unless storeIt is false.
- virtual bool Submit(wxCommand *command, bool storeIt = true);
-
- // just store the command without executing it
- virtual void Store(wxCommand *command);
-
- virtual bool Undo();
- virtual bool Redo();
- virtual bool CanUndo() const;
- virtual bool CanRedo() const;
-
- // Initialises the current command and menu strings.
- virtual void Initialize();
-
- // Sets the Undo/Redo menu strings for the current menu.
- virtual void SetMenuStrings();
-
- // Gets the current Undo menu label.
- wxString GetUndoMenuLabel() const;
-
- // Gets the current Undo menu label.
- wxString GetRedoMenuLabel() const;
-
-#if wxUSE_MENUS
- // Call this to manage an edit menu.
- void SetEditMenu(wxMenu *menu) { m_commandEditMenu = menu; }
- wxMenu *GetEditMenu() const { return m_commandEditMenu; }
-#endif // wxUSE_MENUS
-
- // command list access
- wxList& GetCommands() { return m_commands; }
- const wxList& GetCommands() const { return m_commands; }
- wxCommand *GetCurrentCommand() const
- {
- return (wxCommand *)(m_currentCommand ? m_currentCommand->GetData() : NULL);
- }
- int GetMaxCommands() const { return m_maxNoCommands; }
- virtual void ClearCommands();
-
- // Has the current project been changed?
- virtual bool IsDirty() const
- {
- return m_currentCommand && (m_lastSavedCommand != m_currentCommand);
- }
-
- // Mark the current command as the one where the last save took place
- void MarkAsSaved()
- {
- m_lastSavedCommand = m_currentCommand;
- }
-
-
- // By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y"
- const wxString& GetUndoAccelerator() const { return m_undoAccelerator; }
- const wxString& GetRedoAccelerator() const { return m_redoAccelerator; }
-
- void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; }
- void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; }
-
-protected:
- // for further flexibility, command processor doesn't call wxCommand::Do()
- // and Undo() directly but uses these functions which can be overridden in
- // the derived class
- virtual bool DoCommand(wxCommand& cmd);
- virtual bool UndoCommand(wxCommand& cmd);
-
- int m_maxNoCommands;
- wxList m_commands;
- wxList::compatibility_iterator m_currentCommand,
- m_lastSavedCommand;
-
-#if wxUSE_MENUS
- wxMenu* m_commandEditMenu;
-#endif // wxUSE_MENUS
-
- wxString m_undoAccelerator;
- wxString m_redoAccelerator;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxCommandProcessor)
- DECLARE_NO_COPY_CLASS(wxCommandProcessor)
-};
-
-#endif // _WX_CMDPROC_H_
-
diff --git a/desmume/src/windows/wx/include/wx/cmndata.h b/desmume/src/windows/wx/include/wx/cmndata.h
deleted file mode 100644
index 30310e21c..000000000
--- a/desmume/src/windows/wx/include/wx/cmndata.h
+++ /dev/null
@@ -1,454 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/cmndata.h
-// Purpose: Common GDI data classes
-// Author: Julian Smart and others
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: cmndata.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c)
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CMNDATA_H_BASE_
-#define _WX_CMNDATA_H_BASE_
-
-#include "wx/window.h"
-#include "wx/font.h"
-#include "wx/encinfo.h"
-#include "wx/colour.h"
-#include "wx/gdicmn.h"
-
-#if wxUSE_STREAMS
-#include "wx/stream.h"
-#endif
-
-
-class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase;
-
-
-class WXDLLEXPORT wxColourData: public wxObject
-{
-public:
- wxColourData();
- wxColourData(const wxColourData& data);
- virtual ~wxColourData();
-
- void SetChooseFull(bool flag) { m_chooseFull = flag; }
- bool GetChooseFull() const { return m_chooseFull; }
- void SetColour(const wxColour& colour) { m_dataColour = colour; }
- const wxColour& GetColour() const { return m_dataColour; }
- wxColour& GetColour() { return m_dataColour; }
-
- // Array of 16 custom colours
- void SetCustomColour(int i, const wxColour& colour);
- wxColour GetCustomColour(int i);
-
- void operator=(const wxColourData& data);
-
-public:
- wxColour m_dataColour;
- wxColour m_custColours[16];
- bool m_chooseFull;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxColourData)
-};
-
-class WXDLLEXPORT wxFontData : public wxObject
-{
-public:
- wxFontData();
- virtual ~wxFontData();
-
- wxFontData(const wxFontData& data)
- : wxObject(),
- m_fontColour(data.m_fontColour),
- m_showHelp(data.m_showHelp),
- m_allowSymbols(data.m_allowSymbols),
- m_enableEffects(data.m_enableEffects),
- m_initialFont(data.m_initialFont),
- m_chosenFont(data.m_chosenFont),
- m_minSize(data.m_minSize),
- m_maxSize(data.m_maxSize),
- m_encoding(data.m_encoding),
- m_encodingInfo(data.m_encodingInfo)
- {
- }
-
- wxFontData& operator=(const wxFontData& data)
- {
- wxObject::operator=(data);
- m_fontColour = data.m_fontColour;
- m_showHelp = data.m_showHelp;
- m_allowSymbols = data.m_allowSymbols;
- m_enableEffects = data.m_enableEffects;
- m_initialFont = data.m_initialFont;
- m_chosenFont = data.m_chosenFont;
- m_minSize = data.m_minSize;
- m_maxSize = data.m_maxSize;
- m_encoding = data.m_encoding;
- m_encodingInfo = data.m_encodingInfo;
- return *this;
- }
-
- void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
- bool GetAllowSymbols() const { return m_allowSymbols; }
-
- void SetColour(const wxColour& colour) { m_fontColour = colour; }
- const wxColour& GetColour() const { return m_fontColour; }
-
- void SetShowHelp(bool flag) { m_showHelp = flag; }
- bool GetShowHelp() const { return m_showHelp; }
-
- void EnableEffects(bool flag) { m_enableEffects = flag; }
- bool GetEnableEffects() const { return m_enableEffects; }
-
- void SetInitialFont(const wxFont& font) { m_initialFont = font; }
- wxFont GetInitialFont() const { return m_initialFont; }
-
- void SetChosenFont(const wxFont& font) { m_chosenFont = font; }
- wxFont GetChosenFont() const { return m_chosenFont; }
-
- void SetRange(int minRange, int maxRange) { m_minSize = minRange; m_maxSize = maxRange; }
-
- // encoding info is split into 2 parts: the logical wxWin encoding
- // (wxFontEncoding) and a structure containing the native parameters for
- // it (wxNativeEncodingInfo)
- wxFontEncoding GetEncoding() const { return m_encoding; }
- void SetEncoding(wxFontEncoding encoding) { m_encoding = encoding; }
-
- wxNativeEncodingInfo& EncodingInfo() { return m_encodingInfo; }
-
-
- // public for backwards compatibility only: don't use directly
-public:
- wxColour m_fontColour;
- bool m_showHelp;
- bool m_allowSymbols;
- bool m_enableEffects;
- wxFont m_initialFont;
- wxFont m_chosenFont;
- int m_minSize;
- int m_maxSize;
-
-private:
- wxFontEncoding m_encoding;
- wxNativeEncodingInfo m_encodingInfo;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxFontData)
-};
-
-#if wxUSE_PRINTING_ARCHITECTURE
-/*
- * wxPrintData
- * Encapsulates printer information (not printer dialog information)
- */
-
-enum wxPrintBin
-{
- wxPRINTBIN_DEFAULT,
-
- wxPRINTBIN_ONLYONE,
- wxPRINTBIN_LOWER,
- wxPRINTBIN_MIDDLE,
- wxPRINTBIN_MANUAL,
- wxPRINTBIN_ENVELOPE,
- wxPRINTBIN_ENVMANUAL,
- wxPRINTBIN_AUTO,
- wxPRINTBIN_TRACTOR,
- wxPRINTBIN_SMALLFMT,
- wxPRINTBIN_LARGEFMT,
- wxPRINTBIN_LARGECAPACITY,
- wxPRINTBIN_CASSETTE,
- wxPRINTBIN_FORMSOURCE,
-
- wxPRINTBIN_USER
-};
-
-const int wxPRINTMEDIA_DEFAULT = 0;
-
-class WXDLLEXPORT wxPrintData: public wxObject
-{
-public:
- wxPrintData();
- wxPrintData(const wxPrintData& printData);
- virtual ~wxPrintData();
-
- int GetNoCopies() const { return m_printNoCopies; }
- bool GetCollate() const { return m_printCollate; }
- int GetOrientation() const { return m_printOrientation; }
- bool IsOrientationReversed() const { return m_printOrientationReversed; }
-
- // Is this data OK for showing the print dialog?
- bool Ok() const { return IsOk(); }
- bool IsOk() const ;
-
- const wxString& GetPrinterName() const { return m_printerName; }
- bool GetColour() const { return m_colour; }
- wxDuplexMode GetDuplex() const { return m_duplexMode; }
- wxPaperSize GetPaperId() const { return m_paperId; }
- const wxSize& GetPaperSize() const { return m_paperSize; } // Not used yet: confusable with paper size
- // in wxPageSetupDialogData
- wxPrintQuality GetQuality() const { return m_printQuality; }
- wxPrintBin GetBin() const { return m_bin; }
- wxPrintMode GetPrintMode() const { return m_printMode; }
- int GetMedia() const { return m_media; }
-
- void SetNoCopies(int v) { m_printNoCopies = v; }
- void SetCollate(bool flag) { m_printCollate = flag; }
- void SetOrientation(int orient) { m_printOrientation = orient; }
- void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
-
- void SetPrinterName(const wxString& name) { m_printerName = name; }
- void SetColour(bool colour) { m_colour = colour; }
- void SetDuplex(wxDuplexMode duplex) { m_duplexMode = duplex; }
- void SetPaperId(wxPaperSize sizeId) { m_paperId = sizeId; }
- void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
- void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
- void SetBin(wxPrintBin bin) { m_bin = bin; }
- void SetMedia(int media) { m_media = media; }
- void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
-
- wxString GetFilename() const { return m_filename; }
- void SetFilename( const wxString &filename ) { m_filename = filename; }
-
- void operator=(const wxPrintData& data);
-
- char* GetPrivData() const { return m_privData; }
- int GetPrivDataLen() const { return m_privDataLen; }
- void SetPrivData( char *privData, int len );
-
-
-#if WXWIN_COMPATIBILITY_2_4
- // PostScript-specific data
- wxString GetPrinterCommand() const;
- wxString GetPrinterOptions() const;
- wxString GetPreviewCommand() const;
- wxString GetFontMetricPath() const;
- double GetPrinterScaleX() const;
- double GetPrinterScaleY() const;
- long GetPrinterTranslateX() const;
- long GetPrinterTranslateY() const;
-
- void SetPrinterCommand(const wxString& command);
- void SetPrinterOptions(const wxString& options);
- void SetPreviewCommand(const wxString& command);
- void SetFontMetricPath(const wxString& path);
- void SetPrinterScaleX(double x);
- void SetPrinterScaleY(double y);
- void SetPrinterScaling(double x, double y);
- void SetPrinterTranslateX(long x);
- void SetPrinterTranslateY(long y);
- void SetPrinterTranslation(long x, long y);
-#endif
-
- // Convert between wxPrintData and native data
- void ConvertToNative();
- void ConvertFromNative();
- // Holds the native print data
- wxPrintNativeDataBase *GetNativeData() const { return m_nativeData; }
-
-private:
- wxPrintBin m_bin;
- int m_media;
- wxPrintMode m_printMode;
-
- int m_printNoCopies;
- int m_printOrientation;
- bool m_printOrientationReversed;
- bool m_printCollate;
-
- wxString m_printerName;
- bool m_colour;
- wxDuplexMode m_duplexMode;
- wxPrintQuality m_printQuality;
- wxPaperSize m_paperId;
- wxSize m_paperSize;
-
- wxString m_filename;
-
- char* m_privData;
- int m_privDataLen;
-
- wxPrintNativeDataBase *m_nativeData;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxPrintData)
-};
-
-/*
- * wxPrintDialogData
- * Encapsulates information displayed and edited in the printer dialog box.
- * Contains a wxPrintData object which is filled in according to the values retrieved
- * from the dialog.
- */
-
-class WXDLLEXPORT wxPrintDialogData: public wxObject
-{
-public:
- wxPrintDialogData();
- wxPrintDialogData(const wxPrintDialogData& dialogData);
- wxPrintDialogData(const wxPrintData& printData);
- virtual ~wxPrintDialogData();
-
- int GetFromPage() const { return m_printFromPage; }
- int GetToPage() const { return m_printToPage; }
- int GetMinPage() const { return m_printMinPage; }
- int GetMaxPage() const { return m_printMaxPage; }
- int GetNoCopies() const { return m_printNoCopies; }
- bool GetAllPages() const { return m_printAllPages; }
- bool GetSelection() const { return m_printSelection; }
- bool GetCollate() const { return m_printCollate; }
- bool GetPrintToFile() const { return m_printToFile; }
-#if WXWIN_COMPATIBILITY_2_4
- bool GetSetupDialog() const { return m_printSetupDialog; }
-#endif
- void SetFromPage(int v) { m_printFromPage = v; }
- void SetToPage(int v) { m_printToPage = v; }
- void SetMinPage(int v) { m_printMinPage = v; }
- void SetMaxPage(int v) { m_printMaxPage = v; }
- void SetNoCopies(int v) { m_printNoCopies = v; }
- void SetAllPages(bool flag) { m_printAllPages = flag; }
- void SetSelection(bool flag) { m_printSelection = flag; }
- void SetCollate(bool flag) { m_printCollate = flag; }
- void SetPrintToFile(bool flag) { m_printToFile = flag; }
-#if WXWIN_COMPATIBILITY_2_4
- void SetSetupDialog(bool flag) { m_printSetupDialog = flag; }
-#endif
- void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }
- void EnableSelection(bool flag) { m_printEnableSelection = flag; }
- void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }
- void EnableHelp(bool flag) { m_printEnableHelp = flag; }
-
- bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; }
- bool GetEnableSelection() const { return m_printEnableSelection; }
- bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; }
- bool GetEnableHelp() const { return m_printEnableHelp; }
-
- // Is this data OK for showing the print dialog?
- bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_printData.Ok() ; }
-
- wxPrintData& GetPrintData() { return m_printData; }
- void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
-
- void operator=(const wxPrintDialogData& data);
- void operator=(const wxPrintData& data); // Sets internal m_printData member
-
-private:
- int m_printFromPage;
- int m_printToPage;
- int m_printMinPage;
- int m_printMaxPage;
- int m_printNoCopies;
- bool m_printAllPages;
- bool m_printCollate;
- bool m_printToFile;
- bool m_printSelection;
- bool m_printEnableSelection;
- bool m_printEnablePageNumbers;
- bool m_printEnableHelp;
- bool m_printEnablePrintToFile;
-#if WXWIN_COMPATIBILITY_2_4
- bool m_printSetupDialog;
-#endif
- wxPrintData m_printData;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
-};
-
-/*
-* This is the data used (and returned) by the wxPageSetupDialog.
-*/
-
-// Compatibility with old name
-#define wxPageSetupData wxPageSetupDialogData
-
-class WXDLLEXPORT wxPageSetupDialogData: public wxObject
-{
-public:
- wxPageSetupDialogData();
- wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
- wxPageSetupDialogData(const wxPrintData& printData);
- virtual ~wxPageSetupDialogData();
-
- wxSize GetPaperSize() const { return m_paperSize; }
- wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); }
- wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; }
- wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; }
- wxPoint GetMarginTopLeft() const { return m_marginTopLeft; }
- wxPoint GetMarginBottomRight() const { return m_marginBottomRight; }
-
- bool GetDefaultMinMargins() const { return m_defaultMinMargins; }
- bool GetEnableMargins() const { return m_enableMargins; }
- bool GetEnableOrientation() const { return m_enableOrientation; }
- bool GetEnablePaper() const { return m_enablePaper; }
- bool GetEnablePrinter() const { return m_enablePrinter; }
- bool GetDefaultInfo() const { return m_getDefaultInfo; }
- bool GetEnableHelp() const { return m_enableHelp; }
-
- // Is this data OK for showing the page setup dialog?
- bool Ok() const { return IsOk(); }
- bool IsOk() const { return m_printData.Ok() ; }
-
- // If a corresponding paper type is found in the paper database, will set the m_printData
- // paper size id member as well.
- void SetPaperSize(const wxSize& sz);
-
- void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); }
-
- // Sets the wxPrintData id, plus the paper width/height if found in the paper database.
- void SetPaperSize(wxPaperSize id);
-
- void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; }
- void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; }
- void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; }
- void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; }
- void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; }
- void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; }
-
- void EnableMargins(bool flag) { m_enableMargins = flag; }
- void EnableOrientation(bool flag) { m_enableOrientation = flag; }
- void EnablePaper(bool flag) { m_enablePaper = flag; }
- void EnablePrinter(bool flag) { m_enablePrinter = flag; }
- void EnableHelp(bool flag) { m_enableHelp = flag; }
-
- // Use paper size defined in this object to set the wxPrintData
- // paper id
- void CalculateIdFromPaperSize();
-
- // Use paper id in wxPrintData to set this object's paper size
- void CalculatePaperSizeFromId();
-
- wxPageSetupDialogData& operator=(const wxPageSetupData& data);
- wxPageSetupDialogData& operator=(const wxPrintData& data);
-
- wxPrintData& GetPrintData() { return m_printData; }
- const wxPrintData& GetPrintData() const { return m_printData; }
- void SetPrintData(const wxPrintData& printData);
-
-private:
- wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
- wxPoint m_minMarginTopLeft;
- wxPoint m_minMarginBottomRight;
- wxPoint m_marginTopLeft;
- wxPoint m_marginBottomRight;
- bool m_defaultMinMargins;
- bool m_enableMargins;
- bool m_enableOrientation;
- bool m_enablePaper;
- bool m_enablePrinter;
- bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
- bool m_enableHelp;
- wxPrintData m_printData;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
-};
-
-#endif // wxUSE_PRINTING_ARCHITECTURE
-
-#endif
-// _WX_CMNDATA_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/collpane.h b/desmume/src/windows/wx/include/wx/collpane.h
deleted file mode 100644
index 1db6bfb54..000000000
--- a/desmume/src/windows/wx/include/wx/collpane.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/collpane.h
-// Purpose: wxCollapsiblePane
-// Author: Francesco Montorsi
-// Modified by:
-// Created: 8/10/2006
-// RCS-ID: $Id: collpane.h 43300 2006-11-11 07:32:08Z RD $
-// Copyright: (c) Francesco Montorsi
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COLLAPSABLE_PANE_H_BASE_
-#define _WX_COLLAPSABLE_PANE_H_BASE_
-
-#include "wx/defs.h"
-
-
-#if wxUSE_COLLPANE
-
-#include "wx/control.h"
-
-
-// ----------------------------------------------------------------------------
-// wxCollapsiblePaneBase: interface for wxCollapsiblePane
-// ----------------------------------------------------------------------------
-
-#define wxCP_DEFAULT_STYLE (wxTAB_TRAVERSAL | wxNO_BORDER)
-#define wxCP_NO_TLW_RESIZE (0x0002)
-
-class WXDLLIMPEXP_CORE wxCollapsiblePaneBase : public wxControl
-{
-public:
- wxCollapsiblePaneBase() {}
-
- virtual void Collapse(bool collapse = true) = 0;
- void Expand() { Collapse(false); }
-
- virtual bool IsCollapsed() const = 0;
- bool IsExpanded() const { return !IsCollapsed(); }
-
- virtual wxWindow *GetPane() const = 0;
-
- virtual wxString GetLabel() const = 0;
- virtual void SetLabel(const wxString& label) = 0;
-};
-
-
-// ----------------------------------------------------------------------------
-// event types and macros
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, 1102)
-END_DECLARE_EVENT_TYPES()
-
-class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent
-{
-public:
- wxCollapsiblePaneEvent() {}
- wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed)
- : wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id),
- m_bCollapsed(collapsed)
- {
- SetEventObject(generator);
- }
-
- bool GetCollapsed() const { return m_bCollapsed; }
- void SetCollapsed(bool c) { m_bCollapsed = c; }
-
-
- // default copy ctor, assignment operator and dtor are ok
- virtual wxEvent *Clone() const { return new wxCollapsiblePaneEvent(*this); }
-
-private:
- bool m_bCollapsed;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCollapsiblePaneEvent)
-};
-
-// ----------------------------------------------------------------------------
-// event types and macros
-// ----------------------------------------------------------------------------
-
-typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEvent&);
-
-#define wxCollapsiblePaneEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCollapsiblePaneEventFunction, &func)
-
-#define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn))
-
-
-#if defined(__WXGTK24__) && !defined(__WXUNIVERSAL__)
- #include "wx/gtk/collpane.h"
-#else
- #include "wx/generic/collpaneg.h"
-
- // use #define and not a typedef to allow forward declaring the class
- #define wxCollapsiblePane wxGenericCollapsiblePane
-#endif
-
-#endif // wxUSE_COLLPANE
-
-#endif // _WX_COLLAPSABLE_PANE_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/colordlg.h b/desmume/src/windows/wx/include/wx/colordlg.h
deleted file mode 100644
index 83e416dcb..000000000
--- a/desmume/src/windows/wx/include/wx/colordlg.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/colrdlgg.h
-// Purpose: wxColourDialog
-// Author: Vadim Zeitiln
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: colordlg.h 36623 2006-01-02 14:26:36Z JS $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COLORDLG_H_BASE_
-#define _WX_COLORDLG_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_COLOURDLG
-
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/colordlg.h"
-#elif defined(__WXMAC__) && !defined(__WXUNIVERSAL__)
- #include "wx/mac/colordlg.h"
-#elif defined(__WXGTK20__) && !defined(__WXUNIVERSAL__)
- #include "wx/gtk/colordlg.h"
-#elif defined(__WXPALMOS__)
- #include "wx/palmos/colordlg.h"
-#else
- #include "wx/generic/colrdlgg.h"
-
- #define wxColourDialog wxGenericColourDialog
-#endif
-
-// get the colour from user and return it
-wxColour WXDLLEXPORT
-wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
- const wxColour& colInit = wxNullColour, const wxString& caption = wxEmptyString);
-
-#endif // wxUSE_COLOURDLG
-
-#endif
- // _WX_COLORDLG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/colour.h b/desmume/src/windows/wx/include/wx/colour.h
deleted file mode 100644
index bb396f0fe..000000000
--- a/desmume/src/windows/wx/include/wx/colour.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/colour.h
-// Purpose: wxColourBase definition
-// Author: Julian Smart
-// Modified by: Francesco Montorsi
-// Created:
-// RCS-ID: $Id: colour.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COLOUR_H_BASE_
-#define _WX_COLOUR_H_BASE_
-
-#include "wx/defs.h"
-#include "wx/gdiobj.h"
-
-
-class WXDLLIMPEXP_FWD_CORE wxColour;
-
-// the standard wxColour constructors;
-// this macro avoids to repeat these lines across all colour.h files, since
-// Set() is a virtual function and thus cannot be called by wxColourBase
-// constructors
-#define DEFINE_STD_WXCOLOUR_CONSTRUCTORS \
- wxColour( ChannelType red, ChannelType green, ChannelType blue, \
- ChannelType alpha = wxALPHA_OPAQUE ) \
- { Set(red, green, blue, alpha); } \
- wxColour( unsigned long colRGB ) { Set(colRGB); } \
- wxColour(const wxString &colourName) { Set(colourName); } \
- wxColour(const wxChar *colourName) { Set(colourName); }
-
-
-// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
-#define wxC2S_NAME 1 // return colour name, when possible
-#define wxC2S_CSS_SYNTAX 2 // return colour in rgb(r,g,b) syntax
-#define wxC2S_HTML_SYNTAX 4 // return colour in #rrggbb syntax
-
-
-const unsigned char wxALPHA_TRANSPARENT = 0;
-const unsigned char wxALPHA_OPAQUE = 0xff;
-
-// ----------------------------------------------------------------------------
-// wxVariant support
-// ----------------------------------------------------------------------------
-
-#if wxUSE_VARIANT
-#include "wx/variant.h"
-DECLARE_VARIANT_OBJECT_EXPORTED(wxColour,WXDLLEXPORT)
-#endif
-
-//-----------------------------------------------------------------------------
-// wxColourBase: this class has no data members, just some functions to avoid
-// code redundancy in all native wxColour implementations
-//-----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxColourBase : public wxGDIObject
-{
-public:
- // type of a single colour component
- typedef unsigned char ChannelType;
-
- wxColourBase() {}
- virtual ~wxColourBase() {}
-
-
- // Set() functions
- // ---------------
-
- void Set(ChannelType red,
- ChannelType green,
- ChannelType blue,
- ChannelType alpha = wxALPHA_OPAQUE)
- { InitRGBA(red,green,blue, alpha); }
-
- // implemented in colourcmn.cpp
- bool Set(const wxChar *str)
- { return FromString(str); }
-
- bool Set(const wxString &str)
- { return FromString(str); }
-
- void Set(unsigned long colRGB)
- {
- // we don't need to know sizeof(long) here because we assume that the three
- // least significant bytes contain the R, G and B values
- Set((ChannelType)(0xFF & colRGB),
- (ChannelType)(0xFF & (colRGB >> 8)),
- (ChannelType)(0xFF & (colRGB >> 16)));
- }
-
-
-
- // accessors
- // ---------
-
- virtual bool Ok() const { return IsOk(); }
- virtual bool IsOk() const = 0;
-
- virtual ChannelType Red() const = 0;
- virtual ChannelType Green() const = 0;
- virtual ChannelType Blue() const = 0;
- virtual ChannelType Alpha() const
- { return wxALPHA_OPAQUE ; }
-
- // implemented in colourcmn.cpp
- virtual wxString GetAsString(long flags = wxC2S_NAME | wxC2S_CSS_SYNTAX) const;
-
-
-
- // old, deprecated
- // ---------------
-
-#if WXWIN_COMPATIBILITY_2_6
- wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
- wxDEPRECATED( void InitFromName(const wxString& col) );
-#endif
-
-protected:
- virtual void
- InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a) = 0;
-
- virtual bool FromString(const wxChar *s);
-};
-
-
-
-#if defined(__WXPALMOS__)
- #include "wx/generic/colour.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/colour.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/colour.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/colour.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/colour.h"
-#elif defined(__WXMGL__)
- #include "wx/generic/colour.h"
-#elif defined(__WXDFB__)
- #include "wx/generic/colour.h"
-#elif defined(__WXX11__)
- #include "wx/x11/colour.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/colour.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/colour.h"
-#elif defined(__WXPM__)
- #include "wx/os2/colour.h"
-#endif
-
-#define wxColor wxColour
-
-#endif // _WX_COLOUR_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/combo.h b/desmume/src/windows/wx/include/wx/combo.h
deleted file mode 100644
index 52c8af4fb..000000000
--- a/desmume/src/windows/wx/include/wx/combo.h
+++ /dev/null
@@ -1,746 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/combo.h
-// Purpose: wxComboCtrl declaration
-// Author: Jaakko Salli
-// Modified by:
-// Created: Apr-30-2006
-// RCS-ID: $Id: combo.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) Jaakko Salli
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COMBOCONTROL_H_BASE_
-#define _WX_COMBOCONTROL_H_BASE_
-
-
-/*
- A few words about all the classes defined in this file are probably in
- order: why do we need extra wxComboCtrl and wxComboPopup classes?
-
- This is because a traditional combobox is a combination of a text control
- (with a button allowing to open the pop down list) with a listbox and
- wxComboBox class is exactly such control, however we want to also have other
- combinations - in fact, we want to allow anything at all to be used as pop
- down list, not just a wxListBox.
-
- So we define a base wxComboCtrl which can use any control as pop down
- list and wxComboBox deriving from it which implements the standard wxWidgets
- combobox API. wxComboCtrl needs to be told somehow which control to use
- and this is done by SetPopupControl(). However, we need something more than
- just a wxControl in this method as, for example, we need to call
- SetSelection("initial text value") and wxControl doesn't have such method.
- So we also need a wxComboPopup which is just a very simple interface which
- must be implemented by a control to be usable as a popup.
-
- We couldn't derive wxComboPopup from wxControl as this would make it
- impossible to have a class deriving from both wxListBx and from it, so
- instead it is just a mix-in.
- */
-
-
-#include "wx/defs.h"
-
-#if wxUSE_COMBOCTRL
-
-#include "wx/control.h"
-#include "wx/renderer.h" // this is needed for wxCONTROL_XXX flags
-#include "wx/bitmap.h" // wxBitmap used by-value
-
-class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
-class WXDLLIMPEXP_FWD_CORE wxComboPopup;
-
-//
-// New window styles for wxComboCtrlBase
-//
-enum
-{
- // Double-clicking a read-only combo triggers call to popup's OnComboPopup.
- // In wxOwnerDrawnComboBox, for instance, it cycles item.
- wxCC_SPECIAL_DCLICK = 0x0100,
-
- // Dropbutton acts like standard push button.
- wxCC_STD_BUTTON = 0x0200
-};
-
-
-// wxComboCtrl internal flags
-enum
-{
- // First those that can be passed to Customize.
- // It is Windows style for all flags to be clear.
-
- // Button is preferred outside the border (GTK style)
- wxCC_BUTTON_OUTSIDE_BORDER = 0x0001,
- // Show popup on mouse up instead of mouse down (which is the Windows style)
- wxCC_POPUP_ON_MOUSE_UP = 0x0002,
- // All text is not automatically selected on click
- wxCC_NO_TEXT_AUTO_SELECT = 0x0004,
-
- // Internal use: signals creation is complete
- wxCC_IFLAG_CREATED = 0x0100,
- // Internal use: really put button outside
- wxCC_IFLAG_BUTTON_OUTSIDE = 0x0200,
- // Internal use: SetTextIndent has been called
- wxCC_IFLAG_INDENT_SET = 0x0400,
- // Internal use: Set wxTAB_TRAVERSAL to parent when popup is dismissed
- wxCC_IFLAG_PARENT_TAB_TRAVERSAL = 0x0800,
- // Internal use: Secondary popup window type should be used (if available).
- wxCC_IFLAG_USE_ALT_POPUP = 0x1000,
- // Internal use: Skip popup animation.
- wxCC_IFLAG_DISABLE_POPUP_ANIM = 0x2000
-};
-
-
-// Flags used by PreprocessMouseEvent and HandleButtonMouseEvent
-enum
-{
- wxCC_MF_ON_BUTTON = 0x0001, // cursor is on dropbutton area
- wxCC_MF_ON_CLICK_AREA = 0x0002 // cursor is on dropbutton or other area
- // that can be clicked to show the popup.
-};
-
-
-// Namespace for wxComboCtrl feature flags
-struct wxComboCtrlFeatures
-{
- enum
- {
- MovableButton = 0x0001, // Button can be on either side of control
- BitmapButton = 0x0002, // Button may be replaced with bitmap
- ButtonSpacing = 0x0004, // Button can have spacing from the edge
- // of the control
- TextIndent = 0x0008, // SetTextIndent can be used
- PaintControl = 0x0010, // Combo control itself can be custom painted
- PaintWritable = 0x0020, // A variable-width area in front of writable
- // combo control's textctrl can be custom
- // painted
- Borderless = 0x0040, // wxNO_BORDER window style works
-
- // There are no feature flags for...
- // PushButtonBitmapBackground - if its in wxRendererNative, then it should be
- // not an issue to have it automatically under the bitmap.
-
- All = MovableButton|BitmapButton|
- ButtonSpacing|TextIndent|
- PaintControl|PaintWritable|
- Borderless
- };
-};
-
-
-class WXDLLEXPORT wxComboCtrlBase : public wxControl
-{
- friend class wxComboPopup;
-public:
- // ctors and such
- wxComboCtrlBase() : wxControl() { Init(); }
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxString& value,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString& name);
-
- virtual ~wxComboCtrlBase();
-
- // show/hide popup window
- virtual void ShowPopup();
- virtual void HidePopup();
-
- // Override for totally custom combo action
- virtual void OnButtonClick();
-
- // return true if the popup is currently shown
- bool IsPopupShown() const { return m_popupWinState == Visible; }
-
- // set interface class instance derived from wxComboPopup
- // NULL popup can be used to indicate default in a derived class
- void SetPopupControl( wxComboPopup* popup )
- {
- DoSetPopupControl(popup);
- }
-
- // get interface class instance derived from wxComboPopup
- wxComboPopup* GetPopupControl()
- {
- EnsurePopupControl();
- return m_popupInterface;
- }
-
- // get the popup window containing the popup control
- wxWindow *GetPopupWindow() const { return m_winPopup; }
-
- // Get the text control which is part of the combobox.
- wxTextCtrl *GetTextCtrl() const { return m_text; }
-
- // get the dropdown button which is part of the combobox
- // note: its not necessarily a wxButton or wxBitmapButton
- wxWindow *GetButton() const { return m_btn; }
-
- // forward these methods to all subcontrols
- virtual bool Enable(bool enable = true);
- virtual bool Show(bool show = true);
- virtual bool SetFont(const wxFont& font);
-#if wxUSE_VALIDATORS
- virtual void SetValidator(const wxValidator &validator);
- virtual wxValidator *GetValidator();
-#endif // wxUSE_VALIDATORS
-
- // wxTextCtrl methods - for readonly combo they should return
- // without errors.
- virtual wxString GetValue() const;
- virtual void SetValue(const wxString& value);
- virtual void Copy();
- virtual void Cut();
- virtual void Paste();
- virtual void SetInsertionPoint(long pos);
- virtual void SetInsertionPointEnd();
- virtual long GetInsertionPoint() const;
- virtual long GetLastPosition() const;
- virtual void Replace(long from, long to, const wxString& value);
- virtual void Remove(long from, long to);
- virtual void SetSelection(long from, long to);
- virtual void Undo();
-
- // This method sets the text without affecting list selection
- // (ie. wxComboPopup::SetStringValue doesn't get called).
- void SetText(const wxString& value);
-
- // This method sets value and also optionally sends EVT_TEXT
- // (needed by combo popups)
- void SetValueWithEvent(const wxString& value, bool withEvent = true);
-
- //
- // Popup customization methods
- //
-
- // Sets minimum width of the popup. If wider than combo control, it will extend to the left.
- // Remarks:
- // * Value -1 indicates the default.
- // * Custom popup may choose to ignore this (wxOwnerDrawnComboBox does not).
- void SetPopupMinWidth( int width )
- {
- m_widthMinPopup = width;
- }
-
- // Sets preferred maximum height of the popup.
- // Remarks:
- // * Value -1 indicates the default.
- // * Custom popup may choose to ignore this (wxOwnerDrawnComboBox does not).
- void SetPopupMaxHeight( int height )
- {
- m_heightPopup = height;
- }
-
- // Extends popup size horizontally, relative to the edges of the combo control.
- // Remarks:
- // * Popup minimum width may override extLeft (ie. it has higher precedence).
- // * Values 0 indicate default.
- // * Custom popup may not take this fully into account (wxOwnerDrawnComboBox takes).
- void SetPopupExtents( int extLeft, int extRight )
- {
- m_extLeft = extLeft;
- m_extRight = extRight;
- }
-
- // Set width, in pixels, of custom paint area in writable combo.
- // In read-only, used to indicate area that is not covered by the
- // focus rectangle (which may or may not be drawn, depending on the
- // popup type).
- void SetCustomPaintWidth( int width );
- int GetCustomPaintWidth() const { return m_widthCustomPaint; }
-
- // Set side of the control to which the popup will align itself.
- // Valid values are wxLEFT, wxRIGHT and 0. The default value 0 wmeans
- // that the side of the button will be used.
- void SetPopupAnchor( int anchorSide )
- {
- m_anchorSide = anchorSide;
- }
-
- // Set position of dropdown button.
- // width: button width. <= 0 for default.
- // height: button height. <= 0 for default.
- // side: wxLEFT or wxRIGHT, indicates on which side the button will be placed.
- // spacingX: empty space on sides of the button. Default is 0.
- // Remarks:
- // There is no spacingY - the button will be centered vertically.
- void SetButtonPosition( int width = -1,
- int height = -1,
- int side = wxRIGHT,
- int spacingX = 0 );
-
- // Returns current size of the dropdown button.
- wxSize GetButtonSize();
-
- //
- // Sets dropbutton to be drawn with custom bitmaps.
- //
- // bmpNormal: drawn when cursor is not on button
- // pushButtonBg: Draw push button background below the image.
- // NOTE! This is usually only properly supported on platforms with appropriate
- // method in wxRendererNative.
- // bmpPressed: drawn when button is depressed
- // bmpHover: drawn when cursor hovers on button. This is ignored on platforms
- // that do not generally display hover differently.
- // bmpDisabled: drawn when combobox is disabled.
- void SetButtonBitmaps( const wxBitmap& bmpNormal,
- bool pushButtonBg = false,
- const wxBitmap& bmpPressed = wxNullBitmap,
- const wxBitmap& bmpHover = wxNullBitmap,
- const wxBitmap& bmpDisabled = wxNullBitmap );
-
- //
- // This will set the space in pixels between left edge of the control and the
- // text, regardless whether control is read-only (ie. no wxTextCtrl) or not.
- // Platform-specific default can be set with value-1.
- // Remarks
- // * This method may do nothing on some native implementations.
- void SetTextIndent( int indent );
-
- // Returns actual indentation in pixels.
- wxCoord GetTextIndent() const
- {
- return m_absIndent;
- }
-
- // Returns area covered by the text field.
- const wxRect& GetTextRect() const
- {
- return m_tcArea;
- }
-
- // Call with enable as true to use a type of popup window that guarantees ability
- // to focus the popup control, and normal function of common native controls.
- // This alternative popup window is usually a wxDialog, and as such it's parent
- // frame will appear as if the focus has been lost from it.
- void UseAltPopupWindow( bool enable = true )
- {
- wxASSERT_MSG( !m_winPopup,
- wxT("call this only before SetPopupControl") );
-
- if ( enable )
- m_iFlags |= wxCC_IFLAG_USE_ALT_POPUP;
- else
- m_iFlags &= ~wxCC_IFLAG_USE_ALT_POPUP;
- }
-
- // Call with false to disable popup animation, if any.
- void EnablePopupAnimation( bool enable = true )
- {
- if ( enable )
- m_iFlags &= ~wxCC_IFLAG_DISABLE_POPUP_ANIM;
- else
- m_iFlags |= wxCC_IFLAG_DISABLE_POPUP_ANIM;
- }
-
- //
- // Utilies needed by the popups or native implementations
- //
-
- // Returns true if given key combination should toggle the popup.
- // NB: This is a separate from other keyboard handling because:
- // 1) Replaceability.
- // 2) Centralized code (otherwise it'd be split up between
- // wxComboCtrl key handler and wxVListBoxComboPopup's
- // key handler).
- virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const = 0;
-
- // Prepare background of combo control or an item in a dropdown list
- // in a way typical on platform. This includes painting the focus/disabled
- // background and setting the clipping region.
- // Unless you plan to paint your own focus indicator, you should always call this
- // in your wxComboPopup::PaintComboControl implementation.
- // In addition, it sets pen and text colour to what looks good and proper
- // against the background.
- // flags: wxRendererNative flags: wxCONTROL_ISSUBMENU: is drawing a list item instead of combo control
- // wxCONTROL_SELECTED: list item is selected
- // wxCONTROL_DISABLED: control/item is disabled
- virtual void PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const;
-
- // Returns true if focus indicator should be drawn in the control.
- bool ShouldDrawFocus() const
- {
- const wxWindow* curFocus = FindFocus();
- return ( !IsPopupShown() &&
- (curFocus == this || (m_btn && curFocus == m_btn)) &&
- (m_windowStyle & wxCB_READONLY) );
- }
-
- // These methods return references to appropriate dropbutton bitmaps
- const wxBitmap& GetBitmapNormal() const { return m_bmpNormal; }
- const wxBitmap& GetBitmapPressed() const { return m_bmpPressed; }
- const wxBitmap& GetBitmapHover() const { return m_bmpHover; }
- const wxBitmap& GetBitmapDisabled() const { return m_bmpDisabled; }
-
- // Return internal flags
- wxUint32 GetInternalFlags() const { return m_iFlags; }
-
- // Return true if Create has finished
- bool IsCreated() const { return m_iFlags & wxCC_IFLAG_CREATED ? true : false; }
-
- // common code to be called on popup hide/dismiss
- void OnPopupDismiss();
-
- // PopupShown states
- enum
- {
- Hidden = 0,
- //Closing = 1,
- Animating = 2,
- Visible = 3
- };
-
- bool IsPopupWindowState( int state ) const { return (state == m_popupWinState) ? true : false; }
-
- wxByte GetPopupWindowState() const { return m_popupWinState; }
-
- // Set value returned by GetMainWindowOfCompositeControl
- void SetCtrlMainWnd( wxWindow* wnd ) { m_mainCtrlWnd = wnd; }
-
-protected:
-
- //
- // Override these for customization purposes
- //
-
- // called from wxSizeEvent handler
- virtual void OnResize() = 0;
-
- // Return native text identation (for pure text, not textctrl)
- virtual wxCoord GetNativeTextIndent() const;
-
- // Called in syscolourchanged handler and base create
- virtual void OnThemeChange();
-
- // Creates wxTextCtrl.
- // extraStyle: Extra style parameters
- void CreateTextCtrl( int extraStyle, const wxValidator& validator );
-
- // Installs standard input handler to combo (and optionally to the textctrl)
- void InstallInputHandlers();
-
- // flags for DrawButton()
- enum
- {
- Draw_PaintBg = 1
- };
-
- // Draws dropbutton. Using wxRenderer or bitmaps, as appropriate.
- void DrawButton( wxDC& dc, const wxRect& rect, int flags = Draw_PaintBg );
-
- // Call if cursor is on button area or mouse is captured for the button.
- //bool HandleButtonMouseEvent( wxMouseEvent& event, bool isInside );
- bool HandleButtonMouseEvent( wxMouseEvent& event, int flags );
-
- // returns true if event was consumed or filtered (event type is also set to 0 in this case)
- bool PreprocessMouseEvent( wxMouseEvent& event, int flags );
-
- //
- // This will handle left_down and left_dclick events outside button in a Windows-like manner.
- // If you need alternate behaviour, it is recommended you manipulate and filter events to it
- // instead of building your own handling routine (for reference, on wxEVT_LEFT_DOWN it will
- // toggle popup and on wxEVT_LEFT_DCLICK it will do the same or run the popup's dclick method,
- // if defined - you should pass events of other types of it for common processing).
- void HandleNormalMouseEvent( wxMouseEvent& event );
-
- // Creates popup window, calls interface->Create(), etc
- void CreatePopup();
-
- // Destroy popup window and all related constructs
- void DestroyPopup();
-
- // override the base class virtuals involved in geometry calculations
- virtual wxSize DoGetBestSize() const;
-
- // NULL popup can be used to indicate default in a derived class
- virtual void DoSetPopupControl(wxComboPopup* popup);
-
- // ensures there is atleast the default popup
- void EnsurePopupControl();
-
- // Recalculates button and textctrl areas. Called when size or button setup change.
- // btnWidth: default/calculated width of the dropbutton. 0 means unchanged,
- // just recalculate.
- void CalculateAreas( int btnWidth = 0 );
-
- // Standard textctrl positioning routine. Just give it platform-dependant
- // textctrl coordinate adjustment.
- void PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust );
-
- // event handlers
- void OnSizeEvent( wxSizeEvent& event );
- void OnFocusEvent(wxFocusEvent& event);
- void OnIdleEvent(wxIdleEvent& event);
- void OnTextCtrlEvent(wxCommandEvent& event);
- void OnSysColourChanged(wxSysColourChangedEvent& event);
- void OnKeyEvent(wxKeyEvent& event);
-
- // Set customization flags (directs how wxComboCtrlBase helpers behave)
- void Customize( wxUint32 flags ) { m_iFlags |= flags; }
-
- // Dispatches size event and refreshes
- void RecalcAndRefresh();
-
- // Flags for DoShowPopup and AnimateShow
- enum
- {
- ShowBelow = 0x0000, // Showing popup below the control
- ShowAbove = 0x0001, // Showing popup above the control
- CanDeferShow = 0x0002 // Can only return true from AnimateShow if this is set
- };
-
- // Shows and positions the popup.
- virtual void DoShowPopup( const wxRect& rect, int flags );
-
- // Implement in derived class to create a drop-down animation.
- // Return true if finished immediately. Otherwise popup is only
- // shown when the derived class call DoShowPopup.
- // Flags are same as for DoShowPopup.
- virtual bool AnimateShow( const wxRect& rect, int flags );
-
-#if wxUSE_TOOLTIPS
- virtual void DoSetToolTip( wxToolTip *tip );
-#endif
-
- virtual wxWindow *GetMainWindowOfCompositeControl()
- { return m_mainCtrlWnd; }
-
- // This is used when m_text is hidden (readonly).
- wxString m_valueString;
-
- // the text control and button we show all the time
- wxTextCtrl* m_text;
- wxWindow* m_btn;
-
- // wxPopupWindow or similar containing the window managed by the interface.
- wxWindow* m_winPopup;
-
- // the popup control/panel
- wxWindow* m_popup;
-
- // popup interface
- wxComboPopup* m_popupInterface;
-
- // this is input etc. handler for the text control
- wxEvtHandler* m_textEvtHandler;
-
- // this is for the top level window
- wxEvtHandler* m_toplevEvtHandler;
-
- // this is for the control in popup
- wxEvtHandler* m_popupExtraHandler;
-
- // this is for the popup window
- wxEvtHandler* m_popupWinEvtHandler;
-
- // main (ie. topmost) window of a composite control (default = this)
- wxWindow* m_mainCtrlWnd;
-
- // used to prevent immediate re-popupping incase closed popup
- // by clicking on the combo control (needed because of inconsistent
- // transient implementation across platforms).
- wxLongLong m_timeCanAcceptClick;
-
- // how much popup should expand to the left/right of the control
- wxCoord m_extLeft;
- wxCoord m_extRight;
-
- // minimum popup width
- wxCoord m_widthMinPopup;
-
- // preferred popup height
- wxCoord m_heightPopup;
-
- // how much of writable combo is custom-paint by callback?
- // also used to indicate area that is not covered by "blue"
- // selection indicator.
- wxCoord m_widthCustomPaint;
-
- // absolute text indentation, in pixels
- wxCoord m_absIndent;
-
- // side on which the popup is aligned
- int m_anchorSide;
-
- // Width of the "fake" border
- wxCoord m_widthCustomBorder;
-
- // The button and textctrl click/paint areas
- wxRect m_tcArea;
- wxRect m_btnArea;
-
- // current button state (uses renderer flags)
- int m_btnState;
-
- // button position
- int m_btnWid;
- int m_btnHei;
- int m_btnSide;
- int m_btnSpacingX;
-
- // last default button width
- int m_btnWidDefault;
-
- // custom dropbutton bitmaps
- wxBitmap m_bmpNormal;
- wxBitmap m_bmpPressed;
- wxBitmap m_bmpHover;
- wxBitmap m_bmpDisabled;
-
- // area used by the button
- wxSize m_btnSize;
-
- // platform-dependant customization and other flags
- wxUint32 m_iFlags;
-
- // draw blank button background under bitmap?
- bool m_blankButtonBg;
-
- // is the popup window currenty shown?
- wxByte m_popupWinState;
-
- // should the focus be reset to the textctrl in idle time?
- bool m_resetFocus;
-
-private:
- void Init();
-
- wxByte m_ignoreEvtText; // Number of next EVT_TEXTs to ignore
-
- // Is popup window wxPopupTransientWindow, wxPopupWindow or wxDialog?
- wxByte m_popupWinType;
-
- DECLARE_EVENT_TABLE()
-
- DECLARE_ABSTRACT_CLASS(wxComboCtrlBase)
-};
-
-
-// ----------------------------------------------------------------------------
-// wxComboPopup is the interface which must be implemented by a control to be
-// used as a popup by wxComboCtrl
-// ----------------------------------------------------------------------------
-
-
-// wxComboPopup internal flags
-enum
-{
- wxCP_IFLAG_CREATED = 0x0001 // Set by wxComboCtrlBase after Create is called
-};
-
-
-class WXDLLEXPORT wxComboPopup
-{
- friend class wxComboCtrlBase;
-public:
- wxComboPopup()
- {
- m_combo = (wxComboCtrlBase*) NULL;
- m_iFlags = 0;
- }
-
- // This is called immediately after construction finishes. m_combo member
- // variable has been initialized before the call.
- // NOTE: It is not in constructor so the derived class doesn't need to redefine
- // a default constructor of its own.
- virtual void Init() { }
-
- virtual ~wxComboPopup();
-
- // Create the popup child control.
- // Return true for success.
- virtual bool Create(wxWindow* parent) = 0;
-
- // We must have an associated control which is subclassed by the combobox.
- virtual wxWindow *GetControl() = 0;
-
- // Called immediately after the popup is shown
- virtual void OnPopup();
-
- // Called when popup is dismissed
- virtual void OnDismiss();
-
- // Called just prior to displaying popup.
- // Default implementation does nothing.
- virtual void SetStringValue( const wxString& value );
-
- // Gets displayed string representation of the value.
- virtual wxString GetStringValue() const = 0;
-
- // This is called to custom paint in the combo control itself (ie. not the popup).
- // Default implementation draws value as string.
- virtual void PaintComboControl( wxDC& dc, const wxRect& rect );
-
- // Receives key events from the parent wxComboCtrl.
- // Events not handled should be skipped, as usual.
- virtual void OnComboKeyEvent( wxKeyEvent& event );
-
- // Implement if you need to support special action when user
- // double-clicks on the parent wxComboCtrl.
- virtual void OnComboDoubleClick();
-
- // Return final size of popup. Called on every popup, just prior to OnShow.
- // minWidth = preferred minimum width for window
- // prefHeight = preferred height. Only applies if > 0,
- // maxHeight = max height for window, as limited by screen size
- // and should only be rounded down, if necessary.
- virtual wxSize GetAdjustedSize( int minWidth, int prefHeight, int maxHeight );
-
- // Return true if you want delay call to Create until the popup is shown
- // for the first time. It is more efficient, but note that it is often
- // more convenient to have the control created immediately.
- // Default returns false.
- virtual bool LazyCreate();
-
- //
- // Utilies
- //
-
- // Hides the popup
- void Dismiss();
-
- // Returns true if Create has been called.
- bool IsCreated() const
- {
- return (m_iFlags & wxCP_IFLAG_CREATED) ? true : false;
- }
-
- // Default PaintComboControl behaviour
- static void DefaultPaintComboControl( wxComboCtrlBase* combo,
- wxDC& dc,
- const wxRect& rect );
-
-protected:
- wxComboCtrlBase* m_combo;
- wxUint32 m_iFlags;
-
-private:
- // Called in wxComboCtrlBase::SetPopupControl
- void InitBase(wxComboCtrlBase *combo)
- {
- m_combo = combo;
- }
-};
-
-
-// ----------------------------------------------------------------------------
-// include the platform-dependent header defining the real class
-// ----------------------------------------------------------------------------
-
-#if defined(__WXUNIVERSAL__)
- // No native universal (but it must still be first in the list)
-#elif defined(__WXMSW__)
- #include "wx/msw/combo.h"
-#endif
-
-// Any ports may need generic as an alternative
-#include "wx/generic/combo.h"
-
-#endif // wxUSE_COMBOCTRL
-
-#endif
- // _WX_COMBOCONTROL_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/combobox.h b/desmume/src/windows/wx/include/wx/combobox.h
deleted file mode 100644
index 1b3170567..000000000
--- a/desmume/src/windows/wx/include/wx/combobox.h
+++ /dev/null
@@ -1,97 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/combobox.h
-// Purpose: wxComboBox declaration
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 24.12.00
-// RCS-ID: $Id: combobox.h 42727 2006-10-30 16:04:27Z VZ $
-// Copyright: (c) 1996-2000 wxWidgets team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_COMBOBOX_H_BASE_
-#define _WX_COMBOBOX_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_COMBOBOX
-
-extern WXDLLEXPORT_DATA(const wxChar) wxComboBoxNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxComboBoxBase: this interface defines the methods wxComboBox must implement
-// ----------------------------------------------------------------------------
-
-#include "wx/textctrl.h"
-#include "wx/ctrlsub.h"
-
-class WXDLLEXPORT wxComboBoxBase : public wxItemContainer
-{
-public:
- // wxTextCtrl-like methods wxComboBox must implement
- virtual wxString GetValue() const = 0;
- virtual void SetValue(const wxString& value) = 0;
-
- virtual void Copy() = 0;
- virtual void Cut() = 0;
- virtual void Paste() = 0;
- virtual void SetInsertionPoint(long pos) = 0;
- virtual long GetInsertionPoint() const = 0;
- virtual wxTextPos GetLastPosition() const = 0;
- virtual void Replace(long from, long to, const wxString& value) = 0;
- virtual void SetSelection(long from, long to) = 0;
- virtual void SetEditable(bool editable) = 0;
-
- virtual void SetInsertionPointEnd()
- { SetInsertionPoint(GetLastPosition()); }
- virtual void Remove(long from, long to)
- { Replace(from, to, wxEmptyString); }
-
- virtual bool IsEditable() const = 0;
-
- virtual void Undo() = 0;
- virtual void Redo() = 0;
- virtual void SelectAll() = 0;
-
- virtual bool CanCopy() const = 0;
- virtual bool CanCut() const = 0;
- virtual bool CanPaste() const = 0;
- virtual bool CanUndo() const = 0;
- virtual bool CanRedo() const = 0;
-
- // may return value different from GetSelection() when the combobox
- // dropdown is shown and the user selected, but not yet accepted, a value
- // different from the old one in it
- virtual int GetCurrentSelection() const { return GetSelection(); }
-
- // redeclare inherited SetSelection() overload here as well to avoid
- // virtual function hiding
- virtual void SetSelection(int n) = 0;
-};
-
-// ----------------------------------------------------------------------------
-// include the platform-dependent header defining the real class
-// ----------------------------------------------------------------------------
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/combobox.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/combobox.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/combobox.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/combobox.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/combobox.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/combobox.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/combobox.h"
-#elif defined(__WXPM__)
- #include "wx/os2/combobox.h"
-#endif
-
-#endif // wxUSE_COMBOBOX
-
-#endif
- // _WX_COMBOBOX_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/confbase.h b/desmume/src/windows/wx/include/wx/confbase.h
deleted file mode 100644
index 9e0cf54b5..000000000
--- a/desmume/src/windows/wx/include/wx/confbase.h
+++ /dev/null
@@ -1,359 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: confbase.h
-// Purpose: declaration of the base class of all config implementations
-// (see also: fileconf.h and msw/regconf.h and iniconf.h)
-// Author: Karsten Ballueder & Vadim Zeitlin
-// Modified by:
-// Created: 07.04.98 (adapted from appconf.h)
-// RCS-ID: $Id: confbase.h 50711 2007-12-15 02:57:58Z VZ $
-// Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net
-// Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CONFBASE_H_
-#define _WX_CONFBASE_H_
-
-#include "wx/defs.h"
-#include "wx/string.h"
-
-class WXDLLIMPEXP_FWD_BASE wxArrayString;
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-/// shall we be case sensitive in parsing variable names?
-#ifndef wxCONFIG_CASE_SENSITIVE
- #define wxCONFIG_CASE_SENSITIVE 0
-#endif
-
-/// separates group and entry names (probably shouldn't be changed)
-#ifndef wxCONFIG_PATH_SEPARATOR
- #define wxCONFIG_PATH_SEPARATOR _T('/')
-#endif
-
-/// introduces immutable entries
-// (i.e. the ones which can't be changed from the local config file)
-#ifndef wxCONFIG_IMMUTABLE_PREFIX
- #define wxCONFIG_IMMUTABLE_PREFIX _T('!')
-#endif
-
-#if wxUSE_CONFIG
-
-#include "wx/string.h"
-
-/// should we use registry instead of configuration files under Windows?
-// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
-// false) or wxRegConfig (if it's true and we're under Win32))
-#ifndef wxUSE_CONFIG_NATIVE
- #define wxUSE_CONFIG_NATIVE 1
-#endif
-
-// Style flags for constructor style parameter
-enum
-{
- wxCONFIG_USE_LOCAL_FILE = 1,
- wxCONFIG_USE_GLOBAL_FILE = 2,
- wxCONFIG_USE_RELATIVE_PATH = 4,
- wxCONFIG_USE_NO_ESCAPE_CHARACTERS = 8,
- wxCONFIG_USE_SUBDIR = 16
-};
-
-// ----------------------------------------------------------------------------
-// abstract base class wxConfigBase which defines the interface for derived
-// classes
-//
-// wxConfig organizes the items in a tree-like structure (modeled after the
-// Unix/Dos filesystem). There are groups (directories) and keys (files).
-// There is always one current group given by the current path.
-//
-// Keys are pairs "key_name = value" where value may be of string or integer
-// (long) type (TODO doubles and other types such as wxDate coming soon).
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxConfigBase
-{
-public:
- // constants
- // the type of an entry
- enum EntryType
- {
- Type_Unknown,
- Type_String,
- Type_Boolean,
- Type_Integer, // use Read(long *)
- Type_Float // use Read(double *)
- };
-
- // static functions
- // sets the config object, returns the previous pointer
- static wxConfigBase *Set(wxConfigBase *pConfig);
- // get the config object, creates it on demand unless DontCreateOnDemand
- // was called
- static wxConfigBase *Get(bool createOnDemand = true)
- { if ( createOnDemand && (!ms_pConfig) ) Create(); return ms_pConfig; }
- // create a new config object: this function will create the "best"
- // implementation of wxConfig available for the current platform, see
- // comments near definition wxUSE_CONFIG_NATIVE for details. It returns
- // the created object and also sets it as ms_pConfig.
- static wxConfigBase *Create();
- // should Get() try to create a new log object if the current one is NULL?
- static void DontCreateOnDemand() { ms_bAutoCreate = false; }
-
- // ctor & virtual dtor
- // ctor (can be used as default ctor too)
- //
- // Not all args will always be used by derived classes, but including
- // them all in each class ensures compatibility. If appName is empty,
- // uses wxApp name
- wxConfigBase(const wxString& appName = wxEmptyString,
- const wxString& vendorName = wxEmptyString,
- const wxString& localFilename = wxEmptyString,
- const wxString& globalFilename = wxEmptyString,
- long style = 0);
-
- // empty but ensures that dtor of all derived classes is virtual
- virtual ~wxConfigBase();
-
- // path management
- // set current path: if the first character is '/', it's the absolute path,
- // otherwise it's a relative path. '..' is supported. If the strPath
- // doesn't exist it is created.
- virtual void SetPath(const wxString& strPath) = 0;
- // retrieve the current path (always as absolute path)
- virtual const wxString& GetPath() const = 0;
-
- // enumeration: all functions here return false when there are no more items.
- // you must pass the same lIndex to GetNext and GetFirst (don't modify it)
- // enumerate subgroups
- virtual bool GetFirstGroup(wxString& str, long& lIndex) const = 0;
- virtual bool GetNextGroup (wxString& str, long& lIndex) const = 0;
- // enumerate entries
- virtual bool GetFirstEntry(wxString& str, long& lIndex) const = 0;
- virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
- // get number of entries/subgroups in the current group, with or without
- // it's subgroups
- virtual size_t GetNumberOfEntries(bool bRecursive = false) const = 0;
- virtual size_t GetNumberOfGroups(bool bRecursive = false) const = 0;
-
- // tests of existence
- // returns true if the group by this name exists
- virtual bool HasGroup(const wxString& strName) const = 0;
- // same as above, but for an entry
- virtual bool HasEntry(const wxString& strName) const = 0;
- // returns true if either a group or an entry with a given name exist
- bool Exists(const wxString& strName) const
- { return HasGroup(strName) || HasEntry(strName); }
-
- // get the entry type
- virtual EntryType GetEntryType(const wxString& name) const
- {
- // by default all entries are strings
- return HasEntry(name) ? Type_String : Type_Unknown;
- }
-
- // key access: returns true if value was really read, false if default used
- // (and if the key is not found the default value is returned.)
-
- // read a string from the key
- bool Read(const wxString& key, wxString *pStr) const;
- bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
-
- // read a number (long)
- bool Read(const wxString& key, long *pl) const;
- bool Read(const wxString& key, long *pl, long defVal) const;
-
- // read an int
- bool Read(const wxString& key, int *pi) const;
- bool Read(const wxString& key, int *pi, int defVal) const;
-
- // read a double
- bool Read(const wxString& key, double* val) const;
- bool Read(const wxString& key, double* val, double defVal) const;
-
- // read a bool
- bool Read(const wxString& key, bool* val) const;
- bool Read(const wxString& key, bool* val, bool defVal) const;
-
- // convenience functions returning directly the value (we don't have them for
- // int/double/bool as there would be ambiguities with the long one then)
- wxString Read(const wxString& key,
- const wxString& defVal = wxEmptyString) const
- { wxString s; (void)Read(key, &s, defVal); return s; }
-
- long Read(const wxString& key, long defVal) const
- { long l; (void)Read(key, &l, defVal); return l; }
-
- // write the value (return true on success)
- bool Write(const wxString& key, const wxString& value)
- { return DoWriteString(key, value); }
-
- bool Write(const wxString& key, long value)
- { return DoWriteLong(key, value); }
-
- bool Write(const wxString& key, int value)
- { return DoWriteInt(key, value); }
-
- bool Write(const wxString& key, double value)
- { return DoWriteDouble(key, value); }
-
- bool Write(const wxString& key, bool value)
- { return DoWriteBool(key, value); }
-
- // we have to provide a separate version for C strings as otherwise they
- // would be converted to bool and not to wxString as expected!
- bool Write(const wxString& key, const wxChar *value)
- { return Write(key, wxString(value)); }
-
- // permanently writes all changes
- virtual bool Flush(bool bCurrentOnly = false) = 0;
-
- // renaming, all functions return false on failure (probably because the new
- // name is already taken by an existing entry)
- // rename an entry
- virtual bool RenameEntry(const wxString& oldName,
- const wxString& newName) = 0;
- // rename a group
- virtual bool RenameGroup(const wxString& oldName,
- const wxString& newName) = 0;
-
- // delete entries/groups
- // deletes the specified entry and the group it belongs to if
- // it was the last key in it and the second parameter is true
- virtual bool DeleteEntry(const wxString& key,
- bool bDeleteGroupIfEmpty = true) = 0;
- // delete the group (with all subgroups)
- virtual bool DeleteGroup(const wxString& key) = 0;
- // delete the whole underlying object (disk file, registry key, ...)
- // primarily for use by uninstallation routine.
- virtual bool DeleteAll() = 0;
-
- // options
- // we can automatically expand environment variables in the config entries
- // (this option is on by default, you can turn it on/off at any time)
- bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
- void SetExpandEnvVars(bool bDoIt = true) { m_bExpandEnvVars = bDoIt; }
- // recording of default values
- void SetRecordDefaults(bool bDoIt = true) { m_bRecordDefaults = bDoIt; }
- bool IsRecordingDefaults() const { return m_bRecordDefaults; }
- // does expansion only if needed
- wxString ExpandEnvVars(const wxString& str) const;
-
- // misc accessors
- wxString GetAppName() const { return m_appName; }
- wxString GetVendorName() const { return m_vendorName; }
-
- // Used wxIniConfig to set members in constructor
- void SetAppName(const wxString& appName) { m_appName = appName; }
- void SetVendorName(const wxString& vendorName) { m_vendorName = vendorName; }
-
- void SetStyle(long style) { m_style = style; }
- long GetStyle() const { return m_style; }
-
-protected:
- static bool IsImmutable(const wxString& key)
- { return !key.IsEmpty() && key[0] == wxCONFIG_IMMUTABLE_PREFIX; }
-
- // return the path without trailing separator, if any: this should be called
- // to sanitize paths referring to the group names before passing them to
- // wxConfigPathChanger as "/foo/bar/" should be the same as "/foo/bar" and it
- // isn't interpreted in the same way by it (and this can't be changed there
- // as it's not the same for the entries names)
- static wxString RemoveTrailingSeparator(const wxString& key);
-
- // do read/write the values of different types
- virtual bool DoReadString(const wxString& key, wxString *pStr) const = 0;
- virtual bool DoReadLong(const wxString& key, long *pl) const = 0;
- virtual bool DoReadInt(const wxString& key, int *pi) const;
- virtual bool DoReadDouble(const wxString& key, double* val) const;
- virtual bool DoReadBool(const wxString& key, bool* val) const;
-
- virtual bool DoWriteString(const wxString& key, const wxString& value) = 0;
- virtual bool DoWriteLong(const wxString& key, long value) = 0;
- virtual bool DoWriteInt(const wxString& key, int value);
- virtual bool DoWriteDouble(const wxString& key, double value);
- virtual bool DoWriteBool(const wxString& key, bool value);
-
-private:
- // are we doing automatic environment variable expansion?
- bool m_bExpandEnvVars;
- // do we record default values?
- bool m_bRecordDefaults;
-
- // static variables
- static wxConfigBase *ms_pConfig;
- static bool ms_bAutoCreate;
-
- // Application name and organisation name
- wxString m_appName;
- wxString m_vendorName;
-
- // Style flag
- long m_style;
-};
-
-// a handy little class which changes current path to the path of given entry
-// and restores it in dtor: so if you declare a local variable of this type,
-// you work in the entry directory and the path is automatically restored
-// when the function returns
-// Taken out of wxConfig since not all compilers can cope with nested classes.
-class WXDLLIMPEXP_BASE wxConfigPathChanger
-{
-public:
- // ctor/dtor do path changing/restoring of the path
- wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry);
- ~wxConfigPathChanger();
-
- // get the key name
- const wxString& Name() const { return m_strName; }
-
- // this method must be called if the original path (i.e. the current path at
- // the moment of creation of this object) could have been deleted to prevent
- // us from restoring the not existing (any more) path
- //
- // if the original path doesn't exist any more, the path will be restored to
- // the deepest still existing component of the old path
- void UpdateIfDeleted();
-
-private:
- wxConfigBase *m_pContainer; // object we live in
- wxString m_strName, // name of entry (i.e. name only)
- m_strOldPath; // saved path
- bool m_bChanged; // was the path changed?
-
- DECLARE_NO_COPY_CLASS(wxConfigPathChanger)
-};
-
-
-// ----------------------------------------------------------------------------
-// the native wxConfigBase implementation
-// ----------------------------------------------------------------------------
-
-// under Windows we prefer to use the native implementation
-// wxIniConfig isn't native anywhere after droping win16 in wxWidgets 2.6
-#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
- #define wxConfig wxRegConfig
-#else // either we're under Unix or wish to use files even under Windows
- #define wxConfig wxFileConfig
-#endif
-
-#endif // wxUSE_CONFIG
-
-/*
- Replace environment variables ($SOMETHING) with their values. The format is
- $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
- '_' only. '$' must be escaped ('\$') in order to be taken literally.
-*/
-
-WXDLLIMPEXP_BASE wxString wxExpandEnvVars(const wxString &sz);
-
-/*
- Split path into parts removing '..' in progress
- */
-WXDLLIMPEXP_BASE void wxSplitPath(wxArrayString& aParts, const wxChar *sz);
-
-
-#endif
- // _WX_CONFIG_H_
-
diff --git a/desmume/src/windows/wx/include/wx/config.h b/desmume/src/windows/wx/include/wx/config.h
deleted file mode 100644
index 2ef3efcab..000000000
--- a/desmume/src/windows/wx/include/wx/config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: config.h
-// Purpose: wxConfig base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: config.h 33948 2005-05-04 18:57:50Z JS $
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CONFIG_H_BASE_
-#define _WX_CONFIG_H_BASE_
-
-#include "wx/defs.h"
-#include "wx/confbase.h"
-
-#if defined(__WXMSW__) && wxUSE_CONFIG_NATIVE
-# ifdef __WIN32__
-# include "wx/msw/regconf.h"
-# else
-# include "wx/msw/iniconf.h"
-# endif
-#elif defined(__WXPALMOS__) && wxUSE_CONFIG_NATIVE
-# include "wx/palmos/prefconf.h"
-#else
-# include "wx/fileconf.h"
-#endif
-
-#endif
- // _WX_CONFIG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/containr.h b/desmume/src/windows/wx/include/wx/containr.h
deleted file mode 100644
index 79eb4f4b8..000000000
--- a/desmume/src/windows/wx/include/wx/containr.h
+++ /dev/null
@@ -1,142 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/containr.h
-// Purpose: wxControlContainer class declration: a "mix-in" class which
-// implements the TAB navigation between the controls
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 06.08.01
-// RCS-ID: $Id: containr.h 50863 2007-12-20 18:32:55Z VS $
-// Copyright: (c) 2001 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CONTAINR_H_
-#define _WX_CONTAINR_H_
-
-class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
-class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
-class WXDLLIMPEXP_FWD_CORE wxWindow;
-class WXDLLIMPEXP_FWD_CORE wxWindowBase;
-
-/*
- Implementation note: wxControlContainer is not a real mix-in but rather
- a class meant to be agregated with (and not inherited from). Although
- logically it should be a mix-in, doing it like this has no advantage from
- the point of view of the existing code but does have some problems (we'd
- need to play tricks with event handlers which may be difficult to do
- safely). The price we pay for this simplicity is the ugly macros below.
- */
-
-// ----------------------------------------------------------------------------
-// wxControlContainer
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxControlContainer
-{
-public:
- // ctors and such
- wxControlContainer(wxWindow *winParent = NULL);
- void SetContainerWindow(wxWindow *winParent) { m_winParent = winParent; }
-
- // the methods to be called from the window event handlers
- void HandleOnNavigationKey(wxNavigationKeyEvent& event);
- void HandleOnFocus(wxFocusEvent& event);
- void HandleOnWindowDestroy(wxWindowBase *child);
-
- // should be called from SetFocus(), returns false if we did nothing with
- // the focus and the default processing should take place
- bool DoSetFocus();
-
- // can our child get the focus?
- bool AcceptsFocus() const;
-
- // called from OnChildFocus() handler, i.e. when one of our (grand)
- // children gets the focus
- void SetLastFocus(wxWindow *win);
-
-protected:
- // set the focus to the child which had it the last time
- bool SetFocusToChild();
-
- // the parent window we manage the children for
- wxWindow *m_winParent;
-
- // the child which had the focus last time this panel was activated
- wxWindow *m_winLastFocused;
-
- // a guard against infinite recursion
- bool m_inSetFocus;
-
- DECLARE_NO_COPY_CLASS(wxControlContainer)
-};
-
-// this function is for wxWidgets internal use only
-extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
-
-// ----------------------------------------------------------------------------
-// macros which may be used by the classes wishing to implement TAB navigation
-// among their children
-// ----------------------------------------------------------------------------
-
-// declare the methods to be forwarded
-#define WX_DECLARE_CONTROL_CONTAINER() \
-public: \
- void OnNavigationKey(wxNavigationKeyEvent& event); \
- void OnFocus(wxFocusEvent& event); \
- virtual void OnChildFocus(wxChildFocusEvent& event); \
- virtual void SetFocus(); \
- virtual void SetFocusIgnoringChildren(); \
- virtual void RemoveChild(wxWindowBase *child); \
- virtual bool AcceptsFocus() const; \
-\
-protected: \
- wxControlContainer m_container
-
-// implement the event table entries for wxControlContainer
-#define WX_EVENT_TABLE_CONTROL_CONTAINER(classname) \
- EVT_SET_FOCUS(classname::OnFocus) \
- EVT_CHILD_FOCUS(classname::OnChildFocus) \
- EVT_NAVIGATION_KEY(classname::OnNavigationKey)
-
-// implement the methods forwarding to the wxControlContainer
-#define WX_DELEGATE_TO_CONTROL_CONTAINER(classname, basename) \
-void classname::OnNavigationKey( wxNavigationKeyEvent& event ) \
-{ \
- m_container.HandleOnNavigationKey(event); \
-} \
- \
-void classname::RemoveChild(wxWindowBase *child) \
-{ \
- m_container.HandleOnWindowDestroy(child); \
- \
- basename::RemoveChild(child); \
-} \
- \
-void classname::SetFocus() \
-{ \
- if ( !m_container.DoSetFocus() ) \
- basename::SetFocus(); \
-} \
- \
-void classname::SetFocusIgnoringChildren() \
-{ \
- basename::SetFocus(); \
-} \
- \
-void classname::OnChildFocus(wxChildFocusEvent& event) \
-{ \
- m_container.SetLastFocus(event.GetWindow()); \
- event.Skip(); \
-} \
- \
-void classname::OnFocus(wxFocusEvent& event) \
-{ \
- m_container.HandleOnFocus(event); \
-} \
-bool classname::AcceptsFocus() const \
-{ \
- return m_container.AcceptsFocus(); \
-}
-
-
-#endif // _WX_CONTAINR_H_
diff --git a/desmume/src/windows/wx/include/wx/control.h b/desmume/src/windows/wx/include/wx/control.h
deleted file mode 100644
index b5208d07d..000000000
--- a/desmume/src/windows/wx/include/wx/control.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/control.h
-// Purpose: wxControl common interface
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 26.07.99
-// RCS-ID: $Id: control.h 42816 2006-10-31 08:50:17Z RD $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CONTROL_H_BASE_
-#define _WX_CONTROL_H_BASE_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_CONTROLS
-
-#include "wx/window.h" // base class
-
-extern WXDLLEXPORT_DATA(const wxChar) wxControlNameStr[];
-
-// ----------------------------------------------------------------------------
-// wxControl is the base class for all controls
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxControlBase : public wxWindow
-{
-public:
- wxControlBase() { }
-
- virtual ~wxControlBase();
-
- // Create() function adds the validator parameter
- bool Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = 0,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxControlNameStr);
-
- // get the control alignment (left/right/centre, top/bottom/centre)
- int GetAlignment() const { return m_windowStyle & wxALIGN_MASK; }
-
- // get the string without mnemonic characters ('&')
- static wxString GetLabelText(const wxString& label);
-
- // get just the text of the label, without mnemonic characters ('&')
- wxString GetLabelText() const { return GetLabelText(GetLabel()); }
-
- // controls by default inherit the colours of their parents, if a
- // particular control class doesn't want to do it, it can override
- // ShouldInheritColours() to return false
- virtual bool ShouldInheritColours() const { return true; }
-
-
- // WARNING: this doesn't work for all controls nor all platforms!
- //
- // simulates the event of given type (i.e. wxButton::Command() is just as
- // if the button was clicked)
- virtual void Command(wxCommandEvent &event);
-
- virtual void SetLabel( const wxString &label );
- virtual bool SetFont(const wxFont& font);
-
- // wxControl-specific processing after processing the update event
- virtual void DoUpdateWindowUI(wxUpdateUIEvent& event);
-
-protected:
- // creates the control (calls wxWindowBase::CreateBase inside) and adds it
- // to the list of parents children
- bool CreateControl(wxWindowBase *parent,
- wxWindowID id,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString& name);
-
- // initialize the common fields of wxCommandEvent
- void InitCommandEvent(wxCommandEvent& event) const;
-
- DECLARE_NO_COPY_CLASS(wxControlBase)
-};
-
-// ----------------------------------------------------------------------------
-// include platform-dependent wxControl declarations
-// ----------------------------------------------------------------------------
-
-#if defined(__WXUNIVERSAL__)
- #include "wx/univ/control.h"
-#elif defined(__WXPALMOS__)
- #include "wx/palmos/control.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/control.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/control.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/control.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/control.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/control.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/control.h"
-#elif defined(__WXPM__)
- #include "wx/os2/control.h"
-#endif
-
-#endif // wxUSE_CONTROLS
-
-#endif
- // _WX_CONTROL_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/convauto.h b/desmume/src/windows/wx/include/wx/convauto.h
deleted file mode 100644
index 8d96afa55..000000000
--- a/desmume/src/windows/wx/include/wx/convauto.h
+++ /dev/null
@@ -1,108 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/convauto.h
-// Purpose: wxConvAuto class declaration
-// Author: Vadim Zeitlin
-// Created: 2006-04-03
-// RCS-ID: $Id: convauto.h 45893 2007-05-08 20:05:16Z VZ $
-// Copyright: (c) 2006 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CONVAUTO_H_
-#define _WX_CONVAUTO_H_
-
-#include "wx/strconv.h"
-
-#if wxUSE_WCHAR_T
-
-// ----------------------------------------------------------------------------
-// wxConvAuto: uses BOM to automatically detect input encoding
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxConvAuto : public wxMBConv
-{
-public:
- // default ctor, the real conversion will be created on demand
- wxConvAuto() { m_conv = NULL; /* the rest will be initialized later */ }
-
- // copy ctor doesn't initialize anything neither as conversion can only be
- // deduced on first use
- wxConvAuto(const wxConvAuto& WXUNUSED(other)) : wxMBConv() { m_conv = NULL; }
-
- virtual ~wxConvAuto() { if ( m_conv && m_ownsConv ) delete m_conv; }
-
- // override the base class virtual function(s) to use our m_conv
- virtual size_t ToWChar(wchar_t *dst, size_t dstLen,
- const char *src, size_t srcLen = wxNO_LEN) const;
-
- virtual size_t FromWChar(char *dst, size_t dstLen,
- const wchar_t *src, size_t srcLen = wxNO_LEN) const;
-
- virtual size_t GetMBNulLen() const { return m_conv->GetMBNulLen(); }
-
- virtual wxMBConv *Clone() const { return new wxConvAuto(*this); }
-
-private:
- // all currently recognized BOM values
- enum BOMType
- {
- BOM_None,
- BOM_UTF32BE,
- BOM_UTF32LE,
- BOM_UTF16BE,
- BOM_UTF16LE,
- BOM_UTF8
- };
-
- // return the BOM type of this buffer
- static BOMType DetectBOM(const char *src, size_t srcLen);
-
- // initialize m_conv with the conversion to use by default (UTF-8)
- void InitWithDefault()
- {
- m_conv = &wxConvUTF8;
- m_ownsConv = false;
- }
-
- // create the correct conversion object for the given BOM type
- void InitFromBOM(BOMType bomType);
-
- // create the correct conversion object for the BOM present in the
- // beginning of the buffer; adjust the buffer to skip the BOM if found
- void InitFromInput(const char **src, size_t *len);
-
- // adjust src and len to skip over the BOM (identified by m_bomType) at the
- // start of the buffer
- void SkipBOM(const char **src, size_t *len) const;
-
-
- // conversion object which we really use, NULL until the first call to
- // either ToWChar() or FromWChar()
- wxMBConv *m_conv;
-
- // our BOM type
- BOMType m_bomType;
-
- // true if we allocated m_conv ourselves, false if we just use an existing
- // global conversion
- bool m_ownsConv;
-
- // true if we already skipped BOM when converting (and not just calculating
- // the size)
- bool m_consumedBOM;
-
-
- DECLARE_NO_ASSIGN_CLASS(wxConvAuto)
-};
-
-#else // !wxUSE_WCHAR_T
-
-// it doesn't matter how we define it in this case as it's unused anyhow, but
-// do define it to allow the code using wxConvAuto() as default argument (this
-// is done in many places) to compile
-typedef wxMBConv wxConvAuto;
-
-#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T
-
-#endif // _WX_CONVAUTO_H_
-
diff --git a/desmume/src/windows/wx/include/wx/cpp.h b/desmume/src/windows/wx/include/wx/cpp.h
deleted file mode 100644
index 3e23273ac..000000000
--- a/desmume/src/windows/wx/include/wx/cpp.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Name: wx/cpp.h
- * Purpose: Various preprocessor helpers
- * Author: Vadim Zeitlin
- * Created: 2006-09-30
- * RCS-ID: $Id: cpp.h 42993 2006-11-03 21:06:57Z VZ $
- * Copyright: (c) 2006 Vadim Zeitlin
- * Licence: wxWindows licence
- */
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-#ifndef _WX_CPP_H_
-#define _WX_CPP_H_
-
-/* wxCONCAT works like preprocessor ## operator but also works with macros */
-#define wxCONCAT_HELPER(text, line) text ## line
-#define wxCONCAT(text, line) wxCONCAT_HELPER(text, line)
-
-/* wxSTRINGIZE works as the preprocessor # operator but also works with macros */
-#define wxSTRINGIZE_HELPER(x) #x
-#define wxSTRINGIZE(x) wxSTRINGIZE_HELPER(x)
-
-/* a Unicode-friendly version of wxSTRINGIZE_T */
-#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x))
-
-/*
- Helper macros for wxMAKE_UNIQUE_NAME: normally this works by appending the
- current line number to the given identifier to reduce the probability of the
- conflict (it may still happen if this is used in the headers, hence you
- should avoid doing it or provide unique prefixes then) but we have to do it
- differently for VC++
- */
-#if defined(__VISUALC__) && (__VISUALC__ >= 1300)
- /*
- __LINE__ handling is completely broken in VC++ when using "Edit and
- Continue" (/ZI option) and results in preprocessor errors if we use it
- inside the macros. Luckily VC7 has another standard macro which can be
- used like this and is even better than __LINE__ because it is globally
- unique.
- */
-# define wxCONCAT_LINE(text) wxCONCAT(text, __COUNTER__)
-#else /* normal compilers */
-# define wxCONCAT_LINE(text) wxCONCAT(text, __LINE__)
-#endif
-
-/* Create a "unique" name with the given prefix */
-#define wxMAKE_UNIQUE_NAME(text) wxCONCAT_LINE(text)
-
-/*
- This macro can be passed as argument to another macro when you don't have
- anything to pass in fact.
- */
-#define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */
-
-#endif // _WX_CPP_H_
-
diff --git a/desmume/src/windows/wx/include/wx/cppunit.h b/desmume/src/windows/wx/include/wx/cppunit.h
deleted file mode 100644
index c70cfbd80..000000000
--- a/desmume/src/windows/wx/include/wx/cppunit.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/cppunit.h
-// Purpose: wrapper header for CppUnit headers
-// Author: Vadim Zeitlin
-// Created: 15.02.04
-// RCS-ID: $Id: cppunit.h 53917 2008-06-01 20:32:26Z VZ $
-// Copyright: (c) 2004 Vadim Zeitlin
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CPPUNIT_H_
-#define _WX_CPPUNIT_H_
-
-///////////////////////////////////////////////////////////////////////////////
-// using CPPUNIT_TEST() macro results in this warning, disable it as there is
-// no other way to get rid of it and it's not very useful anyhow
-#ifdef __VISUALC__
- // typedef-name 'foo' used as synonym for class-name 'bar'
- #pragma warning(disable:4097)
-
- // unreachable code: we don't care about warnings in CppUnit headers
- #pragma warning(disable:4702)
-
- // 'id': identifier was truncated to 'num' characters in the debug info
- #pragma warning(disable:4786)
-#endif // __VISUALC__
-
-#ifdef __BORLANDC__
- #pragma warn -8022
-#endif
-
-#ifndef CPPUNIT_STD_NEED_ALLOCATOR
- #define CPPUNIT_STD_NEED_ALLOCATOR 0
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-// Set the default format for the errors, which can be used by an IDE to jump
-// to the error location. This default gets overridden by the cppunit headers
-// for some compilers (e.g. VC++).
-
-#ifndef CPPUNIT_COMPILER_LOCATION_FORMAT
- #define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l:"
-#endif
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Include all needed cppunit headers.
-//
-
-#include "wx/beforestd.h"
-#include
-#include
-#include
-#include
-#include
-#include "wx/afterstd.h"
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Set of helpful test macros.
-//
-
-// Base macro for wrapping CPPUNIT_TEST macros and so making them conditional
-// tests, meaning that the test only get registered and thus run when a given
-// runtime condition is true.
-// In case the condition is evaluated as false a skip message is logged
-// (the message will only be shown in verbose mode).
-#define WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, anyTest) \
- if (Condition) \
- { anyTest; } \
- else \
- wxLogInfo(wxString::Format(_T("skipping: %s.%s\n reason: %s equals false\n"), \
- wxString(suiteName, wxConvUTF8).c_str(), \
- wxString(#testMethod, wxConvUTF8).c_str(), \
- wxString(#Condition, wxConvUTF8).c_str()))
-
-// Conditional CPPUNIT_TEST macro.
-#define WXTEST_WITH_CONDITION(suiteName, Condition, testMethod) \
- WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST(testMethod))
-// Conditional CPPUNIT_TEST_FAIL macro.
-#define WXTEST_FAIL_WITH_CONDITION(suiteName, Condition, testMethod) \
- WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, CPPUNIT_TEST_FAIL(testMethod))
-
-// Use this macro to compare a wxString with a literal string.
-#define WX_ASSERT_STR_EQUAL(p, s) CPPUNIT_ASSERT_EQUAL(wxString(p), s)
-
-// Use this macro to compare a size_t with a literal integer
-#define WX_ASSERT_SIZET_EQUAL(n, m) CPPUNIT_ASSERT_EQUAL(((size_t)n), m)
-
-// Use this macro to compare the expected time_t value with the result of not
-// necessarily time_t type
-#define WX_ASSERT_TIME_T_EQUAL(t, n) CPPUNIT_ASSERT_EQUAL((t), (time_t)(n))
-
-
-///////////////////////////////////////////////////////////////////////////////
-// stream inserter for wxString
-//
-
-#include "wx/string.h"
-
-inline std::ostream& operator<<(std::ostream& o, const wxString& s)
-{
- return o << s.mb_str();
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Some more compiler warning tweaking and auto linking.
-//
-
-#ifdef __BORLANDC__
- #pragma warn .8022
-#endif
-
-#ifdef _MSC_VER
- #pragma warning(default:4702)
-#endif // _MSC_VER
-
-// for VC++ automatically link in cppunit library
-#ifdef __VISUALC__
- #ifdef NDEBUG
- #pragma comment(lib, "cppunit.lib")
- #else // Debug
- #pragma comment(lib, "cppunitd.lib")
- #endif // Release/Debug
-#endif
-
-#endif // _WX_CPPUNIT_H_
-
diff --git a/desmume/src/windows/wx/include/wx/cshelp.h b/desmume/src/windows/wx/include/wx/cshelp.h
deleted file mode 100644
index f77ac4f67..000000000
--- a/desmume/src/windows/wx/include/wx/cshelp.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/cshelp.h
-// Purpose: Context-sensitive help support classes
-// Author: Julian Smart, Vadim Zeitlin
-// Modified by:
-// Created: 08/09/2000
-// RCS-ID: $Id: cshelp.h 39675 2006-06-11 21:10:32Z VZ $
-// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CSHELP_H_
-#define _WX_CSHELP_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_HELP
-
-#include "wx/help.h"
-
-#include "wx/hashmap.h"
-#if wxUSE_BMPBUTTON
-#include "wx/bmpbuttn.h"
-#endif
-
-#include "wx/event.h"
-
-// ----------------------------------------------------------------------------
-// classes used to implement context help UI
-// ----------------------------------------------------------------------------
-
-/*
- * wxContextHelp
- * Invokes context-sensitive help. When the user
- * clicks on a window, a wxEVT_HELP event will be sent to that
- * window for the application to display help for.
- */
-
-class WXDLLEXPORT wxContextHelp : public wxObject
-{
-public:
- wxContextHelp(wxWindow* win = NULL, bool beginHelp = true);
- virtual ~wxContextHelp();
-
- bool BeginContextHelp(wxWindow* win);
- bool EndContextHelp();
-
- bool EventLoop();
- bool DispatchEvent(wxWindow* win, const wxPoint& pt);
-
- void SetStatus(bool status) { m_status = status; }
-
-protected:
- bool m_inHelp;
- bool m_status; // true if the user left-clicked
-
-private:
- DECLARE_DYNAMIC_CLASS(wxContextHelp)
-};
-
-#if wxUSE_BMPBUTTON
-/*
- * wxContextHelpButton
- * You can add this to your dialogs (especially on non-Windows platforms)
- * to put the application into context help mode.
- */
-
-class WXDLLEXPORT wxContextHelpButton : public wxBitmapButton
-{
-public:
- wxContextHelpButton(wxWindow* parent,
- wxWindowID id = wxID_CONTEXT_HELP,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxBU_AUTODRAW);
-
- void OnContextHelp(wxCommandEvent& event);
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxContextHelpButton)
- DECLARE_EVENT_TABLE()
-};
-
-#endif
-
-// ----------------------------------------------------------------------------
-// classes used to implement context help support
-// ----------------------------------------------------------------------------
-
-// wxHelpProvider is an abstract class used by the program implementing context help to
-// show the help text (or whatever: it may be HTML page or anything else) for
-// the given window.
-//
-// The current help provider must be explicitly set by the application using
-// wxHelpProvider::Set().
-//
-// Special note about ShowHelpAtPoint() and ShowHelp(): we want to be able to
-// override ShowHelpAtPoint() when we need to use different help messages for
-// different parts of the window, but it should also be possible to override
-// just ShowHelp() both for backwards compatibility and just because most
-// often the help does not, in fact, depend on the position and so
-// implementing just ShowHelp() is simpler and more natural, so by default
-// ShowHelpAtPoint() forwards to ShowHelp(). But this means that
-// wxSimpleHelpProvider has to override ShowHelp() and not ShowHelpAtPoint()
-// for backwards compatibility as otherwise the existing code deriving from it
-// and overriding ShowHelp() but calling the base class version wouldn't work
-// any more, which forces us to use a rather ugly hack and pass the extra
-// parameters of ShowHelpAtPoint() to ShowHelp() via member variables.
-class WXDLLEXPORT wxHelpProvider
-{
-public:
- // get/set the current (application-global) help provider (Set() returns
- // the previous one)
- static wxHelpProvider *Set(wxHelpProvider *helpProvider)
- {
- wxHelpProvider *helpProviderOld = ms_helpProvider;
- ms_helpProvider = helpProvider;
- return helpProviderOld;
- }
-
- // unlike some other class, the help provider is not created on demand,
- // this must be explicitly done by the application
- static wxHelpProvider *Get() { return ms_helpProvider; }
-
- // get the help string (whose interpretation is help provider dependent
- // except that empty string always means that no help is associated with
- // the window) for this window
- virtual wxString GetHelp(const wxWindowBase *window) = 0;
-
- // do show help for the given window (uses window->GetHelpAtPoint()
- // internally if applicable), return true if it was done or false
- // if no help available for this window
- virtual bool ShowHelpAtPoint(wxWindowBase *window,
- const wxPoint& pt,
- wxHelpEvent::Origin origin)
- {
- wxCHECK_MSG( window, false, _T("window must not be NULL") );
-
- m_helptextAtPoint = pt;
- m_helptextOrigin = origin;
-
- return ShowHelp(window);
- }
-
- // show help for the given window, see ShowHelpAtPoint() above
- virtual bool ShowHelp(wxWindowBase * WXUNUSED(window)) { return false; }
-
- // associate the text with the given window or id: although all help
- // providers have these functions to allow making wxWindow::SetHelpText()
- // work, not all of them implement them
- virtual void AddHelp(wxWindowBase *window, const wxString& text);
-
- // this version associates the given text with all window with this id
- // (may be used to set the same help string for all [Cancel] buttons in
- // the application, for example)
- virtual void AddHelp(wxWindowID id, const wxString& text);
-
- // removes the association
- virtual void RemoveHelp(wxWindowBase* window);
-
- // virtual dtor for any base class
- virtual ~wxHelpProvider();
-
-protected:
- wxHelpProvider()
- : m_helptextAtPoint(wxDefaultPosition),
- m_helptextOrigin(wxHelpEvent::Origin_Unknown)
- {
- }
-
- // helper method used by ShowHelp(): returns the help string to use by
- // using m_helptextAtPoint/m_helptextOrigin if they're set or just GetHelp
- // otherwise
- wxString GetHelpTextMaybeAtPoint(wxWindowBase *window);
-
-
- // parameters of the last ShowHelpAtPoint() call, used by ShowHelp()
- wxPoint m_helptextAtPoint;
- wxHelpEvent::Origin m_helptextOrigin;
-
-private:
- static wxHelpProvider *ms_helpProvider;
-};
-
-WX_DECLARE_EXPORTED_HASH_MAP( wxUIntPtr, wxString, wxIntegerHash,
- wxIntegerEqual, wxSimpleHelpProviderHashMap );
-
-// wxSimpleHelpProvider is an implementation of wxHelpProvider which supports
-// only plain text help strings and shows the string associated with the
-// control (if any) in a tooltip
-class WXDLLEXPORT wxSimpleHelpProvider : public wxHelpProvider
-{
-public:
- // implement wxHelpProvider methods
- virtual wxString GetHelp(const wxWindowBase *window);
-
- // override ShowHelp() and not ShowHelpAtPoint() as explained above
- virtual bool ShowHelp(wxWindowBase *window);
-
- virtual void AddHelp(wxWindowBase *window, const wxString& text);
- virtual void AddHelp(wxWindowID id, const wxString& text);
- virtual void RemoveHelp(wxWindowBase* window);
-
-protected:
- // we use 2 hashes for storing the help strings associated with windows
- // and the ids
- wxSimpleHelpProviderHashMap m_hashWindows,
- m_hashIds;
-};
-
-// wxHelpControllerHelpProvider is an implementation of wxHelpProvider which supports
-// both context identifiers and plain text help strings. If the help text is an integer,
-// it is passed to wxHelpController::DisplayContextPopup. Otherwise, it shows the string
-// in a tooltip as per wxSimpleHelpProvider.
-class WXDLLEXPORT wxHelpControllerHelpProvider : public wxSimpleHelpProvider
-{
-public:
- // Note that it doesn't own the help controller. The help controller
- // should be deleted separately.
- wxHelpControllerHelpProvider(wxHelpControllerBase* hc = (wxHelpControllerBase*) NULL);
-
- // implement wxHelpProvider methods
-
- // again (see above): this should be ShowHelpAtPoint() but we need to
- // override ShowHelp() to avoid breaking existing code
- virtual bool ShowHelp(wxWindowBase *window);
-
- // Other accessors
- void SetHelpController(wxHelpControllerBase* hc) { m_helpController = hc; }
- wxHelpControllerBase* GetHelpController() const { return m_helpController; }
-
-protected:
- wxHelpControllerBase* m_helpController;
-
- DECLARE_NO_COPY_CLASS(wxHelpControllerHelpProvider)
-};
-
-// Convenience function for turning context id into wxString
-WXDLLEXPORT wxString wxContextId(int id);
-
-#endif // wxUSE_HELP
-
-#endif // _WX_CSHELP_H_
-
diff --git a/desmume/src/windows/wx/include/wx/ctrlsub.h b/desmume/src/windows/wx/include/wx/ctrlsub.h
deleted file mode 100644
index 6697bb6b3..000000000
--- a/desmume/src/windows/wx/include/wx/ctrlsub.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/ctrlsub.h (read: "wxConTRoL with SUBitems")
-// Purpose: wxControlWithItems interface
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 22.10.99
-// RCS-ID: $Id: ctrlsub.h 42816 2006-10-31 08:50:17Z RD $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CTRLSUB_H_BASE_
-#define _WX_CTRLSUB_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_CONTROLS
-
-#include "wx/control.h" // base class
-
-// ----------------------------------------------------------------------------
-// wxItemContainer defines an interface which is implemented by all controls
-// which have string subitems each of which may be selected.
-//
-// It is decomposed in wxItemContainerImmutable which omits all methods
-// adding/removing items and is used by wxRadioBox and wxItemContainer itself.
-//
-// Examples: wxListBox, wxCheckListBox, wxChoice and wxComboBox (which
-// implements an extended interface deriving from this one)
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxItemContainerImmutable
-{
-public:
- wxItemContainerImmutable() { }
- virtual ~wxItemContainerImmutable();
-
- // accessing strings
- // -----------------
-
- virtual unsigned int GetCount() const = 0;
- bool IsEmpty() const { return GetCount() == 0; }
-
- virtual wxString GetString(unsigned int n) const = 0;
- wxArrayString GetStrings() const;
- virtual void SetString(unsigned int n, const wxString& s) = 0;
-
- // finding string natively is either case sensitive or insensitive
- // but never both so fall back to this base version for not
- // supported search type
- virtual int FindString(const wxString& s, bool bCase = false) const
- {
- unsigned int count = GetCount();
-
- for ( unsigned int i = 0; i < count ; ++i )
- {
- if (GetString(i).IsSameAs( s , bCase ))
- return (int)i;
- }
-
- return wxNOT_FOUND;
- }
-
-
- // selection
- // ---------
-
- virtual void SetSelection(int n) = 0;
- virtual int GetSelection() const = 0;
-
- // set selection to the specified string, return false if not found
- bool SetStringSelection(const wxString& s);
-
- // return the selected string or empty string if none
- wxString GetStringSelection() const;
-
- // this is the same as SetSelection( for single-selection controls but
- // reads better for multi-selection ones
- void Select(int n) { SetSelection(n); }
-
-
-protected:
-
- // check that the index is valid
- inline bool IsValid(unsigned int n) const { return n < GetCount(); }
- inline bool IsValidInsert(unsigned int n) const { return n <= GetCount(); }
-};
-
-class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable
-{
-public:
- wxItemContainer() { m_clientDataItemsType = wxClientData_None; }
- virtual ~wxItemContainer();
-
- // adding items
- // ------------
-
- int Append(const wxString& item)
- { return DoAppend(item); }
- int Append(const wxString& item, void *clientData)
- { int n = DoAppend(item); SetClientData(n, clientData); return n; }
- int Append(const wxString& item, wxClientData *clientData)
- { int n = DoAppend(item); SetClientObject(n, clientData); return n; }
-
- // only for rtti needs (separate name)
- void AppendString( const wxString& item)
- { Append( item ); }
-
- // append several items at once to the control
- void Append(const wxArrayString& strings);
-
- int Insert(const wxString& item, unsigned int pos)
- { return DoInsert(item, pos); }
- int Insert(const wxString& item, unsigned int pos, void *clientData);
- int Insert(const wxString& item, unsigned int pos, wxClientData *clientData);
-
- // deleting items
- // --------------
-
- virtual void Clear() = 0;
- virtual void Delete(unsigned int n) = 0;
-
- // misc
- // ----
-
- // client data stuff
- void SetClientData(unsigned int n, void* clientData);
- void* GetClientData(unsigned int n) const;
-
- void SetClientObject(unsigned int n, wxClientData* clientData);
- wxClientData* GetClientObject(unsigned int n) const;
-
- bool HasClientObjectData() const
- { return m_clientDataItemsType == wxClientData_Object; }
- bool HasClientUntypedData() const
- { return m_clientDataItemsType == wxClientData_Void; }
-
-protected:
- virtual int DoAppend(const wxString& item) = 0;
- virtual int DoInsert(const wxString& item, unsigned int pos) = 0;
-
- virtual void DoSetItemClientData(unsigned int n, void* clientData) = 0;
- virtual void* DoGetItemClientData(unsigned int n) const = 0;
- virtual void DoSetItemClientObject(unsigned int n, wxClientData* clientData) = 0;
- virtual wxClientData* DoGetItemClientObject(unsigned int n) const = 0;
-
-
- // the type of the client data for the items
- wxClientDataType m_clientDataItemsType;
-};
-
-// this macro must (unfortunately) be used in any class deriving from both
-// wxItemContainer and wxControl because otherwise there is ambiguity when
-// calling GetClientXXX() functions -- the compiler can't choose between the
-// two versions
-#define wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST \
- void SetClientData(void *data) \
- { wxEvtHandler::SetClientData(data); } \
- void *GetClientData() const \
- { return wxEvtHandler::GetClientData(); } \
- void SetClientObject(wxClientData *data) \
- { wxEvtHandler::SetClientObject(data); } \
- wxClientData *GetClientObject() const \
- { return wxEvtHandler::GetClientObject(); } \
- void SetClientData(unsigned int n, void* clientData) \
- { wxItemContainer::SetClientData(n, clientData); } \
- void* GetClientData(unsigned int n) const \
- { return wxItemContainer::GetClientData(n); } \
- void SetClientObject(unsigned int n, wxClientData* clientData) \
- { wxItemContainer::SetClientObject(n, clientData); } \
- wxClientData* GetClientObject(unsigned int n) const \
- { return wxItemContainer::GetClientObject(n); }
-
-class WXDLLEXPORT wxControlWithItems : public wxControl, public wxItemContainer
-{
-public:
- wxControlWithItems() { }
- virtual ~wxControlWithItems();
-
- // we have to redefine these functions here to avoid ambiguities in classes
- // deriving from us which would arise otherwise because both base classses
- // have the methods with the same names - hopefully, a smart compiler can
- // optimize away these simple inline wrappers so we don't suffer much from
- // this
- wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
-
- // usually the controls like list/combo boxes have their own background
- // colour
- virtual bool ShouldInheritColours() const { return false; }
-
-protected:
- // fill in the client object or data field of the event as appropriate
- //
- // calls InitCommandEvent() and, if n != wxNOT_FOUND, also sets the per
- // item client data
- void InitCommandEventWithItems(wxCommandEvent& event, int n);
-
-private:
- DECLARE_ABSTRACT_CLASS(wxControlWithItems)
- DECLARE_NO_COPY_CLASS(wxControlWithItems)
-};
-
-
-// ----------------------------------------------------------------------------
-// inline functions
-// ----------------------------------------------------------------------------
-
-#endif // wxUSE_CONTROLS
-
-#endif // _WX_CTRLSUB_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/cursor.h b/desmume/src/windows/wx/include/wx/cursor.h
deleted file mode 100644
index 39b4e2194..000000000
--- a/desmume/src/windows/wx/include/wx/cursor.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/cursor.h
-// Purpose: wxCursor base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: cursor.h 40865 2006-08-27 09:42:42Z VS $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_CURSOR_H_BASE_
-#define _WX_CURSOR_H_BASE_
-
-#include "wx/defs.h"
-
-#if defined(__WXPALMOS__)
- #include "wx/palmos/cursor.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/cursor.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/cursor.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/cursor.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/cursor.h"
-#elif defined(__WXX11__)
- #include "wx/x11/cursor.h"
-#elif defined(__WXMGL__)
- #include "wx/mgl/cursor.h"
-#elif defined(__WXDFB__)
- #include "wx/dfb/cursor.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/cursor.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/cursor.h"
-#elif defined(__WXPM__)
- #include "wx/os2/cursor.h"
-#endif
-
-#include "wx/utils.h"
-
-/* This is a small class which can be used by all ports
- to temporarily suspend the busy cursor. Useful in modal
- dialogs.
-
- Actually that is not (any longer) quite true.. currently it is
- only used in wxGTK Dialog::ShowModal() and now uses static
- wxBusyCursor methods that are only implemented for wxGTK so far.
- The BusyCursor handling code should probably be implemented in
- common code somewhere instead of the separate implementations we
- currently have. Also the name BusyCursorSuspender is a little
- misleading since it doesn't actually suspend the BusyCursor, just
- masks one that is already showing.
- If another call to wxBeginBusyCursor is made while this is active
- the Busy Cursor will again be shown. But at least now it doesn't
- interfere with the state of wxIsBusy() -- RL
-
-*/
-class wxBusyCursorSuspender
-{
-public:
- wxBusyCursorSuspender()
- {
- if( wxIsBusy() )
- {
- wxSetCursor( wxBusyCursor::GetStoredCursor() );
- }
- }
- ~wxBusyCursorSuspender()
- {
- if( wxIsBusy() )
- {
- wxSetCursor( wxBusyCursor::GetBusyCursor() );
- }
- }
-};
-#endif
- // _WX_CURSOR_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dataobj.h b/desmume/src/windows/wx/include/wx/dataobj.h
deleted file mode 100644
index 4c290dc34..000000000
--- a/desmume/src/windows/wx/include/wx/dataobj.h
+++ /dev/null
@@ -1,540 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/dataobj.h
-// Purpose: common data object classes
-// Author: Vadim Zeitlin, Robert Roebling
-// Modified by:
-// Created: 26.05.99
-// RCS-ID: $Id: dataobj.h 40772 2006-08-23 13:38:45Z VZ $
-// Copyright: (c) wxWidgets Team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATAOBJ_H_BASE_
-#define _WX_DATAOBJ_H_BASE_
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-#include "wx/defs.h"
-
-#if wxUSE_DATAOBJ
-
-#include "wx/string.h"
-#include "wx/bitmap.h"
-#include "wx/list.h"
-#include "wx/arrstr.h"
-
-// ============================================================================
-/*
- Generic data transfer related classes. The class hierarchy is as follows:
-
- - wxDataObject-
- / \
- / \
- wxDataObjectSimple wxDataObjectComposite
- / | \
- / | \
- wxTextDataObject | wxBitmapDataObject
- |
- wxCustomDataObject
-
-*/
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxDataFormat class is declared in platform-specific headers: it represents
-// a format for data which may be either one of the standard ones (text,
-// bitmap, ...) or a custom one which is then identified by a unique string.
-// ----------------------------------------------------------------------------
-
-/* the class interface looks like this (pseudo code):
-
-class wxDataFormat
-{
-public:
- typedef NativeFormat;
-
- wxDataFormat(NativeFormat format = wxDF_INVALID);
- wxDataFormat(const wxChar *format);
-
- wxDataFormat& operator=(NativeFormat format);
- wxDataFormat& operator=(const wxDataFormat& format);
-
- bool operator==(NativeFormat format) const;
- bool operator!=(NativeFormat format) const;
-
- void SetType(NativeFormat format);
- NativeFormat GetType() const;
-
- wxString GetId() const;
- void SetId(const wxChar *format);
-};
-
-*/
-
-#if defined(__WXMSW__)
- #include "wx/msw/ole/dataform.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/dataform.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dataform.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/dataform.h"
-#elif defined(__WXX11__)
- #include "wx/x11/dataform.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/dataform.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/dataform.h"
-#elif defined(__WXPM__)
- #include "wx/os2/dataform.h"
-#endif
-
-// the value for default argument to some functions (corresponds to
-// wxDF_INVALID)
-extern WXDLLEXPORT const wxDataFormat& wxFormatInvalid;
-
-// ----------------------------------------------------------------------------
-// wxDataObject represents a piece of data which knows which formats it
-// supports and knows how to render itself in each of them - GetDataHere(),
-// and how to restore data from the buffer (SetData()).
-//
-// Although this class may be used directly (i.e. custom classes may be
-// derived from it), in many cases it might be simpler to use either
-// wxDataObjectSimple or wxDataObjectComposite classes.
-//
-// A data object may be "read only", i.e. support only GetData() functions or
-// "read-write", i.e. support both GetData() and SetData() (in principle, it
-// might be "write only" too, but this is rare). Moreover, it doesn't have to
-// support the same formats in Get() and Set() directions: for example, a data
-// object containing JPEG image might accept BMPs in GetData() because JPEG
-// image may be easily transformed into BMP but not in SetData(). Accordingly,
-// all methods dealing with formats take an additional "direction" argument
-// which is either SET or GET and which tells the function if the format needs
-// to be supported by SetData() or GetDataHere().
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDataObjectBase
-{
-public:
- enum Direction
- {
- Get = 0x01, // format is supported by GetDataHere()
- Set = 0x02, // format is supported by SetData()
- Both = 0x03 // format is supported by both (unused currently)
- };
-
- // this class is polymorphic, hence it needs a virtual dtor
- virtual ~wxDataObjectBase();
-
- // get the best suited format for rendering our data
- virtual wxDataFormat GetPreferredFormat(Direction dir = Get) const = 0;
-
- // get the number of formats we support
- virtual size_t GetFormatCount(Direction dir = Get) const = 0;
-
- // return all formats in the provided array (of size GetFormatCount())
- virtual void GetAllFormats(wxDataFormat *formats,
- Direction dir = Get) const = 0;
-
- // get the (total) size of data for the given format
- virtual size_t GetDataSize(const wxDataFormat& format) const = 0;
-
- // copy raw data (in the specified format) to the provided buffer, return
- // true if data copied successfully, false otherwise
- virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0;
-
- // get data from the buffer of specified length (in the given format),
- // return true if the data was read successfully, false otherwise
- virtual bool SetData(const wxDataFormat& WXUNUSED(format),
- size_t WXUNUSED(len), const void * WXUNUSED(buf))
- {
- return false;
- }
-
- // returns true if this format is supported
- bool IsSupported(const wxDataFormat& format, Direction dir = Get) const;
-};
-
-// ----------------------------------------------------------------------------
-// include the platform-specific declarations of wxDataObject
-// ----------------------------------------------------------------------------
-
-#if defined(__WXMSW__)
- #include "wx/msw/ole/dataobj.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/dataobj.h"
-#elif defined(__WXX11__)
- #include "wx/x11/dataobj.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dataobj.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/dataobj.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/dataobj.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/dataobj.h"
-#elif defined(__WXPM__)
- #include "wx/os2/dataobj.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// wxDataObjectSimple is a wxDataObject which only supports one format (in
-// both Get and Set directions, but you may return false from GetDataHere() or
-// SetData() if one of them is not supported). This is the simplest possible
-// wxDataObject implementation.
-//
-// This is still an "abstract base class" (although it doesn't have any pure
-// virtual functions), to use it you should derive from it and implement
-// GetDataSize(), GetDataHere() and SetData() functions because the base class
-// versions don't do anything - they just return "not implemented".
-//
-// This class should be used when you provide data in only one format (no
-// conversion to/from other formats), either a standard or a custom one.
-// Otherwise, you should use wxDataObjectComposite or wxDataObject directly.
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDataObjectSimple : public wxDataObject
-{
-public:
- // ctor takes the format we support, but it can also be set later with
- // SetFormat()
- wxDataObjectSimple(const wxDataFormat& format = wxFormatInvalid)
- : m_format(format)
- {
- }
-
- // get/set the format we support
- const wxDataFormat& GetFormat() const { return m_format; }
- void SetFormat(const wxDataFormat& format) { m_format = format; }
-
- // virtual functions to override in derived class (the base class versions
- // just return "not implemented")
- // -----------------------------------------------------------------------
-
- // get the size of our data
- virtual size_t GetDataSize() const
- { return 0; }
-
- // copy our data to the buffer
- virtual bool GetDataHere(void *WXUNUSED(buf)) const
- { return false; }
-
- // copy data from buffer to our data
- virtual bool SetData(size_t WXUNUSED(len), const void *WXUNUSED(buf))
- { return false; }
-
- // implement base class pure virtuals
- // ----------------------------------
- virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const
- { return m_format; }
- virtual size_t GetFormatCount(wxDataObjectBase::Direction WXUNUSED(dir) = Get) const
- { return 1; }
- virtual void GetAllFormats(wxDataFormat *formats,
- wxDataObjectBase::Direction WXUNUSED(dir) = Get) const
- { *formats = m_format; }
- virtual size_t GetDataSize(const wxDataFormat& WXUNUSED(format)) const
- { return GetDataSize(); }
- virtual bool GetDataHere(const wxDataFormat& WXUNUSED(format),
- void *buf) const
- { return GetDataHere(buf); }
- virtual bool SetData(const wxDataFormat& WXUNUSED(format),
- size_t len, const void *buf)
- { return SetData(len, buf); }
-
-private:
- // the one and only format we support
- wxDataFormat m_format;
-
- DECLARE_NO_COPY_CLASS(wxDataObjectSimple)
-};
-
-// ----------------------------------------------------------------------------
-// wxDataObjectComposite is the simplest way to implement wxDataObject
-// supporting multiple formats. It contains several wxDataObjectSimple and
-// supports all formats supported by any of them.
-//
-// This class shouldn't be (normally) derived from, but may be used directly.
-// If you need more flexibility than what it provides, you should probably use
-// wxDataObject directly.
-// ----------------------------------------------------------------------------
-
-WX_DECLARE_EXPORTED_LIST(wxDataObjectSimple, wxSimpleDataObjectList);
-
-class WXDLLEXPORT wxDataObjectComposite : public wxDataObject
-{
-public:
- // ctor
- wxDataObjectComposite();
- virtual ~wxDataObjectComposite();
-
- // add data object (it will be deleted by wxDataObjectComposite, hence it
- // must be allocated on the heap) whose format will become the preferred
- // one if preferred == true
- void Add(wxDataObjectSimple *dataObject, bool preferred = false);
-
- // Report the format passed to the SetData method. This should be the
- // format of the data object within the composite that recieved data from
- // the clipboard or the DnD operation. You can use this method to find
- // out what kind of data object was recieved.
- wxDataFormat GetReceivedFormat() const;
-
- // implement base class pure virtuals
- // ----------------------------------
- virtual wxDataFormat GetPreferredFormat(wxDataObjectBase::Direction dir = Get) const;
- virtual size_t GetFormatCount(wxDataObjectBase::Direction dir = Get) const;
- virtual void GetAllFormats(wxDataFormat *formats, wxDataObjectBase::Direction dir = Get) const;
- virtual size_t GetDataSize(const wxDataFormat& format) const;
- virtual bool GetDataHere(const wxDataFormat& format, void *buf) const;
- virtual bool SetData(const wxDataFormat& format, size_t len, const void *buf);
-#if defined(__WXMSW__)
- virtual const void* GetSizeFromBuffer( const void* buffer, size_t* size,
- const wxDataFormat& format );
- virtual void* SetSizeInBuffer( void* buffer, size_t size,
- const wxDataFormat& format );
- virtual size_t GetBufferOffset( const wxDataFormat& format );
-#endif
-
-protected:
- // returns the pointer to the object which supports this format or NULL
- wxDataObjectSimple *GetObject(const wxDataFormat& format) const;
-
-private:
- // the list of all (simple) data objects whose formats we support
- wxSimpleDataObjectList m_dataObjects;
-
- // the index of the preferred one (0 initially, so by default the first
- // one is the preferred)
- size_t m_preferred;
-
- wxDataFormat m_receivedFormat;
-
- DECLARE_NO_COPY_CLASS(wxDataObjectComposite)
-};
-
-// ============================================================================
-// Standard implementations of wxDataObjectSimple which can be used directly
-// (i.e. without having to derive from them) for standard data type transfers.
-//
-// Note that although all of them can work with provided data, you can also
-// override their virtual GetXXX() functions to only provide data on demand.
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxTextDataObject contains text data
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxTextDataObject : public wxDataObjectSimple
-{
-public:
- // ctor: you can specify the text here or in SetText(), or override
- // GetText()
- wxTextDataObject(const wxString& text = wxEmptyString)
- : wxDataObjectSimple(
-#if wxUSE_UNICODE
- wxDF_UNICODETEXT
-#else
- wxDF_TEXT
-#endif
- ),
- m_text(text)
- {
- }
-
- // virtual functions which you may override if you want to provide text on
- // demand only - otherwise, the trivial default versions will be used
- virtual size_t GetTextLength() const { return m_text.Len() + 1; }
- virtual wxString GetText() const { return m_text; }
- virtual void SetText(const wxString& text) { m_text = text; }
-
- // implement base class pure virtuals
- // ----------------------------------
-
- // some platforms have 2 and not 1 format for text data
-#if wxUSE_UNICODE && (defined(__WXGTK20__) || defined(__WXMAC__))
- virtual size_t GetFormatCount(Direction WXUNUSED(dir) = Get) const { return 2; }
- virtual void GetAllFormats(wxDataFormat *formats,
- wxDataObjectBase::Direction WXUNUSED(dir) = Get) const;
-
- virtual size_t GetDataSize() const { return GetDataSize(GetPreferredFormat()); }
- virtual bool GetDataHere(void *buf) const { return GetDataHere(GetPreferredFormat(), buf); }
- virtual bool SetData(size_t len, const void *buf) { return SetData(GetPreferredFormat(), len, buf); }
-
- size_t GetDataSize(const wxDataFormat& format) const;
- bool GetDataHere(const wxDataFormat& format, void *pBuf) const;
- bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf);
-#else
- virtual size_t GetDataSize() const;
- virtual bool GetDataHere(void *buf) const;
- virtual bool SetData(size_t len, const void *buf);
- // Must provide overloads to avoid hiding them (and warnings about it)
- virtual size_t GetDataSize(const wxDataFormat&) const
- {
- return GetDataSize();
- }
- virtual bool GetDataHere(const wxDataFormat&, void *buf) const
- {
- return GetDataHere(buf);
- }
- virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
- {
- return SetData(len, buf);
- }
-#endif
-
-private:
- wxString m_text;
-
- DECLARE_NO_COPY_CLASS(wxTextDataObject)
-};
-
-// ----------------------------------------------------------------------------
-// wxBitmapDataObject contains a bitmap
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxBitmapDataObjectBase : public wxDataObjectSimple
-{
-public:
- // ctor: you can specify the bitmap here or in SetBitmap(), or override
- // GetBitmap()
- wxBitmapDataObjectBase(const wxBitmap& bitmap = wxNullBitmap)
- : wxDataObjectSimple(wxDF_BITMAP), m_bitmap(bitmap)
- {
- }
-
- // virtual functions which you may override if you want to provide data on
- // demand only - otherwise, the trivial default versions will be used
- virtual wxBitmap GetBitmap() const { return m_bitmap; }
- virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
-
-protected:
- wxBitmap m_bitmap;
-
- DECLARE_NO_COPY_CLASS(wxBitmapDataObjectBase)
-};
-
-// ----------------------------------------------------------------------------
-// wxFileDataObject contains a list of filenames
-//
-// NB: notice that this is a "write only" object, it can only be filled with
-// data from drag and drop operation.
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFileDataObjectBase : public wxDataObjectSimple
-{
-public:
- // ctor: use AddFile() later to fill the array
- wxFileDataObjectBase() : wxDataObjectSimple(wxDF_FILENAME) { }
-
- // get a reference to our array
- const wxArrayString& GetFilenames() const { return m_filenames; }
-
-protected:
- wxArrayString m_filenames;
-
- DECLARE_NO_COPY_CLASS(wxFileDataObjectBase)
-};
-
-// ----------------------------------------------------------------------------
-// wxCustomDataObject contains arbitrary untyped user data.
-//
-// It is understood that this data can be copied bitwise.
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxCustomDataObject : public wxDataObjectSimple
-{
-public:
- // if you don't specify the format in the ctor, you can still use
- // SetFormat() later
- wxCustomDataObject(const wxDataFormat& format = wxFormatInvalid);
-
- // the dtor calls Free()
- virtual ~wxCustomDataObject();
-
- // you can call SetData() to set m_data: it will make a copy of the data
- // you pass - or you can use TakeData() which won't copy anything, but
- // will take ownership of data (i.e. will call Free() on it later)
- void TakeData(size_t size, void *data);
-
- // this function is called to allocate "size" bytes of memory from
- // SetData(). The default version uses operator new[].
- virtual void *Alloc(size_t size);
-
- // this function is called when the data is freed, you may override it to
- // anything you want (or may be nothing at all). The default version calls
- // operator delete[] on m_data
- virtual void Free();
-
- // get data: you may override these functions if you wish to provide data
- // only when it's requested
- virtual size_t GetSize() const { return m_size; }
- virtual void *GetData() const { return m_data; }
-
- // implement base class pure virtuals
- // ----------------------------------
- virtual size_t GetDataSize() const;
- virtual bool GetDataHere(void *buf) const;
- virtual bool SetData(size_t size, const void *buf);
- // Must provide overloads to avoid hiding them (and warnings about it)
- virtual size_t GetDataSize(const wxDataFormat&) const
- {
- return GetDataSize();
- }
- virtual bool GetDataHere(const wxDataFormat&, void *buf) const
- {
- return GetDataHere(buf);
- }
- virtual bool SetData(const wxDataFormat&, size_t len, const void *buf)
- {
- return SetData(len, buf);
- }
-
-private:
- size_t m_size;
- void *m_data;
-
- DECLARE_NO_COPY_CLASS(wxCustomDataObject)
-};
-
-// ----------------------------------------------------------------------------
-// include platform-specific declarations of wxXXXBase classes
-// ----------------------------------------------------------------------------
-
-#if defined(__WXMSW__)
- #include "wx/msw/ole/dataobj2.h"
-
- // wxURLDataObject defined in msw/ole/dataobj2.h
-#else // !__WXMSW__
- #if defined(__WXGTK20__)
- #include "wx/gtk/dataobj2.h"
- #elif defined(__WXGTK__)
- #include "wx/gtk1/dataobj2.h"
- #elif defined(__WXX11__)
- #include "wx/x11/dataobj2.h"
- #elif defined(__WXMOTIF__)
- #include "wx/motif/dataobj2.h"
- #elif defined(__WXMAC__)
- #include "wx/mac/dataobj2.h"
- #elif defined(__WXCOCOA__)
- #include "wx/cocoa/dataobj2.h"
- #elif defined(__WXPM__)
- #include "wx/os2/dataobj2.h"
- #endif
-
- // wxURLDataObject is simply wxTextDataObject with a different name
- class WXDLLEXPORT wxURLDataObject : public wxTextDataObject
- {
- public:
- wxURLDataObject(const wxString& url = wxEmptyString)
- : wxTextDataObject(url)
- {
- }
-
- wxString GetURL() const { return GetText(); }
- void SetURL(const wxString& url) { SetText(url); }
- };
-#endif // __WXMSW__/!__WXMSW__
-
-#endif // wxUSE_DATAOBJ
-
-#endif // _WX_DATAOBJ_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dataview.h b/desmume/src/windows/wx/include/wx/dataview.h
deleted file mode 100644
index 249eff71d..000000000
--- a/desmume/src/windows/wx/include/wx/dataview.h
+++ /dev/null
@@ -1,462 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dataview.h
-// Purpose: wxDataViewCtrl base classes
-// Author: Robert Roebling
-// Modified by:
-// Created: 08.01.06
-// RCS-ID: $Id: dataview.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) Robert Roebling
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATAVIEW_H_BASE_
-#define _WX_DATAVIEW_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_DATAVIEWCTRL
-
-#include "wx/control.h"
-#include "wx/textctrl.h"
-#include "wx/bitmap.h"
-#include "wx/variant.h"
-
-
-#if defined(__WXGTK20__)
- // for testing
- // #define wxUSE_GENERICDATAVIEWCTRL 1
-#elif defined(__WXMAC__)
- #define wxUSE_GENERICDATAVIEWCTRL 1
-#else
- #define wxUSE_GENERICDATAVIEWCTRL 1
-#endif
-
-// ----------------------------------------------------------------------------
-// wxDataViewCtrl flags
-// ----------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------
-// wxDataViewCtrl globals
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_ADV wxDataViewModel;
-class WXDLLIMPEXP_FWD_ADV wxDataViewListModel;
-class WXDLLIMPEXP_FWD_ADV wxDataViewCtrl;
-class WXDLLIMPEXP_FWD_ADV wxDataViewColumn;
-class WXDLLIMPEXP_FWD_ADV wxDataViewRenderer;
-
-extern WXDLLIMPEXP_DATA_ADV(const wxChar) wxDataViewCtrlNameStr[];
-
-// ---------------------------------------------------------
-// wxDataViewModel
-// ---------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewModel: public wxObject
-{
-public:
- wxDataViewModel() { }
- virtual ~wxDataViewModel() { }
-
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewModel)
-};
-
-// ---------------------------------------------------------
-// wxDataViewListModelNotifier
-// ---------------------------------------------------------
-
-
-class WXDLLIMPEXP_ADV wxDataViewListModelNotifier: public wxObject
-{
-public:
- wxDataViewListModelNotifier() { }
- virtual ~wxDataViewListModelNotifier() { }
-
- virtual bool RowAppended() = 0;
- virtual bool RowPrepended() = 0;
- virtual bool RowInserted( unsigned int before ) = 0;
- virtual bool RowDeleted( unsigned int row ) = 0;
- virtual bool RowChanged( unsigned int row ) = 0;
- virtual bool ValueChanged( unsigned int col, unsigned int row ) = 0;
- virtual bool RowsReordered( unsigned int *new_order ) = 0;
- virtual bool Cleared() = 0;
-
- void SetOwner( wxDataViewListModel *owner ) { m_owner = owner; }
- wxDataViewListModel *GetOwner() { return m_owner; }
-
-private:
- wxDataViewListModel *m_owner;
-};
-
-// ---------------------------------------------------------
-// wxDataViewListModel
-// ---------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewViewingColumn: public wxObject
-{
-public:
- wxDataViewViewingColumn( wxDataViewColumn *view_column, unsigned int model_column )
- {
- m_viewColumn = view_column;
- m_modelColumn = model_column;
- }
-
- wxDataViewColumn *m_viewColumn;
- unsigned int m_modelColumn;
-};
-
-class WXDLLIMPEXP_ADV wxDataViewListModel: public wxDataViewModel
-{
-public:
- wxDataViewListModel();
- virtual ~wxDataViewListModel();
-
- virtual unsigned int GetNumberOfRows() = 0;
- virtual unsigned int GetNumberOfCols() = 0;
- // return type as reported by wxVariant
- virtual wxString GetColType( unsigned int col ) = 0;
- // get value into a wxVariant
- virtual void GetValue( wxVariant &variant, unsigned int col, unsigned int row ) = 0;
- // set value, call ValueChanged() afterwards!
- virtual bool SetValue( wxVariant &variant, unsigned int col, unsigned int row ) = 0;
-
- // delegated notifiers
- virtual bool RowAppended();
- virtual bool RowPrepended();
- virtual bool RowInserted( unsigned int before );
- virtual bool RowDeleted( unsigned int row );
- virtual bool RowChanged( unsigned int row );
- virtual bool ValueChanged( unsigned int col, unsigned int row );
- virtual bool RowsReordered( unsigned int *new_order );
- virtual bool Cleared();
-
- // Used internally
- void AddViewingColumn( wxDataViewColumn *view_column, unsigned int model_column );
- void RemoveViewingColumn( wxDataViewColumn *column );
-
- void AddNotifier( wxDataViewListModelNotifier *notifier );
- void RemoveNotifier( wxDataViewListModelNotifier *notifier );
-
- wxList m_notifiers;
- wxList m_viewingColumns;
-
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewListModel)
-};
-
-// ---------------------------------------------------------
-// wxDataViewSortedListModel
-// ---------------------------------------------------------
-
-typedef int (wxCALLBACK *wxDataViewListModelCompare)
- (unsigned int row1, unsigned int row2, unsigned int col, wxDataViewListModel* model );
-
-WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(unsigned int, wxDataViewSortedIndexArray, WXDLLIMPEXP_ADV);
-
-class WXDLLIMPEXP_ADV wxDataViewSortedListModel: public wxDataViewListModel
-{
-public:
- wxDataViewSortedListModel( wxDataViewListModel *child );
- virtual ~wxDataViewSortedListModel();
-
- void SetAscending( bool ascending ) { m_ascending = ascending; }
- bool GetAscending() { return m_ascending; }
-
- virtual unsigned int GetNumberOfRows();
- virtual unsigned int GetNumberOfCols();
- // return type as reported by wxVariant
- virtual wxString GetColType( unsigned int col );
- // get value into a wxVariant
- virtual void GetValue( wxVariant &variant, unsigned int col, unsigned int row );
- // set value, call ValueChanged() afterwards!
- virtual bool SetValue( wxVariant &variant, unsigned int col, unsigned int row );
-
- // called from user
- virtual bool RowAppended();
- virtual bool RowPrepended();
- virtual bool RowInserted( unsigned int before );
- virtual bool RowDeleted( unsigned int row );
- virtual bool RowChanged( unsigned int row );
- virtual bool ValueChanged( unsigned int col, unsigned int row );
- virtual bool RowsReordered( unsigned int *new_order );
- virtual bool Cleared();
-
- // called if child's notifiers are called
- bool ChildRowAppended();
- bool ChildRowPrepended();
- bool ChildRowInserted( unsigned int before );
- bool ChildRowDeleted( unsigned int row );
- bool ChildRowChanged( unsigned int row );
- bool ChildValueChanged( unsigned int col, unsigned int row );
- bool ChildRowsReordered( unsigned int *new_order );
- bool ChildCleared();
-
- virtual void Resort();
-
-private:
- bool m_ascending;
- wxDataViewListModel *m_child;
- wxDataViewSortedIndexArray m_array;
- wxDataViewListModelNotifier *m_notifierOnChild;
-
- void InitStatics(); // BAD
-
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewSortedListModel)
-};
-
-// ---------------------------------------------------------
-// wxDataViewRendererBase
-// ---------------------------------------------------------
-
-enum wxDataViewCellMode
-{
- wxDATAVIEW_CELL_INERT,
- wxDATAVIEW_CELL_ACTIVATABLE,
- wxDATAVIEW_CELL_EDITABLE
-};
-
-enum wxDataViewCellRenderState
-{
- wxDATAVIEW_CELL_SELECTED = 1,
- wxDATAVIEW_CELL_PRELIT = 2,
- wxDATAVIEW_CELL_INSENSITIVE = 4,
- wxDATAVIEW_CELL_FOCUSED = 8
-};
-
-class WXDLLIMPEXP_ADV wxDataViewRendererBase: public wxObject
-{
-public:
- wxDataViewRendererBase( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT );
-
- virtual bool SetValue( const wxVariant& WXUNUSED(value) ) { return true; }
- virtual bool GetValue( wxVariant& WXUNUSED(value) ) { return true; }
- virtual bool Validate( wxVariant& WXUNUSED(value) ) { return true; }
-
- wxString GetVariantType() { return m_variantType; }
- wxDataViewCellMode GetMode() { return m_mode; }
-
- void SetOwner( wxDataViewColumn *owner ) { m_owner = owner; }
- wxDataViewColumn* GetOwner() { return m_owner; }
-
-protected:
- wxDataViewCellMode m_mode;
- wxString m_variantType;
- wxDataViewColumn *m_owner;
-
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewRendererBase)
-};
-
-// ---------------------------------------------------------
-// wxDataViewColumnBase
-// ---------------------------------------------------------
-
-enum wxDataViewColumnFlags
-{
- wxDATAVIEW_COL_RESIZABLE = 1,
- wxDATAVIEW_COL_SORTABLE = 2,
- wxDATAVIEW_COL_HIDDEN = 4
-};
-
-class WXDLLIMPEXP_ADV wxDataViewColumnBase: public wxObject
-{
-public:
- wxDataViewColumnBase( const wxString &title, wxDataViewRenderer *renderer, unsigned int model_column,
- int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE );
- wxDataViewColumnBase( const wxBitmap &bitmap, wxDataViewRenderer *renderer, unsigned int model_column,
- int width = 80, int flags = wxDATAVIEW_COL_RESIZABLE );
- virtual ~wxDataViewColumnBase();
-
- virtual void SetTitle( const wxString &title );
- virtual wxString GetTitle();
-
- virtual void SetBitmap( const wxBitmap &bitmap );
- virtual const wxBitmap &GetBitmap();
-
- virtual void SetAlignment( wxAlignment align ) = 0;
-
- virtual void SetSortable( bool sortable ) = 0;
- virtual bool GetSortable() = 0;
- virtual void SetSortOrder( bool ascending ) = 0;
- virtual bool IsSortOrderAscending() = 0;
-
- wxDataViewRenderer* GetRenderer() { return m_renderer; }
-
- unsigned int GetModelColumn() { return m_model_column; }
-
- virtual void SetOwner( wxDataViewCtrl *owner ) { m_owner = owner; }
- wxDataViewCtrl *GetOwner() { return m_owner; }
-
- virtual int GetWidth() = 0;
-
-private:
- wxDataViewCtrl *m_ctrl;
- wxDataViewRenderer *m_renderer;
- int m_model_column;
- int m_flags;
- wxString m_title;
- wxBitmap m_bitmap;
- wxDataViewCtrl *m_owner;
-
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewColumnBase)
-};
-
-// ---------------------------------------------------------
-// wxDataViewCtrlBase
-// ---------------------------------------------------------
-
-#define wxDV_SINGLE 0x0000 // for convenience
-#define wxDV_MULTIPLE 0x0020 // can select multiple items
-
-class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
-{
-public:
- wxDataViewCtrlBase();
- virtual ~wxDataViewCtrlBase();
-
- virtual bool AssociateModel( wxDataViewListModel *model );
- wxDataViewListModel* GetModel();
-
- // short cuts
- bool AppendTextColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
- bool AppendToggleColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 );
- bool AppendProgressColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 );
- bool AppendDateColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
- bool AppendBitmapColumn( const wxString &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
- bool AppendTextColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
- bool AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 30 );
- bool AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = 80 );
- bool AppendDateColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1 );
- bool AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
- wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1 );
-
- virtual bool AppendColumn( wxDataViewColumn *col );
- virtual unsigned int GetNumberOfColumns();
- virtual bool DeleteColumn( unsigned int pos );
- virtual bool ClearColumns();
- virtual wxDataViewColumn* GetColumn( unsigned int pos );
-
- virtual void SetSelection( int row ) = 0; // -1 for unselect
- inline void ClearSelection() { SetSelection( -1 ); }
- virtual void Unselect( unsigned int row ) = 0;
- virtual void SetSelectionRange( unsigned int from, unsigned int to ) = 0;
- virtual void SetSelections( const wxArrayInt& aSelections) = 0;
-
- virtual bool IsSelected( unsigned int row ) const = 0;
- virtual int GetSelection() const = 0;
- virtual int GetSelections(wxArrayInt& aSelections) const = 0;
-
-private:
- wxDataViewListModel *m_model;
- wxList m_cols;
-
-protected:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewCtrlBase)
-};
-
-
-// ----------------------------------------------------------------------------
-// wxDataViewEvent - the event class for the wxDataViewCtrl notifications
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewEvent : public wxNotifyEvent
-{
-public:
- wxDataViewEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
- : wxNotifyEvent(commandType, winid),
- m_col(-1),
- m_row(-1),
- m_model(NULL),
- m_value(wxNullVariant),
- m_editCancelled(false),
- m_column(NULL)
- { }
-
- wxDataViewEvent(const wxDataViewEvent& event)
- : wxNotifyEvent(event),
- m_col(event.m_col),
- m_row(event.m_col),
- m_model(event.m_model),
- m_value(event.m_value),
- m_editCancelled(event.m_editCancelled),
- m_column(event.m_column)
- { }
-
- int GetColumn() const { return m_col; }
- void SetColumn( int col ) { m_col = col; }
- int GetRow() const { return m_row; }
- void SetRow( int row ) { m_row = row; }
- wxDataViewModel* GetModel() const { return m_model; }
- void SetModel( wxDataViewModel *model ) { m_model = model; }
- const wxVariant &GetValue() const { return m_value; }
- void SetValue( const wxVariant &value ) { m_value = value; }
-
- // for wxEVT_DATAVIEW_COLUMN_HEADER_CLICKED only
- void SetDataViewColumn( wxDataViewColumn *col ) { m_column = col; }
- wxDataViewColumn *GetDataViewColumn() { return m_column; }
-
- // was label editing canceled? (for wxEVT_COMMAND_DATVIEW_END_LABEL_EDIT only)
- bool IsEditCancelled() const { return m_editCancelled; }
- void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; }
-
- virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); }
-
-protected:
- int m_col;
- int m_row;
- wxDataViewModel *m_model;
- wxVariant m_value;
- bool m_editCancelled;
- wxDataViewColumn *m_column;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent)
-};
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, -1)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED, -1)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, -1)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, -1)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
-
-#define wxDataViewEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDataViewEventFunction, &func)
-
-#define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
-
-#define EVT_DATAVIEW_ROW_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_SELECTED, id, fn)
-#define EVT_DATAVIEW_ROW_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ROW_ACTIVATED, id, fn)
-#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
-#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
-
-
-#if defined(wxUSE_GENERICDATAVIEWCTRL)
- #include "wx/generic/dataview.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dataview.h"
-#elif defined(__WXMAC__)
- // TODO
- // #include "wx/mac/dataview.h"
-#else
- #include "wx/generic/dataview.h"
-#endif
-
-#endif // wxUSE_DATAVIEWCTRL
-
-#endif
- // _WX_DATAVIEW_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/datectrl.h b/desmume/src/windows/wx/include/wx/datectrl.h
deleted file mode 100644
index 0da12775b..000000000
--- a/desmume/src/windows/wx/include/wx/datectrl.h
+++ /dev/null
@@ -1,112 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/datectrl.h
-// Purpose: implements wxDatePickerCtrl
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 2005-01-09
-// RCS-ID: $Id: datectrl.h 37663 2006-02-21 22:14:31Z MR $
-// Copyright: (c) 2005 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATECTRL_H_
-#define _WX_DATECTRL_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_DATEPICKCTRL
-
-#include "wx/control.h" // the base class
-#include "wx/datetime.h"
-
-#define wxDatePickerCtrlNameStr _T("datectrl")
-
-// wxDatePickerCtrl styles
-enum
-{
- // default style on this platform, either wxDP_SPIN or wxDP_DROPDOWN
- wxDP_DEFAULT = 0,
-
- // a spin control-like date picker (not supported in generic version)
- wxDP_SPIN = 1,
-
- // a combobox-like date picker (not supported in mac version)
- wxDP_DROPDOWN = 2,
-
- // always show century in the default date display (otherwise it depends on
- // the system date format which may include the century or not)
- wxDP_SHOWCENTURY = 4,
-
- // allow not having any valid date in the control (by default it always has
- // some date, today initially if no valid date specified in ctor)
- wxDP_ALLOWNONE = 8
-};
-
-// ----------------------------------------------------------------------------
-// wxDatePickerCtrl: allow the user to enter the date
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDatePickerCtrlBase : public wxControl
-{
-public:
- /*
- The derived classes should implement ctor and Create() method with the
- following signature:
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxDateTime& dt = wxDefaultDateTime,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxDatePickerCtrlNameStr);
- */
-
- // set/get the date
- virtual void SetValue(const wxDateTime& dt) = 0;
- virtual wxDateTime GetValue() const = 0;
-
- // set/get the allowed valid range for the dates, if either/both of them
- // are invalid, there is no corresponding limit and if neither is set
- // GetRange() returns false
- virtual void SetRange(const wxDateTime& dt1, const wxDateTime& dt2) = 0;
- virtual bool GetRange(wxDateTime *dt1, wxDateTime *dt2) const = 0;
-};
-
-#if defined(__WXPALMOS__)
- #include "wx/palmos/datectrl.h"
-
- #define wxHAS_NATIVE_DATEPICKCTRL
-#elif defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
- #include "wx/msw/datectrl.h"
-
- #define wxHAS_NATIVE_DATEPICKCTRL
-#else
- #include "wx/generic/datectrl.h"
-
- class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlGeneric
- {
- public:
- wxDatePickerCtrl() { }
- wxDatePickerCtrl(wxWindow *parent,
- wxWindowID id,
- const wxDateTime& date = wxDefaultDateTime,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxDatePickerCtrlNameStr)
- : wxDatePickerCtrlGeneric(parent, id, date, pos, size, style, validator, name)
- {
- }
-
- private:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxDatePickerCtrl)
- };
-#endif
-
-#endif // wxUSE_DATEPICKCTRL
-
-#endif // _WX_DATECTRL_H_
-
diff --git a/desmume/src/windows/wx/include/wx/dateevt.h b/desmume/src/windows/wx/include/wx/dateevt.h
deleted file mode 100644
index ba6295440..000000000
--- a/desmume/src/windows/wx/include/wx/dateevt.h
+++ /dev/null
@@ -1,69 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/dateevt.h
-// Purpose: declares wxDateEvent class
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 2005-01-10
-// RCS-ID: $Id: dateevt.h 39637 2006-06-08 18:27:44Z RD $
-// Copyright: (c) 2005 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATEEVT_H_
-#define _WX_DATEEVT_H_
-
-#include "wx/event.h"
-#include "wx/datetime.h"
-#include "wx/window.h"
-
-// ----------------------------------------------------------------------------
-// wxDateEvent: used by wxCalendarCtrl and wxDatePickerCtrl
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDateEvent : public wxCommandEvent
-{
-public:
- wxDateEvent() { }
- wxDateEvent(wxWindow *win, const wxDateTime& dt, wxEventType type)
- : wxCommandEvent(type, win->GetId()),
- m_date(dt)
- {
- SetEventObject(win);
- }
-
- const wxDateTime& GetDate() const { return m_date; }
- void SetDate(const wxDateTime &date) { m_date = date; }
-
- // default copy ctor, assignment operator and dtor are ok
- virtual wxEvent *Clone() const { return new wxDateEvent(*this); }
-
-private:
- wxDateTime m_date;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDateEvent)
-};
-
-// ----------------------------------------------------------------------------
-// event types and macros for handling them
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_DATE_CHANGED, 1101)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxDateEventFunction)(wxDateEvent&);
-
-#define wxDateEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDateEventFunction, &func)
-
-#define EVT_DATE_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_DATE_CHANGED, id, wxDateEventHandler(fn))
-
-#ifdef _WX_DEFINE_DATE_EVENTS_
- DEFINE_EVENT_TYPE(wxEVT_DATE_CHANGED)
-
- IMPLEMENT_DYNAMIC_CLASS(wxDateEvent, wxCommandEvent)
-#endif
-
-#endif // _WX_DATEEVT_H_
-
diff --git a/desmume/src/windows/wx/include/wx/datetime.h b/desmume/src/windows/wx/include/wx/datetime.h
deleted file mode 100644
index e74dde1c7..000000000
--- a/desmume/src/windows/wx/include/wx/datetime.h
+++ /dev/null
@@ -1,2137 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/datetime.h
-// Purpose: declarations of time/date related classes (wxDateTime,
-// wxTimeSpan)
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 10.02.99
-// RCS-ID: $Id: datetime.h 57502 2008-12-22 19:52:20Z VZ $
-// Copyright: (c) 1998 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATETIME_H
-#define _WX_DATETIME_H
-
-#include "wx/defs.h"
-
-#if wxUSE_DATETIME
-
-#ifndef __WXWINCE__
-#include
-#else
-#include "wx/msw/wince/time.h"
-#endif
-
-#include // for INT_MIN
-
-#include "wx/longlong.h"
-
-class WXDLLIMPEXP_FWD_BASE wxDateTime;
-class WXDLLIMPEXP_FWD_BASE wxTimeSpan;
-class WXDLLIMPEXP_FWD_BASE wxDateSpan;
-
-#include "wx/dynarray.h"
-
-// not all c-runtimes are based on 1/1/1970 being (time_t) 0
-// set this to the corresponding value in seconds 1/1/1970 has on your
-// systems c-runtime
-
-#if defined(__WXMAC__) && !defined(__DARWIN__) && __MSL__ < 0x6000
- #define WX_TIME_BASE_OFFSET ( 2082844800L + 126144000L )
-#else
- #define WX_TIME_BASE_OFFSET 0
-#endif
-/*
- * TODO
- *
- * + 1. Time zones with minutes (make TimeZone a class)
- * ? 2. getdate() function like under Solaris
- * + 3. text conversion for wxDateSpan
- * + 4. pluggable modules for the workdays calculations
- * 5. wxDateTimeHolidayAuthority for Easter and other christian feasts
- */
-
-/* Two wrapper functions for thread safety */
-#ifdef HAVE_LOCALTIME_R
-#define wxLocaltime_r localtime_r
-#else
-WXDLLIMPEXP_BASE struct tm *wxLocaltime_r(const time_t*, struct tm*);
-#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
- // On Windows, localtime _is_ threadsafe!
-#warning using pseudo thread-safe wrapper for localtime to emulate localtime_r
-#endif
-#endif
-
-#ifdef HAVE_GMTIME_R
-#define wxGmtime_r gmtime_r
-#else
-WXDLLIMPEXP_BASE struct tm *wxGmtime_r(const time_t*, struct tm*);
-#if wxUSE_THREADS && !defined(__WINDOWS__) && !defined(__WATCOMC__)
- // On Windows, gmtime _is_ threadsafe!
-#warning using pseudo thread-safe wrapper for gmtime to emulate gmtime_r
-#endif
-#endif
-
-/*
- The three (main) classes declared in this header represent:
-
- 1. An absolute moment in the time (wxDateTime)
- 2. A difference between two moments in the time, positive or negative
- (wxTimeSpan)
- 3. A logical difference between two dates expressed in
- years/months/weeks/days (wxDateSpan)
-
- The following arithmetic operations are permitted (all others are not):
-
- addition
- --------
-
- wxDateTime + wxTimeSpan = wxDateTime
- wxDateTime + wxDateSpan = wxDateTime
- wxTimeSpan + wxTimeSpan = wxTimeSpan
- wxDateSpan + wxDateSpan = wxDateSpan
-
- subtraction
- ------------
- wxDateTime - wxDateTime = wxTimeSpan
- wxDateTime - wxTimeSpan = wxDateTime
- wxDateTime - wxDateSpan = wxDateTime
- wxTimeSpan - wxTimeSpan = wxTimeSpan
- wxDateSpan - wxDateSpan = wxDateSpan
-
- multiplication
- --------------
- wxTimeSpan * number = wxTimeSpan
- number * wxTimeSpan = wxTimeSpan
- wxDateSpan * number = wxDateSpan
- number * wxDateSpan = wxDateSpan
-
- unitary minus
- -------------
- -wxTimeSpan = wxTimeSpan
- -wxDateSpan = wxDateSpan
-
- For each binary operation OP (+, -, *) we have the following operatorOP=() as
- a method and the method with a symbolic name OPER (Add, Subtract, Multiply)
- as a synonym for it and another const method with the same name which returns
- the changed copy of the object and operatorOP() as a global function which is
- implemented in terms of the const version of OPEN. For the unary - we have
- operator-() as a method, Neg() as synonym for it and Negate() which returns
- the copy of the object with the changed sign.
-*/
-
-// an invalid/default date time object which may be used as the default
-// argument for arguments of type wxDateTime; it is also returned by all
-// functions returning wxDateTime on failure (this is why it is also called
-// wxInvalidDateTime)
-class WXDLLIMPEXP_FWD_BASE wxDateTime;
-
-extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultDateTimeFormat;
-extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDefaultTimeSpanFormat;
-extern WXDLLIMPEXP_DATA_BASE(const wxDateTime) wxDefaultDateTime;
-
-#define wxInvalidDateTime wxDefaultDateTime
-
-// ----------------------------------------------------------------------------
-// wxDateTime represents an absolute moment in the time
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxDateTime
-{
-public:
- // types
- // ------------------------------------------------------------------------
-
- // a small unsigned integer type for storing things like minutes,
- // seconds &c. It should be at least short (i.e. not char) to contain
- // the number of milliseconds - it may also be 'int' because there is
- // no size penalty associated with it in our code, we don't store any
- // data in this format
- typedef unsigned short wxDateTime_t;
-
- // constants
- // ------------------------------------------------------------------------
-
- // the timezones
- enum TZ
- {
- // the time in the current time zone
- Local,
-
- // zones from GMT (= Greenwhich Mean Time): they're guaranteed to be
- // consequent numbers, so writing something like `GMT0 + offset' is
- // safe if abs(offset) <= 12
-
- // underscore stands for minus
- GMT_12, GMT_11, GMT_10, GMT_9, GMT_8, GMT_7,
- GMT_6, GMT_5, GMT_4, GMT_3, GMT_2, GMT_1,
- GMT0,
- GMT1, GMT2, GMT3, GMT4, GMT5, GMT6,
- GMT7, GMT8, GMT9, GMT10, GMT11, GMT12, GMT13,
- // Note that GMT12 and GMT_12 are not the same: there is a difference
- // of exactly one day between them
-
- // some symbolic names for TZ
-
- // Europe
- WET = GMT0, // Western Europe Time
- WEST = GMT1, // Western Europe Summer Time
- CET = GMT1, // Central Europe Time
- CEST = GMT2, // Central Europe Summer Time
- EET = GMT2, // Eastern Europe Time
- EEST = GMT3, // Eastern Europe Summer Time
- MSK = GMT3, // Moscow Time
- MSD = GMT4, // Moscow Summer Time
-
- // US and Canada
- AST = GMT_4, // Atlantic Standard Time
- ADT = GMT_3, // Atlantic Daylight Time
- EST = GMT_5, // Eastern Standard Time
- EDT = GMT_4, // Eastern Daylight Saving Time
- CST = GMT_6, // Central Standard Time
- CDT = GMT_5, // Central Daylight Saving Time
- MST = GMT_7, // Mountain Standard Time
- MDT = GMT_6, // Mountain Daylight Saving Time
- PST = GMT_8, // Pacific Standard Time
- PDT = GMT_7, // Pacific Daylight Saving Time
- HST = GMT_10, // Hawaiian Standard Time
- AKST = GMT_9, // Alaska Standard Time
- AKDT = GMT_8, // Alaska Daylight Saving Time
-
- // Australia
-
- A_WST = GMT8, // Western Standard Time
- A_CST = GMT13 + 1, // Central Standard Time (+9.5)
- A_EST = GMT10, // Eastern Standard Time
- A_ESST = GMT11, // Eastern Summer Time
-
- // New Zealand
- NZST = GMT12, // Standard Time
- NZDT = GMT13, // Daylight Saving Time
-
- // TODO add more symbolic timezone names here
-
- // Universal Coordinated Time = the new and politically correct name
- // for GMT
- UTC = GMT0
- };
-
- // the calendar systems we know about: notice that it's valid (for
- // this classes purpose anyhow) to work with any of these calendars
- // even with the dates before the historical appearance of the
- // calendar
- enum Calendar
- {
- Gregorian, // current calendar
- Julian // calendar in use since -45 until the 1582 (or later)
-
- // TODO Hebrew, Chinese, Maya, ... (just kidding) (or then may be not?)
- };
-
- // these values only are used to identify the different dates of
- // adoption of the Gregorian calendar (see IsGregorian())
- //
- // All data and comments taken verbatim from "The Calendar FAQ (v 2.0)"
- // by Claus Tøndering, http://www.pip.dknet.dk/~c-t/calendar.html
- // except for the comments "we take".
- //
- // Symbol "->" should be read as "was followed by" in the comments
- // which follow.
- enum GregorianAdoption
- {
- Gr_Unknown, // no data for this country or it's too uncertain to use
- Gr_Standard, // on the day 0 of Gregorian calendar: 15 Oct 1582
-
- Gr_Alaska, // Oct 1867 when Alaska became part of the USA
- Gr_Albania, // Dec 1912
-
- Gr_Austria = Gr_Unknown, // Different regions on different dates
- Gr_Austria_Brixen, // 5 Oct 1583 -> 16 Oct 1583
- Gr_Austria_Salzburg = Gr_Austria_Brixen,
- Gr_Austria_Tyrol = Gr_Austria_Brixen,
- Gr_Austria_Carinthia, // 14 Dec 1583 -> 25 Dec 1583
- Gr_Austria_Styria = Gr_Austria_Carinthia,
-
- Gr_Belgium, // Then part of the Netherlands
-
- Gr_Bulgaria = Gr_Unknown, // Unknown precisely (from 1915 to 1920)
- Gr_Bulgaria_1, // 18 Mar 1916 -> 1 Apr 1916
- Gr_Bulgaria_2, // 31 Mar 1916 -> 14 Apr 1916
- Gr_Bulgaria_3, // 3 Sep 1920 -> 17 Sep 1920
-
- Gr_Canada = Gr_Unknown, // Different regions followed the changes in
- // Great Britain or France
-
- Gr_China = Gr_Unknown, // Different authorities say:
- Gr_China_1, // 18 Dec 1911 -> 1 Jan 1912
- Gr_China_2, // 18 Dec 1928 -> 1 Jan 1929
-
- Gr_Czechoslovakia, // (Bohemia and Moravia) 6 Jan 1584 -> 17 Jan 1584
- Gr_Denmark, // (including Norway) 18 Feb 1700 -> 1 Mar 1700
- Gr_Egypt, // 1875
- Gr_Estonia, // 1918
- Gr_Finland, // Then part of Sweden
-
- Gr_France, // 9 Dec 1582 -> 20 Dec 1582
- Gr_France_Alsace, // 4 Feb 1682 -> 16 Feb 1682
- Gr_France_Lorraine, // 16 Feb 1760 -> 28 Feb 1760
- Gr_France_Strasbourg, // February 1682
-
- Gr_Germany = Gr_Unknown, // Different states on different dates:
- Gr_Germany_Catholic, // 1583-1585 (we take 1584)
- Gr_Germany_Prussia, // 22 Aug 1610 -> 2 Sep 1610
- Gr_Germany_Protestant, // 18 Feb 1700 -> 1 Mar 1700
-
- Gr_GreatBritain, // 2 Sep 1752 -> 14 Sep 1752 (use 'cal(1)')
-
- Gr_Greece, // 9 Mar 1924 -> 23 Mar 1924
- Gr_Hungary, // 21 Oct 1587 -> 1 Nov 1587
- Gr_Ireland = Gr_GreatBritain,
- Gr_Italy = Gr_Standard,
-
- Gr_Japan = Gr_Unknown, // Different authorities say:
- Gr_Japan_1, // 19 Dec 1872 -> 1 Jan 1873
- Gr_Japan_2, // 19 Dec 1892 -> 1 Jan 1893
- Gr_Japan_3, // 18 Dec 1918 -> 1 Jan 1919
-
- Gr_Latvia, // 1915-1918 (we take 1915)
- Gr_Lithuania, // 1915
- Gr_Luxemburg, // 14 Dec 1582 -> 25 Dec 1582
- Gr_Netherlands = Gr_Belgium, // (including Belgium) 1 Jan 1583
-
- // this is too weird to take into account: the Gregorian calendar was
- // introduced twice in Groningen, first time 28 Feb 1583 was followed
- // by 11 Mar 1583, then it has gone back to Julian in the summer of
- // 1584 and then 13 Dec 1700 -> 12 Jan 1701 - which is
- // the date we take here
- Gr_Netherlands_Groningen, // 13 Dec 1700 -> 12 Jan 1701
- Gr_Netherlands_Gelderland, // 30 Jun 1700 -> 12 Jul 1700
- Gr_Netherlands_Utrecht, // (and Overijssel) 30 Nov 1700->12 Dec 1700
- Gr_Netherlands_Friesland, // (and Drenthe) 31 Dec 1700 -> 12 Jan 1701
-
- Gr_Norway = Gr_Denmark, // Then part of Denmark
- Gr_Poland = Gr_Standard,
- Gr_Portugal = Gr_Standard,
- Gr_Romania, // 31 Mar 1919 -> 14 Apr 1919
- Gr_Russia, // 31 Jan 1918 -> 14 Feb 1918
- Gr_Scotland = Gr_GreatBritain,
- Gr_Spain = Gr_Standard,
-
- // Sweden has a curious history. Sweden decided to make a gradual
- // change from the Julian to the Gregorian calendar. By dropping every
- // leap year from 1700 through 1740 the eleven superfluous days would
- // be omitted and from 1 Mar 1740 they would be in sync with the
- // Gregorian calendar. (But in the meantime they would be in sync with
- // nobody!)
- //
- // So 1700 (which should have been a leap year in the Julian calendar)
- // was not a leap year in Sweden. However, by mistake 1704 and 1708
- // became leap years. This left Sweden out of synchronisation with
- // both the Julian and the Gregorian world, so they decided to go back
- // to the Julian calendar. In order to do this, they inserted an extra
- // day in 1712, making that year a double leap year! So in 1712,
- // February had 30 days in Sweden.
- //
- // Later, in 1753, Sweden changed to the Gregorian calendar by
- // dropping 11 days like everyone else.
- Gr_Sweden = Gr_Finland, // 17 Feb 1753 -> 1 Mar 1753
-
- Gr_Switzerland = Gr_Unknown,// Different cantons used different dates
- Gr_Switzerland_Catholic, // 1583, 1584 or 1597 (we take 1584)
- Gr_Switzerland_Protestant, // 31 Dec 1700 -> 12 Jan 1701
-
- Gr_Turkey, // 1 Jan 1927
- Gr_USA = Gr_GreatBritain,
- Gr_Wales = Gr_GreatBritain,
- Gr_Yugoslavia // 1919
- };
-
- // the country parameter is used so far for calculating the start and
- // the end of DST period and for deciding whether the date is a work
- // day or not
- //
- // TODO move this to intl.h
-
-// Required for WinCE
-#ifdef USA
-#undef USA
-#endif
-
- enum Country
- {
- Country_Unknown, // no special information for this country
- Country_Default, // set the default country with SetCountry() method
- // or use the default country with any other
-
- // TODO add more countries (for this we must know about DST and/or
- // holidays for this country)
-
- // Western European countries: we assume that they all follow the same
- // DST rules (true or false?)
- Country_WesternEurope_Start,
- Country_EEC = Country_WesternEurope_Start,
- France,
- Germany,
- UK,
- Country_WesternEurope_End = UK,
-
- Russia,
- USA
- };
- // symbolic names for the months
- enum Month
- {
- Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Inv_Month
- };
-
- // symbolic names for the weekdays
- enum WeekDay
- {
- Sun, Mon, Tue, Wed, Thu, Fri, Sat, Inv_WeekDay
- };
-
- // invalid value for the year
- enum Year
- {
- Inv_Year = SHRT_MIN // should hold in wxDateTime_t
- };
-
- // flags for GetWeekDayName and GetMonthName
- enum NameFlags
- {
- Name_Full = 0x01, // return full name
- Name_Abbr = 0x02 // return abbreviated name
- };
-
- // flags for GetWeekOfYear and GetWeekOfMonth
- enum WeekFlags
- {
- Default_First, // Sunday_First for US, Monday_First for the rest
- Monday_First, // week starts with a Monday
- Sunday_First // week starts with a Sunday
- };
-
- // helper classes
- // ------------------------------------------------------------------------
-
- // a class representing a time zone: basicly, this is just an offset
- // (in seconds) from GMT
- class WXDLLIMPEXP_BASE TimeZone
- {
- public:
- TimeZone(TZ tz);
-
- // don't use this ctor, it doesn't work for negative offsets (but can't
- // be removed or changed to avoid breaking ABI in 2.8)
- TimeZone(wxDateTime_t offset = 0) { m_offset = offset; }
-
-#if wxABI_VERSION >= 20808
- // create time zone object with the given offset
- static TimeZone Make(long offset)
- {
- TimeZone tz;
- tz.m_offset = offset;
- return tz;
- }
-#endif // wxABI 2.8.8+
-
- long GetOffset() const { return m_offset; }
-
- private:
- // offset for this timezone from GMT in seconds
- long m_offset;
- };
-
- // standard struct tm is limited to the years from 1900 (because
- // tm_year field is the offset from 1900), so we use our own struct
- // instead to represent broken down time
- //
- // NB: this struct should always be kept normalized (i.e. mon should
- // be < 12, 1 <= day <= 31 &c), so use AddMonths(), AddDays()
- // instead of modifying the member fields directly!
- struct WXDLLIMPEXP_BASE Tm
- {
- wxDateTime_t msec, sec, min, hour, mday;
- Month mon;
- int year;
-
- // default ctor inits the object to an invalid value
- Tm();
-
- // ctor from struct tm and the timezone
- Tm(const struct tm& tm, const TimeZone& tz);
-
- // check that the given date/time is valid (in Gregorian calendar)
- bool IsValid() const;
-
- // get the week day
- WeekDay GetWeekDay() // not const because wday may be changed
- {
- if ( wday == Inv_WeekDay )
- ComputeWeekDay();
-
- return (WeekDay)wday;
- }
-
- // add the given number of months to the date keeping it normalized
- void AddMonths(int monDiff);
-
- // add the given number of months to the date keeping it normalized
- void AddDays(int dayDiff);
-
- private:
- // compute the weekday from other fields
- void ComputeWeekDay();
-
- // the timezone we correspond to
- TimeZone m_tz;
-
- // these values can't be accessed directly because they're not always
- // computed and we calculate them on demand
- wxDateTime_t wday, yday;
- };
-
- // static methods
- // ------------------------------------------------------------------------
-
- // set the current country
- static void SetCountry(Country country);
- // get the current country
- static Country GetCountry();
-
- // return true if the country is a West European one (in practice,
- // this means that the same DST rules as for EEC apply)
- static bool IsWestEuropeanCountry(Country country = Country_Default);
-
- // return the current year
- static int GetCurrentYear(Calendar cal = Gregorian);
-
- // convert the year as returned by wxDateTime::GetYear() to a year
- // suitable for BC/AD notation. The difference is that BC year 1
- // corresponds to the year 0 (while BC year 0 didn't exist) and AD
- // year N is just year N.
- static int ConvertYearToBC(int year);
-
- // return the current month
- static Month GetCurrentMonth(Calendar cal = Gregorian);
-
- // returns true if the given year is a leap year in the given calendar
- static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
-
- // get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
- static int GetCentury(int year);
-
- // returns the number of days in this year (356 or 355 for Gregorian
- // calendar usually :-)
- static wxDateTime_t GetNumberOfDays(int year, Calendar cal = Gregorian);
-
- // get the number of the days in the given month (default value for
- // the year means the current one)
- static wxDateTime_t GetNumberOfDays(Month month,
- int year = Inv_Year,
- Calendar cal = Gregorian);
-
- // get the full (default) or abbreviated month name in the current
- // locale, returns empty string on error
- static wxString GetMonthName(Month month,
- NameFlags flags = Name_Full);
-
- // get the full (default) or abbreviated weekday name in the current
- // locale, returns empty string on error
- static wxString GetWeekDayName(WeekDay weekday,
- NameFlags flags = Name_Full);
-
- // get the AM and PM strings in the current locale (may be empty)
- static void GetAmPmStrings(wxString *am, wxString *pm);
-
- // return true if the given country uses DST for this year
- static bool IsDSTApplicable(int year = Inv_Year,
- Country country = Country_Default);
-
- // get the beginning of DST for this year, will return invalid object
- // if no DST applicable in this year. The default value of the
- // parameter means to take the current year.
- static wxDateTime GetBeginDST(int year = Inv_Year,
- Country country = Country_Default);
- // get the end of DST for this year, will return invalid object
- // if no DST applicable in this year. The default value of the
- // parameter means to take the current year.
- static wxDateTime GetEndDST(int year = Inv_Year,
- Country country = Country_Default);
-
- // return the wxDateTime object for the current time
- static inline wxDateTime Now();
-
- // return the wxDateTime object for the current time with millisecond
- // precision (if available on this platform)
- static wxDateTime UNow();
-
- // return the wxDateTime object for today midnight: i.e. as Now() but
- // with time set to 0
- static inline wxDateTime Today();
-
- // constructors: you should test whether the constructor succeeded with
- // IsValid() function. The values Inv_Month and Inv_Year for the
- // parameters mean take current month and/or year values.
- // ------------------------------------------------------------------------
-
- // default ctor does not initialize the object, use Set()!
- wxDateTime() { m_time = wxLongLong((wxInt32)UINT_MAX, UINT_MAX); }
-
- // from time_t: seconds since the Epoch 00:00:00 UTC, Jan 1, 1970)
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
-// VA C++ confuses this with wxDateTime(double jdn) thinking it is a duplicate declaration
- inline wxDateTime(time_t timet);
-#endif
- // from broken down time/date (only for standard Unix range)
- inline wxDateTime(const struct tm& tm);
- // from broken down time/date (any range)
- inline wxDateTime(const Tm& tm);
-
- // from JDN (beware of rounding errors)
- inline wxDateTime(double jdn);
-
- // from separate values for each component, date set to today
- inline wxDateTime(wxDateTime_t hour,
- wxDateTime_t minute = 0,
- wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
- // from separate values for each component with explicit date
- inline wxDateTime(wxDateTime_t day, // day of the month
- Month month,
- int year = Inv_Year, // 1999, not 99 please!
- wxDateTime_t hour = 0,
- wxDateTime_t minute = 0,
- wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
-
- // default copy ctor ok
-
- // no dtor
-
- // assignment operators and Set() functions: all non const methods return
- // the reference to this object. IsValid() should be used to test whether
- // the function succeeded.
- // ------------------------------------------------------------------------
-
- // set to the current time
- inline wxDateTime& SetToCurrent();
-
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
-// VA C++ confuses this with wxDateTime(double jdn) thinking it is a duplicate declaration
- // set to given time_t value
- inline wxDateTime& Set(time_t timet);
-#endif
-
- // set to given broken down time/date
- wxDateTime& Set(const struct tm& tm);
-
- // set to given broken down time/date
- inline wxDateTime& Set(const Tm& tm);
-
- // set to given JDN (beware of rounding errors)
- wxDateTime& Set(double jdn);
-
- // set to given time, date = today
- wxDateTime& Set(wxDateTime_t hour,
- wxDateTime_t minute = 0,
- wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
-
- // from separate values for each component with explicit date
- // (defaults for month and year are the current values)
- wxDateTime& Set(wxDateTime_t day,
- Month month,
- int year = Inv_Year, // 1999, not 99 please!
- wxDateTime_t hour = 0,
- wxDateTime_t minute = 0,
- wxDateTime_t second = 0,
- wxDateTime_t millisec = 0);
-
- // resets time to 00:00:00, doesn't change the date
- wxDateTime& ResetTime();
-
-#if wxABI_VERSION >= 20802
- // get the date part of this object only, i.e. the object which has the
- // same date as this one but time of 00:00:00
- wxDateTime GetDateOnly() const;
-#endif // wxABI 2.8.1+
-
- // the following functions don't change the values of the other
- // fields, i.e. SetMinute() won't change either hour or seconds value
-
- // set the year
- wxDateTime& SetYear(int year);
- // set the month
- wxDateTime& SetMonth(Month month);
- // set the day of the month
- wxDateTime& SetDay(wxDateTime_t day);
- // set hour
- wxDateTime& SetHour(wxDateTime_t hour);
- // set minute
- wxDateTime& SetMinute(wxDateTime_t minute);
- // set second
- wxDateTime& SetSecond(wxDateTime_t second);
- // set millisecond
- wxDateTime& SetMillisecond(wxDateTime_t millisecond);
-
- // assignment operator from time_t
- wxDateTime& operator=(time_t timet) { return Set(timet); }
-
- // assignment operator from broken down time/date
- wxDateTime& operator=(const struct tm& tm) { return Set(tm); }
-
- // assignment operator from broken down time/date
- wxDateTime& operator=(const Tm& tm) { return Set(tm); }
-
- // default assignment operator is ok
-
- // calendar calculations (functions which set the date only leave the time
- // unchanged, e.g. don't explictly zero it): SetXXX() functions modify the
- // object itself, GetXXX() ones return a new object.
- // ------------------------------------------------------------------------
-
- // set to the given week day in the same week as this one
- wxDateTime& SetToWeekDayInSameWeek(WeekDay weekday,
- WeekFlags flags = Monday_First);
- inline wxDateTime GetWeekDayInSameWeek(WeekDay weekday,
- WeekFlags flags = Monday_First) const;
-
- // set to the next week day following this one
- wxDateTime& SetToNextWeekDay(WeekDay weekday);
- inline wxDateTime GetNextWeekDay(WeekDay weekday) const;
-
- // set to the previous week day before this one
- wxDateTime& SetToPrevWeekDay(WeekDay weekday);
- inline wxDateTime GetPrevWeekDay(WeekDay weekday) const;
-
- // set to Nth occurence of given weekday in the given month of the
- // given year (time is set to 0), return true on success and false on
- // failure. n may be positive (1..5) or negative to count from the end
- // of the month (see helper function SetToLastWeekDay())
- bool SetToWeekDay(WeekDay weekday,
- int n = 1,
- Month month = Inv_Month,
- int year = Inv_Year);
- inline wxDateTime GetWeekDay(WeekDay weekday,
- int n = 1,
- Month month = Inv_Month,
- int year = Inv_Year) const;
-
- // sets to the last weekday in the given month, year
- inline bool SetToLastWeekDay(WeekDay weekday,
- Month month = Inv_Month,
- int year = Inv_Year);
- inline wxDateTime GetLastWeekDay(WeekDay weekday,
- Month month = Inv_Month,
- int year = Inv_Year);
-
-#if WXWIN_COMPATIBILITY_2_6
- // sets the date to the given day of the given week in the year,
- // returns true on success and false if given date doesn't exist (e.g.
- // numWeek is > 53)
- //
- // these functions are badly defined as they're not the reverse of
- // GetWeekOfYear(), use SetToTheWeekOfYear() instead
- wxDEPRECATED( bool SetToTheWeek(wxDateTime_t numWeek,
- WeekDay weekday = Mon,
- WeekFlags flags = Monday_First) );
- wxDEPRECATED( wxDateTime GetWeek(wxDateTime_t numWeek,
- WeekDay weekday = Mon,
- WeekFlags flags = Monday_First) const );
-#endif // WXWIN_COMPATIBILITY_2_6
-
- // returns the date corresponding to the given week day of the given
- // week (in ISO notation) of the specified year
- static wxDateTime SetToWeekOfYear(int year,
- wxDateTime_t numWeek,
- WeekDay weekday = Mon);
-
- // sets the date to the last day of the given (or current) month or the
- // given (or current) year
- wxDateTime& SetToLastMonthDay(Month month = Inv_Month,
- int year = Inv_Year);
- inline wxDateTime GetLastMonthDay(Month month = Inv_Month,
- int year = Inv_Year) const;
-
- // sets to the given year day (1..365 or 366)
- wxDateTime& SetToYearDay(wxDateTime_t yday);
- inline wxDateTime GetYearDay(wxDateTime_t yday) const;
-
- // The definitions below were taken verbatim from
- //
- // http://www.capecod.net/~pbaum/date/date0.htm
- //
- // (Peter Baum's home page)
- //
- // definition: The Julian Day Number, Julian Day, or JD of a
- // particular instant of time is the number of days and fractions of a
- // day since 12 hours Universal Time (Greenwich mean noon) on January
- // 1 of the year -4712, where the year is given in the Julian
- // proleptic calendar. The idea of using this reference date was
- // originally proposed by Joseph Scalizer in 1582 to count years but
- // it was modified by 19th century astronomers to count days. One
- // could have equivalently defined the reference time to be noon of
- // November 24, -4713 if were understood that Gregorian calendar rules
- // were applied. Julian days are Julian Day Numbers and are not to be
- // confused with Julian dates.
- //
- // definition: The Rata Die number is a date specified as the number
- // of days relative to a base date of December 31 of the year 0. Thus
- // January 1 of the year 1 is Rata Die day 1.
-
- // get the Julian Day number (the fractional part specifies the time of
- // the day, related to noon - beware of rounding errors!)
- double GetJulianDayNumber() const;
- double GetJDN() const { return GetJulianDayNumber(); }
-
- // get the Modified Julian Day number: it is equal to JDN - 2400000.5
- // and so integral MJDs correspond to the midnights (and not noons).
- // MJD 0 is Nov 17, 1858
- double GetModifiedJulianDayNumber() const { return GetJDN() - 2400000.5; }
- double GetMJD() const { return GetModifiedJulianDayNumber(); }
-
- // get the Rata Die number
- double GetRataDie() const;
-
- // TODO algorithms for calculating some important dates, such as
- // religious holidays (Easter...) or moon/solar eclipses? Some
- // algorithms can be found in the calendar FAQ
-
-
- // Timezone stuff: a wxDateTime object constructed using given
- // day/month/year/hour/min/sec values is interpreted as this moment in
- // local time. Using the functions below, it may be converted to another
- // time zone (e.g., the Unix epoch is wxDateTime(1, Jan, 1970).ToGMT()).
- //
- // These functions try to handle DST internally, but there is no magical
- // way to know all rules for it in all countries in the world, so if the
- // program can handle it itself (or doesn't want to handle it at all for
- // whatever reason), the DST handling can be disabled with noDST.
- // ------------------------------------------------------------------------
-
- // transform to any given timezone
- inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const;
- wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false);
-
- // interpret current value as being in another timezone and transform
- // it to local one
- inline wxDateTime FromTimezone(const TimeZone& tz, bool noDST = false) const;
- wxDateTime& MakeFromTimezone(const TimeZone& tz, bool noDST = false);
-
- // transform to/from GMT/UTC
- wxDateTime ToUTC(bool noDST = false) const { return ToTimezone(UTC, noDST); }
- wxDateTime& MakeUTC(bool noDST = false) { return MakeTimezone(UTC, noDST); }
-
- wxDateTime ToGMT(bool noDST = false) const { return ToUTC(noDST); }
- wxDateTime& MakeGMT(bool noDST = false) { return MakeUTC(noDST); }
-
- wxDateTime FromUTC(bool noDST = false) const
- { return FromTimezone(UTC, noDST); }
- wxDateTime& MakeFromUTC(bool noDST = false)
- { return MakeFromTimezone(UTC, noDST); }
-
- // is daylight savings time in effect at this moment according to the
- // rules of the specified country?
- //
- // Return value is > 0 if DST is in effect, 0 if it is not and -1 if
- // the information is not available (this is compatible with ANSI C)
- int IsDST(Country country = Country_Default) const;
-
-
- // accessors: many of them take the timezone parameter which indicates the
- // timezone for which to make the calculations and the default value means
- // to do it for the current timezone of this machine (even if the function
- // only operates with the date it's necessary because a date may wrap as
- // result of timezone shift)
- // ------------------------------------------------------------------------
-
- // is the date valid?
- inline bool IsValid() const { return m_time != wxInvalidDateTime.m_time; }
-
- // get the broken down date/time representation in the given timezone
- //
- // If you wish to get several time components (day, month and year),
- // consider getting the whole Tm strcuture first and retrieving the
- // value from it - this is much more efficient
- Tm GetTm(const TimeZone& tz = Local) const;
-
- // get the number of seconds since the Unix epoch - returns (time_t)-1
- // if the value is out of range
- inline time_t GetTicks() const;
-
- // get the century, same as GetCentury(GetYear())
- int GetCentury(const TimeZone& tz = Local) const
- { return GetCentury(GetYear(tz)); }
- // get the year (returns Inv_Year if date is invalid)
- int GetYear(const TimeZone& tz = Local) const
- { return GetTm(tz).year; }
- // get the month (Inv_Month if date is invalid)
- Month GetMonth(const TimeZone& tz = Local) const
- { return (Month)GetTm(tz).mon; }
- // get the month day (in 1..31 range, 0 if date is invalid)
- wxDateTime_t GetDay(const TimeZone& tz = Local) const
- { return GetTm(tz).mday; }
- // get the day of the week (Inv_WeekDay if date is invalid)
- WeekDay GetWeekDay(const TimeZone& tz = Local) const
- { return GetTm(tz).GetWeekDay(); }
- // get the hour of the day
- wxDateTime_t GetHour(const TimeZone& tz = Local) const
- { return GetTm(tz).hour; }
- // get the minute
- wxDateTime_t GetMinute(const TimeZone& tz = Local) const
- { return GetTm(tz).min; }
- // get the second
- wxDateTime_t GetSecond(const TimeZone& tz = Local) const
- { return GetTm(tz).sec; }
- // get milliseconds
- wxDateTime_t GetMillisecond(const TimeZone& tz = Local) const
- { return GetTm(tz).msec; }
-
- // get the day since the year start (1..366, 0 if date is invalid)
- wxDateTime_t GetDayOfYear(const TimeZone& tz = Local) const;
- // get the week number since the year start (1..52 or 53, 0 if date is
- // invalid)
- wxDateTime_t GetWeekOfYear(WeekFlags flags = Monday_First,
- const TimeZone& tz = Local) const;
- // get the week number since the month start (1..5, 0 if date is
- // invalid)
- wxDateTime_t GetWeekOfMonth(WeekFlags flags = Monday_First,
- const TimeZone& tz = Local) const;
-
- // is this date a work day? This depends on a country, of course,
- // because the holidays are different in different countries
- bool IsWorkDay(Country country = Country_Default) const;
-
- // is this date later than Gregorian calendar introduction for the
- // given country (see enum GregorianAdoption)?
- //
- // NB: this function shouldn't be considered as absolute authority in
- // the matter. Besides, for some countries the exact date of
- // adoption of the Gregorian calendar is simply unknown.
- bool IsGregorianDate(GregorianAdoption country = Gr_Standard) const;
-
- // dos date and time format
- // ------------------------------------------------------------------------
-
- // set from the DOS packed format
- wxDateTime& SetFromDOS(unsigned long ddt);
-
- // pack the date in DOS format
- unsigned long GetAsDOS() const;
-
- // comparison (see also functions below for operator versions)
- // ------------------------------------------------------------------------
-
- // returns true if the two moments are strictly identical
- inline bool IsEqualTo(const wxDateTime& datetime) const;
-
- // returns true if the date is strictly earlier than the given one
- inline bool IsEarlierThan(const wxDateTime& datetime) const;
-
- // returns true if the date is strictly later than the given one
- inline bool IsLaterThan(const wxDateTime& datetime) const;
-
- // returns true if the date is strictly in the given range
- inline bool IsStrictlyBetween(const wxDateTime& t1,
- const wxDateTime& t2) const;
-
- // returns true if the date is in the given range
- inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
-
- // do these two objects refer to the same date?
- inline bool IsSameDate(const wxDateTime& dt) const;
-
- // do these two objects have the same time?
- inline bool IsSameTime(const wxDateTime& dt) const;
-
- // are these two objects equal up to given timespan?
- inline bool IsEqualUpTo(const wxDateTime& dt, const wxTimeSpan& ts) const;
-
- inline bool operator<(const wxDateTime& dt) const
- {
- wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
- return GetValue() < dt.GetValue();
- }
-
- inline bool operator<=(const wxDateTime& dt) const
- {
- wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
- return GetValue() <= dt.GetValue();
- }
-
- inline bool operator>(const wxDateTime& dt) const
- {
- wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
- return GetValue() > dt.GetValue();
- }
-
- inline bool operator>=(const wxDateTime& dt) const
- {
- wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
- return GetValue() >= dt.GetValue();
- }
-
- inline bool operator==(const wxDateTime& dt) const
- {
- wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
- return GetValue() == dt.GetValue();
- }
-
- inline bool operator!=(const wxDateTime& dt) const
- {
- wxASSERT_MSG( IsValid() && dt.IsValid(), _T("invalid wxDateTime") );
- return GetValue() != dt.GetValue();
- }
-
- // arithmetics with dates (see also below for more operators)
- // ------------------------------------------------------------------------
-
- // return the sum of the date with a time span (positive or negative)
- inline wxDateTime Add(const wxTimeSpan& diff) const;
- // add a time span (positive or negative)
- inline wxDateTime& Add(const wxTimeSpan& diff);
- // add a time span (positive or negative)
- inline wxDateTime& operator+=(const wxTimeSpan& diff);
- inline wxDateTime operator+(const wxTimeSpan& ts) const
- {
- wxDateTime dt(*this);
- dt.Add(ts);
- return dt;
- }
-
- // return the difference of the date with a time span
- inline wxDateTime Subtract(const wxTimeSpan& diff) const;
- // subtract a time span (positive or negative)
- inline wxDateTime& Subtract(const wxTimeSpan& diff);
- // subtract a time span (positive or negative)
- inline wxDateTime& operator-=(const wxTimeSpan& diff);
- inline wxDateTime operator-(const wxTimeSpan& ts) const
- {
- wxDateTime dt(*this);
- dt.Subtract(ts);
- return dt;
- }
-
- // return the sum of the date with a date span
- inline wxDateTime Add(const wxDateSpan& diff) const;
- // add a date span (positive or negative)
- wxDateTime& Add(const wxDateSpan& diff);
- // add a date span (positive or negative)
- inline wxDateTime& operator+=(const wxDateSpan& diff);
- inline wxDateTime operator+(const wxDateSpan& ds) const
- {
- wxDateTime dt(*this);
- dt.Add(ds);
- return dt;
- }
-
- // return the difference of the date with a date span
- inline wxDateTime Subtract(const wxDateSpan& diff) const;
- // subtract a date span (positive or negative)
- inline wxDateTime& Subtract(const wxDateSpan& diff);
- // subtract a date span (positive or negative)
- inline wxDateTime& operator-=(const wxDateSpan& diff);
- inline wxDateTime operator-(const wxDateSpan& ds) const
- {
- wxDateTime dt(*this);
- dt.Subtract(ds);
- return dt;
- }
-
- // return the difference between two dates
- inline wxTimeSpan Subtract(const wxDateTime& dt) const;
- inline wxTimeSpan operator-(const wxDateTime& dt2) const;
-
- // conversion to/from text: all conversions from text return the pointer to
- // the next character following the date specification (i.e. the one where
- // the scan had to stop) or NULL on failure.
- // ------------------------------------------------------------------------
-
- // parse a string in RFC 822 format (found e.g. in mail headers and
- // having the form "Wed, 10 Feb 1999 19:07:07 +0100")
- const wxChar *ParseRfc822Date(const wxChar* date);
- // parse a date/time in the given format (see strptime(3)), fill in
- // the missing (in the string) fields with the values of dateDef (by
- // default, they will not change if they had valid values or will
- // default to Today() otherwise)
- const wxChar *ParseFormat(const wxChar *date,
- const wxChar *format = wxDefaultDateTimeFormat,
- const wxDateTime& dateDef = wxDefaultDateTime);
- // parse a string containing the date/time in "free" format, this
- // function will try to make an educated guess at the string contents
- const wxChar *ParseDateTime(const wxChar *datetime);
- // parse a string containing the date only in "free" format (less
- // flexible than ParseDateTime)
- const wxChar *ParseDate(const wxChar *date);
- // parse a string containing the time only in "free" format
- const wxChar *ParseTime(const wxChar *time);
-
- // this function accepts strftime()-like format string (default
- // argument corresponds to the preferred date and time representation
- // for the current locale) and returns the string containing the
- // resulting text representation
- wxString Format(const wxChar *format = wxDefaultDateTimeFormat,
- const TimeZone& tz = Local) const;
- // preferred date representation for the current locale
- wxString FormatDate() const { return Format(_T("%x")); }
- // preferred time representation for the current locale
- wxString FormatTime() const { return Format(_T("%X")); }
- // returns the string representing the date in ISO 8601 format
- // (YYYY-MM-DD)
- wxString FormatISODate() const { return Format(_T("%Y-%m-%d")); }
- // returns the string representing the time in ISO 8601 format
- // (HH:MM:SS)
- wxString FormatISOTime() const { return Format(_T("%H:%M:%S")); }
-
- // implementation
- // ------------------------------------------------------------------------
-
- // construct from internal representation
- wxDateTime(const wxLongLong& time) { m_time = time; }
-
- // get the internal representation
- inline wxLongLong GetValue() const;
-
- // a helper function to get the current time_t
- static time_t GetTimeNow() { return time((time_t *)NULL); }
-
- // another one to get the current time broken down
- static struct tm *GetTmNow()
- {
- static struct tm l_CurrentTime;
- return GetTmNow(&l_CurrentTime);
- }
-
- // get current time using thread-safe function
- static struct tm *GetTmNow(struct tm *tmstruct);
-
-private:
- // the current country - as it's the same for all program objects (unless
- // it runs on a _really_ big cluster system :-), this is a static member:
- // see SetCountry() and GetCountry()
- static Country ms_country;
-
- // this constant is used to transform a time_t value to the internal
- // representation, as time_t is in seconds and we use milliseconds it's
- // fixed to 1000
- static const long TIME_T_FACTOR;
-
- // returns true if we fall in range in which we can use standard ANSI C
- // functions
- inline bool IsInStdRange() const;
-
- // the internal representation of the time is the amount of milliseconds
- // elapsed since the origin which is set by convention to the UNIX/C epoch
- // value: the midnight of January 1, 1970 (UTC)
- wxLongLong m_time;
-};
-
-// ----------------------------------------------------------------------------
-// This class contains a difference between 2 wxDateTime values, so it makes
-// sense to add it to wxDateTime and it is the result of subtraction of 2
-// objects of that class. See also wxDateSpan.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxTimeSpan
-{
-public:
- // constructors
- // ------------------------------------------------------------------------
-
- // return the timespan for the given number of milliseconds
- static wxTimeSpan Milliseconds(wxLongLong ms) { return wxTimeSpan(0, 0, 0, ms); }
- static wxTimeSpan Millisecond() { return Milliseconds(1); }
-
- // return the timespan for the given number of seconds
- static wxTimeSpan Seconds(wxLongLong sec) { return wxTimeSpan(0, 0, sec); }
- static wxTimeSpan Second() { return Seconds(1); }
-
- // return the timespan for the given number of minutes
- static wxTimeSpan Minutes(long min) { return wxTimeSpan(0, min, 0 ); }
- static wxTimeSpan Minute() { return Minutes(1); }
-
- // return the timespan for the given number of hours
- static wxTimeSpan Hours(long hours) { return wxTimeSpan(hours, 0, 0); }
- static wxTimeSpan Hour() { return Hours(1); }
-
- // return the timespan for the given number of days
- static wxTimeSpan Days(long days) { return Hours(24 * days); }
- static wxTimeSpan Day() { return Days(1); }
-
- // return the timespan for the given number of weeks
- static wxTimeSpan Weeks(long days) { return Days(7 * days); }
- static wxTimeSpan Week() { return Weeks(1); }
-
- // default ctor constructs the 0 time span
- wxTimeSpan() { }
-
- // from separate values for each component, date set to 0 (hours are
- // not restricted to 0..24 range, neither are minutes, seconds or
- // milliseconds)
- inline wxTimeSpan(long hours,
- long minutes = 0,
- wxLongLong seconds = 0,
- wxLongLong milliseconds = 0);
-
- // default copy ctor is ok
-
- // no dtor
-
- // arithmetics with time spans (see also below for more operators)
- // ------------------------------------------------------------------------
-
- // return the sum of two timespans
- inline wxTimeSpan Add(const wxTimeSpan& diff) const;
- // add two timespans together
- inline wxTimeSpan& Add(const wxTimeSpan& diff);
- // add two timespans together
- wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); }
- inline wxTimeSpan operator+(const wxTimeSpan& ts) const
- {
- return wxTimeSpan(GetValue() + ts.GetValue());
- }
-
- // return the difference of two timespans
- inline wxTimeSpan Subtract(const wxTimeSpan& diff) const;
- // subtract another timespan
- inline wxTimeSpan& Subtract(const wxTimeSpan& diff);
- // subtract another timespan
- wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Subtract(diff); }
- inline wxTimeSpan operator-(const wxTimeSpan& ts)
- {
- return wxTimeSpan(GetValue() - ts.GetValue());
- }
-
- // multiply timespan by a scalar
- inline wxTimeSpan Multiply(int n) const;
- // multiply timespan by a scalar
- inline wxTimeSpan& Multiply(int n);
- // multiply timespan by a scalar
- wxTimeSpan& operator*=(int n) { return Multiply(n); }
- inline wxTimeSpan operator*(int n) const
- {
- return wxTimeSpan(*this).Multiply(n);
- }
-
- // return this timespan with opposite sign
- wxTimeSpan Negate() const { return wxTimeSpan(-GetValue()); }
- // negate the value of the timespan
- wxTimeSpan& Neg() { m_diff = -GetValue(); return *this; }
- // negate the value of the timespan
- wxTimeSpan& operator-() { return Neg(); }
-
- // return the absolute value of the timespan: does _not_ modify the
- // object
- inline wxTimeSpan Abs() const;
-
- // there is intentionally no division because we don't want to
- // introduce rounding errors in time calculations
-
- // comparaison (see also operator versions below)
- // ------------------------------------------------------------------------
-
- // is the timespan null?
- bool IsNull() const { return m_diff == 0l; }
- // returns true if the timespan is null
- bool operator!() const { return !IsNull(); }
-
- // is the timespan positive?
- bool IsPositive() const { return m_diff > 0l; }
-
- // is the timespan negative?
- bool IsNegative() const { return m_diff < 0l; }
-
- // are two timespans equal?
- inline bool IsEqualTo(const wxTimeSpan& ts) const;
- // compare two timestamps: works with the absolute values, i.e. -2
- // hours is longer than 1 hour. Also, it will return false if the
- // timespans are equal in absolute value.
- inline bool IsLongerThan(const wxTimeSpan& ts) const;
- // compare two timestamps: works with the absolute values, i.e. 1
- // hour is shorter than -2 hours. Also, it will return false if the
- // timespans are equal in absolute value.
- bool IsShorterThan(const wxTimeSpan& t) const { return !IsLongerThan(t); }
-
- inline bool operator<(const wxTimeSpan &ts) const
- {
- return GetValue() < ts.GetValue();
- }
-
- inline bool operator<=(const wxTimeSpan &ts) const
- {
- return GetValue() <= ts.GetValue();
- }
-
- inline bool operator>(const wxTimeSpan &ts) const
- {
- return GetValue() > ts.GetValue();
- }
-
- inline bool operator>=(const wxTimeSpan &ts) const
- {
- return GetValue() >= ts.GetValue();
- }
-
- inline bool operator==(const wxTimeSpan &ts) const
- {
- return GetValue() == ts.GetValue();
- }
-
- inline bool operator!=(const wxTimeSpan &ts) const
- {
- return GetValue() != ts.GetValue();
- }
-
- // breaking into days, hours, minutes and seconds
- // ------------------------------------------------------------------------
-
- // get the max number of weeks in this timespan
- inline int GetWeeks() const;
- // get the max number of days in this timespan
- inline int GetDays() const;
- // get the max number of hours in this timespan
- inline int GetHours() const;
- // get the max number of minutes in this timespan
- inline int GetMinutes() const;
- // get the max number of seconds in this timespan
- inline wxLongLong GetSeconds() const;
- // get the number of milliseconds in this timespan
- wxLongLong GetMilliseconds() const { return m_diff; }
-
- // conversion to text
- // ------------------------------------------------------------------------
-
- // this function accepts strftime()-like format string (default
- // argument corresponds to the preferred date and time representation
- // for the current locale) and returns the string containing the
- // resulting text representation. Notice that only some of format
- // specifiers valid for wxDateTime are valid for wxTimeSpan: hours,
- // minutes and seconds make sense, but not "PM/AM" string for example.
- wxString Format(const wxChar *format = wxDefaultTimeSpanFormat) const;
-
- // implementation
- // ------------------------------------------------------------------------
-
- // construct from internal representation
- wxTimeSpan(const wxLongLong& diff) { m_diff = diff; }
-
- // get the internal representation
- wxLongLong GetValue() const { return m_diff; }
-
-private:
- // the (signed) time span in milliseconds
- wxLongLong m_diff;
-};
-
-// ----------------------------------------------------------------------------
-// This class is a "logical time span" and is useful for implementing program
-// logic for such things as "add one month to the date" which, in general,
-// doesn't mean to add 60*60*24*31 seconds to it, but to take the same date
-// the next month (to understand that this is indeed different consider adding
-// one month to Feb, 15 - we want to get Mar, 15, of course).
-//
-// When adding a month to the date, all lesser components (days, hours, ...)
-// won't be changed unless the resulting date would be invalid: for example,
-// Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31.
-//
-// Because of this feature, adding and subtracting back again the same
-// wxDateSpan will *not*, in general give back the original date: Feb 28 - 1
-// month will be Jan 28, not Jan 31!
-//
-// wxDateSpan can be either positive or negative. They may be
-// multiplied by scalars which multiply all deltas by the scalar: i.e. 2*(1
-// month and 1 day) is 2 months and 2 days. They can be added together and
-// with wxDateTime or wxTimeSpan, but the type of result is different for each
-// case.
-//
-// Beware about weeks: if you specify both weeks and days, the total number of
-// days added will be 7*weeks + days! See also GetTotalDays() function.
-//
-// Equality operators are defined for wxDateSpans. Two datespans are equal if
-// they both give the same target date when added to *every* source date.
-// Thus wxDateSpan::Months(1) is not equal to wxDateSpan::Days(30), because
-// they not give the same date when added to 1 Feb. But wxDateSpan::Days(14) is
-// equal to wxDateSpan::Weeks(2)
-//
-// Finally, notice that for adding hours, minutes &c you don't need this
-// class: wxTimeSpan will do the job because there are no subtleties
-// associated with those.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxDateSpan
-{
-public:
- // constructors
- // ------------------------------------------------------------------------
-
- // this many years/months/weeks/days
- wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0)
- {
- m_years = years;
- m_months = months;
- m_weeks = weeks;
- m_days = days;
- }
-
- // get an object for the given number of days
- static wxDateSpan Days(int days) { return wxDateSpan(0, 0, 0, days); }
- static wxDateSpan Day() { return Days(1); }
-
- // get an object for the given number of weeks
- static wxDateSpan Weeks(int weeks) { return wxDateSpan(0, 0, weeks, 0); }
- static wxDateSpan Week() { return Weeks(1); }
-
- // get an object for the given number of months
- static wxDateSpan Months(int mon) { return wxDateSpan(0, mon, 0, 0); }
- static wxDateSpan Month() { return Months(1); }
-
- // get an object for the given number of years
- static wxDateSpan Years(int years) { return wxDateSpan(years, 0, 0, 0); }
- static wxDateSpan Year() { return Years(1); }
-
- // default copy ctor is ok
-
- // no dtor
-
- // accessors (all SetXXX() return the (modified) wxDateSpan object)
- // ------------------------------------------------------------------------
-
- // set number of years
- wxDateSpan& SetYears(int n) { m_years = n; return *this; }
- // set number of months
- wxDateSpan& SetMonths(int n) { m_months = n; return *this; }
- // set number of weeks
- wxDateSpan& SetWeeks(int n) { m_weeks = n; return *this; }
- // set number of days
- wxDateSpan& SetDays(int n) { m_days = n; return *this; }
-
- // get number of years
- int GetYears() const { return m_years; }
- // get number of months
- int GetMonths() const { return m_months; }
- // get number of weeks
- int GetWeeks() const { return m_weeks; }
- // get number of days
- int GetDays() const { return m_days; }
- // returns 7*GetWeeks() + GetDays()
- int GetTotalDays() const { return 7*m_weeks + m_days; }
-
- // arithmetics with date spans (see also below for more operators)
- // ------------------------------------------------------------------------
-
- // return sum of two date spans
- inline wxDateSpan Add(const wxDateSpan& other) const;
- // add another wxDateSpan to us
- inline wxDateSpan& Add(const wxDateSpan& other);
- // add another wxDateSpan to us
- inline wxDateSpan& operator+=(const wxDateSpan& other);
- inline wxDateSpan operator+(const wxDateSpan& ds) const
- {
- return wxDateSpan(GetYears() + ds.GetYears(),
- GetMonths() + ds.GetMonths(),
- GetWeeks() + ds.GetWeeks(),
- GetDays() + ds.GetDays());
- }
-
- // return difference of two date spans
- inline wxDateSpan Subtract(const wxDateSpan& other) const;
- // subtract another wxDateSpan from us
- inline wxDateSpan& Subtract(const wxDateSpan& other);
- // subtract another wxDateSpan from us
- inline wxDateSpan& operator-=(const wxDateSpan& other);
- inline wxDateSpan operator-(const wxDateSpan& ds) const
- {
- return wxDateSpan(GetYears() - ds.GetYears(),
- GetMonths() - ds.GetMonths(),
- GetWeeks() - ds.GetWeeks(),
- GetDays() - ds.GetDays());
- }
-
- // return a copy of this time span with changed sign
- inline wxDateSpan Negate() const;
- // inverse the sign of this timespan
- inline wxDateSpan& Neg();
- // inverse the sign of this timespan
- wxDateSpan& operator-() { return Neg(); }
-
- // return the date span proportional to this one with given factor
- inline wxDateSpan Multiply(int factor) const;
- // multiply all components by a (signed) number
- inline wxDateSpan& Multiply(int factor);
- // multiply all components by a (signed) number
- inline wxDateSpan& operator*=(int factor) { return Multiply(factor); }
- inline wxDateSpan operator*(int n) const
- {
- return wxDateSpan(*this).Multiply(n);
- }
-
- // ds1 == d2 if and only if for every wxDateTime t t + ds1 == t + ds2
- inline bool operator==(const wxDateSpan& ds) const
- {
- return GetYears() == ds.GetYears() &&
- GetMonths() == ds.GetMonths() &&
- GetTotalDays() == ds.GetTotalDays();
- }
-
- inline bool operator!=(const wxDateSpan& ds) const
- {
- return !(*this == ds);
- }
-
-private:
- int m_years,
- m_months,
- m_weeks,
- m_days;
-};
-
-// ----------------------------------------------------------------------------
-// wxDateTimeArray: array of dates.
-// ----------------------------------------------------------------------------
-
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDateTime, wxDateTimeArray, WXDLLIMPEXP_BASE);
-
-// ----------------------------------------------------------------------------
-// wxDateTimeHolidayAuthority: an object of this class will decide whether a
-// given date is a holiday and is used by all functions working with "work
-// days".
-//
-// NB: the base class is an ABC, derived classes must implement the pure
-// virtual methods to work with the holidays they correspond to.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_BASE wxDateTimeHolidayAuthority;
-WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxDateTimeHolidayAuthority *,
- wxHolidayAuthoritiesArray,
- class WXDLLIMPEXP_BASE);
-
-class wxDateTimeHolidaysModule;
-class WXDLLIMPEXP_BASE wxDateTimeHolidayAuthority
-{
-friend class wxDateTimeHolidaysModule;
-public:
- // returns true if the given date is a holiday
- static bool IsHoliday(const wxDateTime& dt);
-
- // fills the provided array with all holidays in the given range, returns
- // the number of them
- static size_t GetHolidaysInRange(const wxDateTime& dtStart,
- const wxDateTime& dtEnd,
- wxDateTimeArray& holidays);
-
- // clear the list of holiday authorities
- static void ClearAllAuthorities();
-
- // add a new holiday authority (the pointer will be deleted by
- // wxDateTimeHolidayAuthority)
- static void AddAuthority(wxDateTimeHolidayAuthority *auth);
-
- // the base class must have a virtual dtor
- virtual ~wxDateTimeHolidayAuthority();
-
-protected:
- // this function is called to determine whether a given day is a holiday
- virtual bool DoIsHoliday(const wxDateTime& dt) const = 0;
-
- // this function should fill the array with all holidays between the two
- // given dates - it is implemented in the base class, but in a very
- // inefficient way (it just iterates over all days and uses IsHoliday() for
- // each of them), so it must be overridden in the derived class where the
- // base class version may be explicitly used if needed
- //
- // returns the number of holidays in the given range and fills holidays
- // array
- virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart,
- const wxDateTime& dtEnd,
- wxDateTimeArray& holidays) const = 0;
-
-private:
- // all holiday authorities
- static wxHolidayAuthoritiesArray ms_authorities;
-};
-
-// the holidays for this class are all Saturdays and Sundays
-class WXDLLIMPEXP_BASE wxDateTimeWorkDays : public wxDateTimeHolidayAuthority
-{
-protected:
- virtual bool DoIsHoliday(const wxDateTime& dt) const;
- virtual size_t DoGetHolidaysInRange(const wxDateTime& dtStart,
- const wxDateTime& dtEnd,
- wxDateTimeArray& holidays) const;
-};
-
-// ============================================================================
-// inline functions implementation
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// private macros
-// ----------------------------------------------------------------------------
-
-#define MILLISECONDS_PER_DAY 86400000l
-
-// some broken compilers (HP-UX CC) refuse to compile the "normal" version, but
-// using a temp variable always might prevent other compilers from optimising
-// it away - hence use of this ugly macro
-#ifndef __HPUX__
- #define MODIFY_AND_RETURN(op) return wxDateTime(*this).op
-#else
- #define MODIFY_AND_RETURN(op) wxDateTime dt(*this); dt.op; return dt
-#endif
-
-// ----------------------------------------------------------------------------
-// wxDateTime construction
-// ----------------------------------------------------------------------------
-
-inline bool wxDateTime::IsInStdRange() const
-{
- return m_time >= 0l && (m_time / TIME_T_FACTOR) < LONG_MAX;
-}
-
-/* static */
-inline wxDateTime wxDateTime::Now()
-{
- struct tm tmstruct;
- return wxDateTime(*GetTmNow(&tmstruct));
-}
-
-/* static */
-inline wxDateTime wxDateTime::Today()
-{
- wxDateTime dt(Now());
- dt.ResetTime();
-
- return dt;
-}
-
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
-inline wxDateTime& wxDateTime::Set(time_t timet)
-{
- // assign first to avoid long multiplication overflow!
- m_time = timet - WX_TIME_BASE_OFFSET ;
- m_time *= TIME_T_FACTOR;
-
- return *this;
-}
-#endif
-
-inline wxDateTime& wxDateTime::SetToCurrent()
-{
- *this = Now();
- return *this;
-}
-
-#if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400))
-inline wxDateTime::wxDateTime(time_t timet)
-{
- Set(timet);
-}
-#endif
-
-inline wxDateTime::wxDateTime(const struct tm& tm)
-{
- Set(tm);
-}
-
-inline wxDateTime::wxDateTime(const Tm& tm)
-{
- Set(tm);
-}
-
-inline wxDateTime::wxDateTime(double jdn)
-{
- Set(jdn);
-}
-
-inline wxDateTime& wxDateTime::Set(const Tm& tm)
-{
- wxASSERT_MSG( tm.IsValid(), _T("invalid broken down date/time") );
-
- return Set(tm.mday, (Month)tm.mon, tm.year,
- tm.hour, tm.min, tm.sec, tm.msec);
-}
-
-inline wxDateTime::wxDateTime(wxDateTime_t hour,
- wxDateTime_t minute,
- wxDateTime_t second,
- wxDateTime_t millisec)
-{
- Set(hour, minute, second, millisec);
-}
-
-inline wxDateTime::wxDateTime(wxDateTime_t day,
- Month month,
- int year,
- wxDateTime_t hour,
- wxDateTime_t minute,
- wxDateTime_t second,
- wxDateTime_t millisec)
-{
- Set(day, month, year, hour, minute, second, millisec);
-}
-
-// ----------------------------------------------------------------------------
-// wxDateTime accessors
-// ----------------------------------------------------------------------------
-
-inline wxLongLong wxDateTime::GetValue() const
-{
- wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
-
- return m_time;
-}
-
-inline time_t wxDateTime::GetTicks() const
-{
- wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
- if ( !IsInStdRange() )
- {
- return (time_t)-1;
- }
-
- return (time_t)((m_time / (long)TIME_T_FACTOR).ToLong()) + WX_TIME_BASE_OFFSET;
-}
-
-inline bool wxDateTime::SetToLastWeekDay(WeekDay weekday,
- Month month,
- int year)
-{
- return SetToWeekDay(weekday, -1, month, year);
-}
-
-inline wxDateTime
-wxDateTime::GetWeekDayInSameWeek(WeekDay weekday,
- WeekFlags WXUNUSED(flags)) const
-{
- MODIFY_AND_RETURN( SetToWeekDayInSameWeek(weekday) );
-}
-
-inline wxDateTime wxDateTime::GetNextWeekDay(WeekDay weekday) const
-{
- MODIFY_AND_RETURN( SetToNextWeekDay(weekday) );
-}
-
-inline wxDateTime wxDateTime::GetPrevWeekDay(WeekDay weekday) const
-{
- MODIFY_AND_RETURN( SetToPrevWeekDay(weekday) );
-}
-
-inline wxDateTime wxDateTime::GetWeekDay(WeekDay weekday,
- int n,
- Month month,
- int year) const
-{
- wxDateTime dt(*this);
-
- return dt.SetToWeekDay(weekday, n, month, year) ? dt : wxInvalidDateTime;
-}
-
-inline wxDateTime wxDateTime::GetLastWeekDay(WeekDay weekday,
- Month month,
- int year)
-{
- wxDateTime dt(*this);
-
- return dt.SetToLastWeekDay(weekday, month, year) ? dt : wxInvalidDateTime;
-}
-
-inline wxDateTime wxDateTime::GetLastMonthDay(Month month, int year) const
-{
- MODIFY_AND_RETURN( SetToLastMonthDay(month, year) );
-}
-
-inline wxDateTime wxDateTime::GetYearDay(wxDateTime_t yday) const
-{
- MODIFY_AND_RETURN( SetToYearDay(yday) );
-}
-
-// ----------------------------------------------------------------------------
-// wxDateTime comparison
-// ----------------------------------------------------------------------------
-
-inline bool wxDateTime::IsEqualTo(const wxDateTime& datetime) const
-{
- wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
-
- return m_time == datetime.m_time;
-}
-
-inline bool wxDateTime::IsEarlierThan(const wxDateTime& datetime) const
-{
- wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
-
- return m_time < datetime.m_time;
-}
-
-inline bool wxDateTime::IsLaterThan(const wxDateTime& datetime) const
-{
- wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
-
- return m_time > datetime.m_time;
-}
-
-inline bool wxDateTime::IsStrictlyBetween(const wxDateTime& t1,
- const wxDateTime& t2) const
-{
- // no need for assert, will be checked by the functions we call
- return IsLaterThan(t1) && IsEarlierThan(t2);
-}
-
-inline bool wxDateTime::IsBetween(const wxDateTime& t1,
- const wxDateTime& t2) const
-{
- // no need for assert, will be checked by the functions we call
- return IsEqualTo(t1) || IsEqualTo(t2) || IsStrictlyBetween(t1, t2);
-}
-
-inline bool wxDateTime::IsSameDate(const wxDateTime& dt) const
-{
- Tm tm1 = GetTm(),
- tm2 = dt.GetTm();
-
- return tm1.year == tm2.year &&
- tm1.mon == tm2.mon &&
- tm1.mday == tm2.mday;
-}
-
-inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const
-{
- // notice that we can't do something like this:
- //
- // m_time % MILLISECONDS_PER_DAY == dt.m_time % MILLISECONDS_PER_DAY
- //
- // because we have also to deal with (possibly) different DST settings!
- Tm tm1 = GetTm(),
- tm2 = dt.GetTm();
-
- return tm1.hour == tm2.hour &&
- tm1.min == tm2.min &&
- tm1.sec == tm2.sec &&
- tm1.msec == tm2.msec;
-}
-
-inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt,
- const wxTimeSpan& ts) const
-{
- return IsBetween(dt.Subtract(ts), dt.Add(ts));
-}
-
-// ----------------------------------------------------------------------------
-// wxDateTime arithmetics
-// ----------------------------------------------------------------------------
-
-inline wxDateTime wxDateTime::Add(const wxTimeSpan& diff) const
-{
- wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
-
- return wxDateTime(m_time + diff.GetValue());
-}
-
-inline wxDateTime& wxDateTime::Add(const wxTimeSpan& diff)
-{
- wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
-
- m_time += diff.GetValue();
-
- return *this;
-}
-
-inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
-{
- return Add(diff);
-}
-
-inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const
-{
- wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
-
- return wxDateTime(m_time - diff.GetValue());
-}
-
-inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff)
-{
- wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
-
- m_time -= diff.GetValue();
-
- return *this;
-}
-
-inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
-{
- return Subtract(diff);
-}
-
-inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const
-{
- wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
-
- return wxTimeSpan(GetValue() - datetime.GetValue());
-}
-
-inline wxTimeSpan wxDateTime::operator-(const wxDateTime& dt2) const
-{
- return this->Subtract(dt2);
-}
-
-inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const
-{
- return wxDateTime(*this).Add(diff);
-}
-
-inline wxDateTime& wxDateTime::Subtract(const wxDateSpan& diff)
-{
- return Add(diff.Negate());
-}
-
-inline wxDateTime wxDateTime::Subtract(const wxDateSpan& diff) const
-{
- return wxDateTime(*this).Subtract(diff);
-}
-
-inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff)
-{
- return Subtract(diff);
-}
-
-inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
-{
- return Add(diff);
-}
-
-// ----------------------------------------------------------------------------
-// wxDateTime and timezones
-// ----------------------------------------------------------------------------
-
-inline wxDateTime
-wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, bool noDST) const
-{
- MODIFY_AND_RETURN( MakeTimezone(tz, noDST) );
-}
-
-inline wxDateTime
-wxDateTime::FromTimezone(const wxDateTime::TimeZone& tz, bool noDST) const
-{
- MODIFY_AND_RETURN( MakeFromTimezone(tz, noDST) );
-}
-
-// ----------------------------------------------------------------------------
-// wxTimeSpan construction
-// ----------------------------------------------------------------------------
-
-inline wxTimeSpan::wxTimeSpan(long hours,
- long minutes,
- wxLongLong seconds,
- wxLongLong milliseconds)
-{
- // assign first to avoid precision loss
- m_diff = hours;
- m_diff *= 60l;
- m_diff += minutes;
- m_diff *= 60l;
- m_diff += seconds;
- m_diff *= 1000l;
- m_diff += milliseconds;
-}
-
-// ----------------------------------------------------------------------------
-// wxTimeSpan accessors
-// ----------------------------------------------------------------------------
-
-inline wxLongLong wxTimeSpan::GetSeconds() const
-{
- return m_diff / 1000l;
-}
-
-inline int wxTimeSpan::GetMinutes() const
-{
- // explicit cast to int suppresses a warning with CodeWarrior and possibly
- // others (changing the return type to long from int is impossible in 2.8)
- return (int)((GetSeconds() / 60l).GetLo());
-}
-
-inline int wxTimeSpan::GetHours() const
-{
- return GetMinutes() / 60;
-}
-
-inline int wxTimeSpan::GetDays() const
-{
- return GetHours() / 24;
-}
-
-inline int wxTimeSpan::GetWeeks() const
-{
- return GetDays() / 7;
-}
-
-// ----------------------------------------------------------------------------
-// wxTimeSpan arithmetics
-// ----------------------------------------------------------------------------
-
-inline wxTimeSpan wxTimeSpan::Add(const wxTimeSpan& diff) const
-{
- return wxTimeSpan(m_diff + diff.GetValue());
-}
-
-inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff)
-{
- m_diff += diff.GetValue();
-
- return *this;
-}
-
-inline wxTimeSpan wxTimeSpan::Subtract(const wxTimeSpan& diff) const
-{
- return wxTimeSpan(m_diff - diff.GetValue());
-}
-
-inline wxTimeSpan& wxTimeSpan::Subtract(const wxTimeSpan& diff)
-{
- m_diff -= diff.GetValue();
-
- return *this;
-}
-
-inline wxTimeSpan& wxTimeSpan::Multiply(int n)
-{
- m_diff *= (long)n;
-
- return *this;
-}
-
-inline wxTimeSpan wxTimeSpan::Multiply(int n) const
-{
- return wxTimeSpan(m_diff * (long)n);
-}
-
-inline wxTimeSpan wxTimeSpan::Abs() const
-{
- return wxTimeSpan(GetValue().Abs());
-}
-
-inline bool wxTimeSpan::IsEqualTo(const wxTimeSpan& ts) const
-{
- return GetValue() == ts.GetValue();
-}
-
-inline bool wxTimeSpan::IsLongerThan(const wxTimeSpan& ts) const
-{
- return GetValue().Abs() > ts.GetValue().Abs();
-}
-
-// ----------------------------------------------------------------------------
-// wxDateSpan
-// ----------------------------------------------------------------------------
-
-inline wxDateSpan& wxDateSpan::operator+=(const wxDateSpan& other)
-{
- m_years += other.m_years;
- m_months += other.m_months;
- m_weeks += other.m_weeks;
- m_days += other.m_days;
-
- return *this;
-}
-
-inline wxDateSpan& wxDateSpan::Add(const wxDateSpan& other)
-{
- return *this += other;
-}
-
-inline wxDateSpan wxDateSpan::Add(const wxDateSpan& other) const
-{
- wxDateSpan ds(*this);
- ds.Add(other);
- return ds;
-}
-
-inline wxDateSpan& wxDateSpan::Multiply(int factor)
-{
- m_years *= factor;
- m_months *= factor;
- m_weeks *= factor;
- m_days *= factor;
-
- return *this;
-}
-
-inline wxDateSpan wxDateSpan::Multiply(int factor) const
-{
- wxDateSpan ds(*this);
- ds.Multiply(factor);
- return ds;
-}
-
-inline wxDateSpan wxDateSpan::Negate() const
-{
- return wxDateSpan(-m_years, -m_months, -m_weeks, -m_days);
-}
-
-inline wxDateSpan& wxDateSpan::Neg()
-{
- m_years = -m_years;
- m_months = -m_months;
- m_weeks = -m_weeks;
- m_days = -m_days;
-
- return *this;
-}
-
-inline wxDateSpan& wxDateSpan::operator-=(const wxDateSpan& other)
-{
- return *this += other.Negate();
-}
-
-inline wxDateSpan& wxDateSpan::Subtract(const wxDateSpan& other)
-{
- return *this -= other;
-}
-
-inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const
-{
- wxDateSpan ds(*this);
- ds.Subtract(other);
- return ds;
-}
-
-#undef MILLISECONDS_PER_DAY
-
-#undef MODIFY_AND_RETURN
-
-// ============================================================================
-// binary operators
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// wxTimeSpan operators
-// ----------------------------------------------------------------------------
-
-wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts);
-
-// ----------------------------------------------------------------------------
-// wxDateSpan
-// ----------------------------------------------------------------------------
-
-wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds);
-
-// ============================================================================
-// other helper functions
-// ============================================================================
-
-// ----------------------------------------------------------------------------
-// iteration helpers: can be used to write a for loop over enum variable like
-// this:
-// for ( m = wxDateTime::Jan; m < wxDateTime::Inv_Month; wxNextMonth(m) )
-// ----------------------------------------------------------------------------
-
-WXDLLIMPEXP_BASE void wxNextMonth(wxDateTime::Month& m);
-WXDLLIMPEXP_BASE void wxPrevMonth(wxDateTime::Month& m);
-WXDLLIMPEXP_BASE void wxNextWDay(wxDateTime::WeekDay& wd);
-WXDLLIMPEXP_BASE void wxPrevWDay(wxDateTime::WeekDay& wd);
-
-#endif // wxUSE_DATETIME
-
-#endif // _WX_DATETIME_H
diff --git a/desmume/src/windows/wx/include/wx/datstrm.h b/desmume/src/windows/wx/include/wx/datstrm.h
deleted file mode 100644
index 709e1007b..000000000
--- a/desmume/src/windows/wx/include/wx/datstrm.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: datstrm.h
-// Purpose: Data stream classes
-// Author: Guilhem Lavaux
-// Modified by: Mickael Gilabert
-// Created: 28/06/1998
-// RCS-ID: $Id: datstrm.h 38576 2006-04-05 16:10:08Z VZ $
-// Copyright: (c) Guilhem Lavaux
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DATSTREAM_H_
-#define _WX_DATSTREAM_H_
-
-#include "wx/stream.h"
-#include "wx/longlong.h"
-#include "wx/convauto.h"
-
-#if wxUSE_STREAMS
-
-class WXDLLIMPEXP_BASE wxDataInputStream
-{
-public:
-#if wxUSE_UNICODE
- wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto());
-#else
- wxDataInputStream(wxInputStream& s);
-#endif
- ~wxDataInputStream();
-
- bool IsOk() { return m_input->IsOk(); }
-
-#if wxHAS_INT64
- wxUint64 Read64();
-#endif
-#if wxUSE_LONGLONG
- wxLongLong ReadLL();
-#endif
- wxUint32 Read32();
- wxUint16 Read16();
- wxUint8 Read8();
- double ReadDouble();
- wxString ReadString();
-
-#if wxHAS_INT64
- void Read64(wxUint64 *buffer, size_t size);
- void Read64(wxInt64 *buffer, size_t size);
-#endif
-#if defined(wxLongLong_t) && wxUSE_LONGLONG
- void Read64(wxULongLong *buffer, size_t size);
- void Read64(wxLongLong *buffer, size_t size);
-#endif
-#if wxUSE_LONGLONG
- void ReadLL(wxULongLong *buffer, size_t size);
- void ReadLL(wxLongLong *buffer, size_t size);
-#endif
- void Read32(wxUint32 *buffer, size_t size);
- void Read16(wxUint16 *buffer, size_t size);
- void Read8(wxUint8 *buffer, size_t size);
- void ReadDouble(double *buffer, size_t size);
-
- wxDataInputStream& operator>>(wxString& s);
- wxDataInputStream& operator>>(wxInt8& c);
- wxDataInputStream& operator>>(wxInt16& i);
- wxDataInputStream& operator>>(wxInt32& i);
- wxDataInputStream& operator>>(wxUint8& c);
- wxDataInputStream& operator>>(wxUint16& i);
- wxDataInputStream& operator>>(wxUint32& i);
-#if wxHAS_INT64
- wxDataInputStream& operator>>(wxUint64& i);
- wxDataInputStream& operator>>(wxInt64& i);
-#endif
-#if defined(wxLongLong_t) && wxUSE_LONGLONG
- wxDataInputStream& operator>>(wxULongLong& i);
- wxDataInputStream& operator>>(wxLongLong& i);
-#endif
- wxDataInputStream& operator>>(double& i);
- wxDataInputStream& operator>>(float& f);
-
- void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
-
-protected:
- wxInputStream *m_input;
- bool m_be_order;
-#if wxUSE_UNICODE
- wxMBConv *m_conv;
-#endif
-
- DECLARE_NO_COPY_CLASS(wxDataInputStream)
-};
-
-class WXDLLIMPEXP_BASE wxDataOutputStream
-{
-public:
-#if wxUSE_UNICODE
- wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto());
-#else
- wxDataOutputStream(wxOutputStream& s);
-#endif
- ~wxDataOutputStream();
-
- bool IsOk() { return m_output->IsOk(); }
-
-#if wxHAS_INT64
- void Write64(wxUint64 i);
- void Write64(wxInt64 i);
-#endif
-#if wxUSE_LONGLONG
- void WriteLL(const wxLongLong &ll);
- void WriteLL(const wxULongLong &ll);
-#endif
- void Write32(wxUint32 i);
- void Write16(wxUint16 i);
- void Write8(wxUint8 i);
- void WriteDouble(double d);
- void WriteString(const wxString& string);
-
-#if wxHAS_INT64
- void Write64(const wxUint64 *buffer, size_t size);
- void Write64(const wxInt64 *buffer, size_t size);
-#endif
-#if defined(wxLongLong_t) && wxUSE_LONGLONG
- void Write64(const wxULongLong *buffer, size_t size);
- void Write64(const wxLongLong *buffer, size_t size);
-#endif
-#if wxUSE_LONGLONG
- void WriteLL(const wxULongLong *buffer, size_t size);
- void WriteLL(const wxLongLong *buffer, size_t size);
-#endif
- void Write32(const wxUint32 *buffer, size_t size);
- void Write16(const wxUint16 *buffer, size_t size);
- void Write8(const wxUint8 *buffer, size_t size);
- void WriteDouble(const double *buffer, size_t size);
-
- wxDataOutputStream& operator<<(const wxChar *string);
- wxDataOutputStream& operator<<(const wxString& string);
- wxDataOutputStream& operator<<(wxInt8 c);
- wxDataOutputStream& operator<<(wxInt16 i);
- wxDataOutputStream& operator<<(wxInt32 i);
- wxDataOutputStream& operator<<(wxUint8 c);
- wxDataOutputStream& operator<<(wxUint16 i);
- wxDataOutputStream& operator<<(wxUint32 i);
-#if wxHAS_INT64
- wxDataOutputStream& operator<<(wxUint64 i);
- wxDataOutputStream& operator<<(wxInt64 i);
-#endif
-#if defined(wxLongLong_t) && wxUSE_LONGLONG
- wxDataOutputStream& operator<<(const wxULongLong &i);
- wxDataOutputStream& operator<<(const wxLongLong &i);
-#endif
- wxDataOutputStream& operator<<(double f);
- wxDataOutputStream& operator<<(float f);
-
- void BigEndianOrdered(bool be_order) { m_be_order = be_order; }
-
-protected:
- wxOutputStream *m_output;
- bool m_be_order;
-#if wxUSE_UNICODE
- wxMBConv *m_conv;
-#endif
-
- DECLARE_NO_COPY_CLASS(wxDataOutputStream)
-};
-
-#endif
- // wxUSE_STREAMS
-
-#endif
- // _WX_DATSTREAM_H_
diff --git a/desmume/src/windows/wx/include/wx/db.h b/desmume/src/windows/wx/include/wx/db.h
deleted file mode 100644
index 013bc2276..000000000
--- a/desmume/src/windows/wx/include/wx/db.h
+++ /dev/null
@@ -1,853 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/db.h
-// Purpose: Header file wxDb class. The wxDb class represents a connection
-// to an ODBC data source. The wxDb class allows operations on the data
-// source such as opening and closing the data source.
-// Author: Doug Card
-// Modified by: George Tasker
-// Bart Jourquin
-// Mark Johnson, wxWindows@mj10777.de
-// Mods: Dec, 1998:
-// -Added support for SQL statement logging and database cataloging
-// April, 1999
-// -Added QUERY_ONLY mode support to reduce default number of cursors
-// -Added additional SQL logging code
-// -Added DEBUG-ONLY tracking of Ctable objects to detect orphaned DB connections
-// -Set ODBC option to only read committed writes to the DB so all
-// databases operate the same in that respect
-//
-// Created: 9.96
-// RCS-ID: $Id: db.h 56697 2008-11-07 22:45:47Z VZ $
-// Copyright: (c) 1996 Remstar International, Inc.
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DB_H_
-#define _WX_DB_H_
-
-
-// BJO 20000503: introduce new GetColumns members which are more database independent and
-// return columns in the order they were created
-#define OLD_GETCOLUMNS 1
-#define EXPERIMENTAL_WXDB_FUNCTIONS 1
-
-#include "wx/defs.h"
-#include "wx/string.h"
-
-#if defined(__VISUALC__)
- // we need to include standard Windows headers but we can't include
- // directly when using MFC because it includes it itself in a
- // different manner
- #if wxUSE_MFC
- #include
- #else // !wxUSE_MFC
- #include "wx/msw/wrapwin.h"
- #endif // wxUSE_MFC/!wxUSE_MFC
-
- // If you use the wxDbCreateDataSource() function with MSW/VC6,
- // you cannot use the iODBC headers, you must use the VC headers,
- // plus the odbcinst.h header - gt Nov 2 2000
- //
- // Must add "odbccp32.lib" in \wx2\wxWidgets\src\makevc.env to the WINLIBS= line
- //
- #include "sql.h"
- #include "sqlext.h"
- //#if wxUSE_UNICODE
- // #include
- //#endif
- #include "odbcinst.h"
-#else
- #if defined(__WINDOWS__) && ( defined(HAVE_W32API_H) || defined(__BORLANDC__) || defined (__DMC__))
- #include "wx/msw/wrapwin.h"
- #endif
- extern "C" {
- #if defined(wxUSE_BUILTIN_IODBC) && wxUSE_BUILTIN_IODBC
- // Use the ones from the library
- #include "wx/isql.h"
- #include "wx/isqlext.h"
- // Not available in v2.x of iODBC
- #ifndef __WXMSW__
- #if wxUSE_UNICODE
- typedef wxChar SQLTCHAR;
- #else
- typedef UCHAR SQLTCHAR;
- #endif
- #endif
- #else // !wxUSE_BUILTIN_IODBC
- // SQL headers define BOOL if it's not defined yet but BOOL is also
- // defined in many other places on other systems (Motif, at least on
- // OpenVMS; Cocoa and X11) so prevent the problem by defining it before
- // including these headers
- #ifndef BOOL
- #define BOOL int
- #include
- #include
- #undef BOOL
- #else
- #include
- #include
- #endif
- #endif // wxUSE_BUILTIN_IODBC/!wxUSE_BUILTIN_IODBC
- }
-#endif
-
-#if wxUSE_UNICODE
-#define SQL_C_WXCHAR SQL_C_WCHAR
-#else
-#define SQL_C_WXCHAR SQL_C_CHAR
-#endif
-
-#ifdef __DIGITALMARS__
-#if wxUSE_UNICODE
-typedef wxChar SQLTCHAR;
-#else
-typedef UCHAR SQLTCHAR;
-#endif
-#endif
-
-typedef float SFLOAT;
-typedef double SDOUBLE;
-typedef unsigned int UINT;
-#define ULONG UDWORD
-
-#ifndef wxODBC_FWD_ONLY_CURSORS
-#define wxODBC_FWD_ONLY_CURSORS 1
-#endif
-
-enum enumDummy {enumDum1};
-
-#ifndef SQL_C_BOOLEAN
- #define SQL_C_BOOLEAN(datatype) (sizeof(datatype) == 1 ? SQL_C_UTINYINT : (sizeof(datatype) == 2 ? SQL_C_USHORT : SQL_C_ULONG))
-#endif
-
-#ifndef SQL_C_ENUM
- #define SQL_C_ENUM (sizeof(enumDummy) == 2 ? SQL_C_USHORT : SQL_C_ULONG)
-#endif
-
-// NOTE: If SQL_C_BLOB is defined, and it is not SQL_C_BINARY, iODBC 2.x
-// may not function correctly. Likely best to use SQL_C_BINARY direct
-#ifndef SQL_C_BLOB
- #ifdef SQL_C_BINARY
- #define SQL_C_BLOB SQL_C_BINARY
- #endif
-#endif
-
-#ifndef _WIN64
-#ifndef SQLLEN
-#define SQLLEN SQLINTEGER
-#endif
-#ifndef SQLULEN
-#define SQLULEN SQLUINTEGER
-#endif
-#endif
-
-const int wxDB_PATH_MAX = 254;
-
-extern WXDLLIMPEXP_DATA_ODBC(wxChar const *) SQL_LOG_FILENAME;
-extern WXDLLIMPEXP_DATA_ODBC(wxChar const *) SQL_CATALOG_FILENAME;
-
-// Database Globals
-const int DB_TYPE_NAME_LEN = 40;
-const int DB_MAX_STATEMENT_LEN = 4096;
-const int DB_MAX_WHERE_CLAUSE_LEN = 2048;
-const int DB_MAX_ERROR_MSG_LEN = 512;
-const int DB_MAX_ERROR_HISTORY = 5;
-const int DB_MAX_TABLE_NAME_LEN = 128;
-const int DB_MAX_COLUMN_NAME_LEN = 128;
-
-const int DB_DATA_TYPE_VARCHAR = 1;
-const int DB_DATA_TYPE_INTEGER = 2;
-const int DB_DATA_TYPE_FLOAT = 3;
-const int DB_DATA_TYPE_DATE = 4;
-const int DB_DATA_TYPE_BLOB = 5;
-const int DB_DATA_TYPE_MEMO = 6;
-
-const int DB_SELECT_KEYFIELDS = 1;
-const int DB_SELECT_WHERE = 2;
-const int DB_SELECT_MATCHING = 3;
-const int DB_SELECT_STATEMENT = 4;
-
-const int DB_UPD_KEYFIELDS = 1;
-const int DB_UPD_WHERE = 2;
-
-const int DB_DEL_KEYFIELDS = 1;
-const int DB_DEL_WHERE = 2;
-const int DB_DEL_MATCHING = 3;
-
-const int DB_WHERE_KEYFIELDS = 1;
-const int DB_WHERE_MATCHING = 2;
-
-const int DB_GRANT_SELECT = 1;
-const int DB_GRANT_INSERT = 2;
-const int DB_GRANT_UPDATE = 4;
-const int DB_GRANT_DELETE = 8;
-const int DB_GRANT_ALL = DB_GRANT_SELECT | DB_GRANT_INSERT | DB_GRANT_UPDATE | DB_GRANT_DELETE;
-
-// ODBC Error codes (derived from ODBC SqlState codes)
-enum wxODBC_ERRORS
-{
- DB_FAILURE = 0,
- DB_SUCCESS = 1,
- DB_ERR_NOT_IN_USE,
- DB_ERR_GENERAL_WARNING, // SqlState = '01000'
- DB_ERR_DISCONNECT_ERROR, // SqlState = '01002'
- DB_ERR_DATA_TRUNCATED, // SqlState = '01004'
- DB_ERR_PRIV_NOT_REVOKED, // SqlState = '01006'
- DB_ERR_INVALID_CONN_STR_ATTR, // SqlState = '01S00'
- DB_ERR_ERROR_IN_ROW, // SqlState = '01S01'
- DB_ERR_OPTION_VALUE_CHANGED, // SqlState = '01S02'
- DB_ERR_NO_ROWS_UPD_OR_DEL, // SqlState = '01S03'
- DB_ERR_MULTI_ROWS_UPD_OR_DEL, // SqlState = '01S04'
- DB_ERR_WRONG_NO_OF_PARAMS, // SqlState = '07001'
- DB_ERR_DATA_TYPE_ATTR_VIOL, // SqlState = '07006'
- DB_ERR_UNABLE_TO_CONNECT, // SqlState = '08001'
- DB_ERR_CONNECTION_IN_USE, // SqlState = '08002'
- DB_ERR_CONNECTION_NOT_OPEN, // SqlState = '08003'
- DB_ERR_REJECTED_CONNECTION, // SqlState = '08004'
- DB_ERR_CONN_FAIL_IN_TRANS, // SqlState = '08007'
- DB_ERR_COMM_LINK_FAILURE, // SqlState = '08S01'
- DB_ERR_INSERT_VALUE_LIST_MISMATCH, // SqlState = '21S01'
- DB_ERR_DERIVED_TABLE_MISMATCH, // SqlState = '21S02'
- DB_ERR_STRING_RIGHT_TRUNC, // SqlState = '22001'
- DB_ERR_NUMERIC_VALUE_OUT_OF_RNG, // SqlState = '22003'
- DB_ERR_ERROR_IN_ASSIGNMENT, // SqlState = '22005'
- DB_ERR_DATETIME_FLD_OVERFLOW, // SqlState = '22008'
- DB_ERR_DIVIDE_BY_ZERO, // SqlState = '22012'
- DB_ERR_STR_DATA_LENGTH_MISMATCH, // SqlState = '22026'
- DB_ERR_INTEGRITY_CONSTRAINT_VIOL, // SqlState = '23000'
- DB_ERR_INVALID_CURSOR_STATE, // SqlState = '24000'
- DB_ERR_INVALID_TRANS_STATE, // SqlState = '25000'
- DB_ERR_INVALID_AUTH_SPEC, // SqlState = '28000'
- DB_ERR_INVALID_CURSOR_NAME, // SqlState = '34000'
- DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL, // SqlState = '37000'
- DB_ERR_DUPLICATE_CURSOR_NAME, // SqlState = '3C000'
- DB_ERR_SERIALIZATION_FAILURE, // SqlState = '40001'
- DB_ERR_SYNTAX_ERROR_OR_ACCESS_VIOL2, // SqlState = '42000'
- DB_ERR_OPERATION_ABORTED, // SqlState = '70100'
- DB_ERR_UNSUPPORTED_FUNCTION, // SqlState = 'IM001'
- DB_ERR_NO_DATA_SOURCE, // SqlState = 'IM002'
- DB_ERR_DRIVER_LOAD_ERROR, // SqlState = 'IM003'
- DB_ERR_SQLALLOCENV_FAILED, // SqlState = 'IM004'
- DB_ERR_SQLALLOCCONNECT_FAILED, // SqlState = 'IM005'
- DB_ERR_SQLSETCONNECTOPTION_FAILED, // SqlState = 'IM006'
- DB_ERR_NO_DATA_SOURCE_DLG_PROHIB, // SqlState = 'IM007'
- DB_ERR_DIALOG_FAILED, // SqlState = 'IM008'
- DB_ERR_UNABLE_TO_LOAD_TRANSLATION_DLL, // SqlState = 'IM009'
- DB_ERR_DATA_SOURCE_NAME_TOO_LONG, // SqlState = 'IM010'
- DB_ERR_DRIVER_NAME_TOO_LONG, // SqlState = 'IM011'
- DB_ERR_DRIVER_KEYWORD_SYNTAX_ERROR, // SqlState = 'IM012'
- DB_ERR_TRACE_FILE_ERROR, // SqlState = 'IM013'
- DB_ERR_TABLE_OR_VIEW_ALREADY_EXISTS, // SqlState = 'S0001'
- DB_ERR_TABLE_NOT_FOUND, // SqlState = 'S0002'
- DB_ERR_INDEX_ALREADY_EXISTS, // SqlState = 'S0011'
- DB_ERR_INDEX_NOT_FOUND, // SqlState = 'S0012'
- DB_ERR_COLUMN_ALREADY_EXISTS, // SqlState = 'S0021'
- DB_ERR_COLUMN_NOT_FOUND, // SqlState = 'S0022'
- DB_ERR_NO_DEFAULT_FOR_COLUMN, // SqlState = 'S0023'
- DB_ERR_GENERAL_ERROR, // SqlState = 'S1000'
- DB_ERR_MEMORY_ALLOCATION_FAILURE, // SqlState = 'S1001'
- DB_ERR_INVALID_COLUMN_NUMBER, // SqlState = 'S1002'
- DB_ERR_PROGRAM_TYPE_OUT_OF_RANGE, // SqlState = 'S1003'
- DB_ERR_SQL_DATA_TYPE_OUT_OF_RANGE, // SqlState = 'S1004'
- DB_ERR_OPERATION_CANCELLED, // SqlState = 'S1008'
- DB_ERR_INVALID_ARGUMENT_VALUE, // SqlState = 'S1009'
- DB_ERR_FUNCTION_SEQUENCE_ERROR, // SqlState = 'S1010'
- DB_ERR_OPERATION_INVALID_AT_THIS_TIME, // SqlState = 'S1011'
- DB_ERR_INVALID_TRANS_OPERATION_CODE, // SqlState = 'S1012'
- DB_ERR_NO_CURSOR_NAME_AVAIL, // SqlState = 'S1015'
- DB_ERR_INVALID_STR_OR_BUF_LEN, // SqlState = 'S1090'
- DB_ERR_DESCRIPTOR_TYPE_OUT_OF_RANGE, // SqlState = 'S1091'
- DB_ERR_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1092'
- DB_ERR_INVALID_PARAM_NO, // SqlState = 'S1093'
- DB_ERR_INVALID_SCALE_VALUE, // SqlState = 'S1094'
- DB_ERR_FUNCTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1095'
- DB_ERR_INF_TYPE_OUT_OF_RANGE, // SqlState = 'S1096'
- DB_ERR_COLUMN_TYPE_OUT_OF_RANGE, // SqlState = 'S1097'
- DB_ERR_SCOPE_TYPE_OUT_OF_RANGE, // SqlState = 'S1098'
- DB_ERR_NULLABLE_TYPE_OUT_OF_RANGE, // SqlState = 'S1099'
- DB_ERR_UNIQUENESS_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1100'
- DB_ERR_ACCURACY_OPTION_TYPE_OUT_OF_RANGE, // SqlState = 'S1101'
- DB_ERR_DIRECTION_OPTION_OUT_OF_RANGE, // SqlState = 'S1103'
- DB_ERR_INVALID_PRECISION_VALUE, // SqlState = 'S1104'
- DB_ERR_INVALID_PARAM_TYPE, // SqlState = 'S1105'
- DB_ERR_FETCH_TYPE_OUT_OF_RANGE, // SqlState = 'S1106'
- DB_ERR_ROW_VALUE_OUT_OF_RANGE, // SqlState = 'S1107'
- DB_ERR_CONCURRENCY_OPTION_OUT_OF_RANGE, // SqlState = 'S1108'
- DB_ERR_INVALID_CURSOR_POSITION, // SqlState = 'S1109'
- DB_ERR_INVALID_DRIVER_COMPLETION, // SqlState = 'S1110'
- DB_ERR_INVALID_BOOKMARK_VALUE, // SqlState = 'S1111'
- DB_ERR_DRIVER_NOT_CAPABLE, // SqlState = 'S1C00'
- DB_ERR_TIMEOUT_EXPIRED // SqlState = 'S1T00'
-};
-
-#ifndef MAXNAME
- #define MAXNAME 31
-#endif
-
-#ifndef SQL_MAX_AUTHSTR_LEN
- // There does not seem to be a standard for this, so I am
- // defaulting to the value that MS uses
- #define SQL_MAX_AUTHSTR_LEN MAXNAME
-#endif
-
-#ifndef SQL_MAX_CONNECTSTR_LEN
- // There does not seem to be a standard for this, so I am
- // defaulting to the value that MS recommends
- #define SQL_MAX_CONNECTSTR_LEN 1024
-#endif
-
-
-class WXDLLIMPEXP_ODBC wxDbConnectInf
-{
- private:
- bool freeHenvOnDestroy;
- bool useConnectionStr;
-
- public:
- HENV Henv;
- wxChar Dsn[SQL_MAX_DSN_LENGTH+1]; // Data Source Name
- wxChar Uid[SQL_MAX_USER_NAME_LEN+1]; // User ID
- wxChar AuthStr[SQL_MAX_AUTHSTR_LEN+1]; // Authorization string (password)
- wxChar ConnectionStr[SQL_MAX_CONNECTSTR_LEN+1]; // Connection string (password)
-
- wxString Description; // Not sure what the max length is
- wxString FileType; // Not sure what the max length is
-
- // Optionals needed for some databases like dBase
- wxString DefaultDir; // Directory that db file resides in
-
- public:
-
- wxDbConnectInf();
- wxDbConnectInf(HENV henv, const wxString &dsn, const wxString &userID=wxEmptyString,
- const wxString &password=wxEmptyString, const wxString &defaultDir=wxEmptyString,
- const wxString &description=wxEmptyString, const wxString &fileType=wxEmptyString);
-
- ~wxDbConnectInf();
-
- bool Initialize();
-
- bool AllocHenv();
- void FreeHenv();
-
- // Accessors
- const HENV &GetHenv() { return Henv; }
-
- const wxChar *GetDsn() { return Dsn; }
-
- const wxChar *GetUid() { return Uid; }
- const wxChar *GetUserID() { return Uid; }
-
- const wxChar *GetAuthStr() { return AuthStr; }
- const wxChar *GetPassword() { return AuthStr; }
-
- const wxChar *GetConnectionStr() { return ConnectionStr; }
- bool UseConnectionStr() { return useConnectionStr; }
-
- const wxChar *GetDescription() { return Description; }
- const wxChar *GetFileType() { return FileType; }
- const wxChar *GetDefaultDir() { return DefaultDir; }
-
- void SetHenv(const HENV henv) { Henv = henv; }
-
- void SetDsn(const wxString &dsn);
-
- void SetUserID(const wxString &userID);
- void SetUid(const wxString &uid) { SetUserID(uid); }
-
- void SetPassword(const wxString &password);
- void SetAuthStr(const wxString &authstr) { SetPassword(authstr); }
-
- void SetConnectionStr(const wxString &connectStr);
-
- void SetDescription(const wxString &desc) { Description = desc; }
- void SetFileType(const wxString &fileType) { FileType = fileType; }
- void SetDefaultDir(const wxString &defDir) { DefaultDir = defDir; }
-}; // class wxDbConnectInf
-
-
-struct WXDLLIMPEXP_ODBC wxDbSqlTypeInfo
-{
- wxString TypeName;
- SWORD FsqlType;
- long Precision;
- short CaseSensitive;
- short MaximumScale;
-};
-
-
-class WXDLLIMPEXP_ODBC wxDbColFor
-{
-public:
- wxString s_Field; // Formatted String for Output
- wxString s_Format[7]; // Formatted Objects - TIMESTAMP has the biggest (7)
- wxString s_Amount[7]; // Formatted Objects - amount of things that can be formatted
- int i_Amount[7]; // Formatted Objects - TT MM YYYY HH MM SS m
- int i_Nation; // 0 = timestamp , 1=EU, 2=UK, 3=International, 4=US
- int i_dbDataType; // conversion of the 'sqlDataType' to the generic data type used by these classes
- SWORD i_sqlDataType;
-
- wxDbColFor();
- ~wxDbColFor(){}
-
- void Initialize();
- int Format(int Nation, int dbDataType, SWORD sqlDataType, short columnLength, short decimalDigits);
-};
-
-
-class WXDLLIMPEXP_ODBC wxDbColInf
-{
-public:
- wxChar catalog[128+1];
- wxChar schema[128+1];
- wxChar tableName[DB_MAX_TABLE_NAME_LEN+1];
- wxChar colName[DB_MAX_COLUMN_NAME_LEN+1];
- SWORD sqlDataType;
- wxChar typeName[128+1];
- SWORD columnLength;
- SWORD bufferSize;
- short decimalDigits;
- short numPrecRadix;
- short nullable;
- wxChar remarks[254+1];
- int dbDataType; // conversion of the 'sqlDataType' to the generic data type used by these classes
- // mj10777.19991224 : new
- int PkCol; // Primary key column 0=No; 1= First Key, 2 = Second Key etc.
- wxChar PkTableName[DB_MAX_TABLE_NAME_LEN+1]; // Tables that use this PKey as a FKey
- int FkCol; // Foreign key column 0=No; 1= First Key, 2 = Second Key etc.
- wxChar FkTableName[DB_MAX_TABLE_NAME_LEN+1]; // Foreign key table name
- wxDbColFor *pColFor; // How should this columns be formatted
-
- wxDbColInf();
- ~wxDbColInf();
-
- bool Initialize();
-};
-
-
-class WXDLLIMPEXP_ODBC wxDbTableInf // Description of a Table
-{
-public:
- wxChar tableName[DB_MAX_TABLE_NAME_LEN+1];
- wxChar tableType[254+1]; // "TABLE" or "SYSTEM TABLE" etc.
- wxChar tableRemarks[254+1];
- UWORD numCols; // How many Columns does this Table have: GetColumnCount(..);
- wxDbColInf *pColInf; // pColInf = NULL ; User can later call GetColumns(..);
-
- wxDbTableInf();
- ~wxDbTableInf();
-
- bool Initialize();
-};
-
-
-class WXDLLIMPEXP_ODBC wxDbInf // Description of a Database
-{
-public:
- wxChar catalog[128+1];
- wxChar schema[128+1];
- int numTables; // How many tables does this database have
- wxDbTableInf *pTableInf; // pTableInf = new wxDbTableInf[numTables];
-
- wxDbInf();
- ~wxDbInf();
-
- bool Initialize();
-};
-
-
-enum wxDbSqlLogState
-{
- sqlLogOFF,
- sqlLogON
-};
-
-// These are the databases currently tested and working with these classes
-// See the comments in wxDb::Dbms() for exceptions/issues with
-// each of these database engines
-enum wxDBMS
-{
- dbmsUNIDENTIFIED,
- dbmsORACLE,
- dbmsSYBASE_ASA, // Adaptive Server Anywhere
- dbmsSYBASE_ASE, // Adaptive Server Enterprise
- dbmsMS_SQL_SERVER,
- dbmsMY_SQL,
- dbmsPOSTGRES,
- dbmsACCESS,
- dbmsDBASE,
- dbmsINFORMIX,
- dbmsVIRTUOSO,
- dbmsDB2,
- dbmsINTERBASE,
- dbmsPERVASIVE_SQL,
- dbmsXBASE_SEQUITER,
- dbmsFIREBIRD,
- dbmsMAXDB,
- dbmsFuture1,
- dbmsFuture2,
- dbmsFuture3,
- dbmsFuture4,
- dbmsFuture5,
- dbmsFuture6,
- dbmsFuture7,
- dbmsFuture8,
- dbmsFuture9,
- dbmsFuture10
-};
-
-
-// The wxDb::errorList is copied to this variable when the wxDb object
-// is closed. This way, the error list is still available after the
-// database object is closed. This is necessary if the database
-// connection fails so the calling application can show the operator
-// why the connection failed. Note: as each wxDb object is closed, it
-// will overwrite the errors of the previously destroyed wxDb object in
-// this variable.
-
-extern WXDLLIMPEXP_DATA_ODBC(wxChar)
- DBerrorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN+1];
-
-
-class WXDLLIMPEXP_ODBC wxDb
-{
-private:
- bool dbIsOpen;
- bool dbIsCached; // Was connection created by caching functions
- bool dbOpenedWithConnectionString; // Was the database connection opened with a connection string
- wxString dsn; // Data source name
- wxString uid; // User ID
- wxString authStr; // Authorization string (password)
- wxString inConnectionStr; // Connection string used to connect to the database
- wxString outConnectionStr;// Connection string returned by the database when a connection is successfully opened
- FILE *fpSqlLog; // Sql Log file pointer
- wxDbSqlLogState sqlLogState; // On or Off
- bool fwdOnlyCursors;
- wxDBMS dbmsType; // Type of datasource - i.e. Oracle, dBase, SQLServer, etc
-
- // Private member functions
- bool getDbInfo(bool failOnDataTypeUnsupported=true);
- bool getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo);
- bool setConnectionOptions(void);
- void logError(const wxString &errMsg, const wxString &SQLState);
- const wxChar *convertUserID(const wxChar *userID, wxString &UserID);
- bool determineDataTypes(bool failOnDataTypeUnsupported);
- void initialize();
- bool open(bool failOnDataTypeUnsupported=true);
-
-#if !wxODBC_BACKWARD_COMPATABILITY
- // ODBC handles
- HENV henv; // ODBC Environment handle
- HDBC hdbc; // ODBC DB Connection handle
- HSTMT hstmt; // ODBC Statement handle
-
- //Error reporting mode
- bool silent;
-
- // Number of Ctable objects connected to this db object. FOR INTERNAL USE ONLY!!!
- unsigned int nTables;
-
- // Information about logical data types VARCHAR, INTEGER, FLOAT and DATE.
- //
- // This information is obtained from the ODBC driver by use of the
- // SQLGetTypeInfo() function. The key piece of information is the
- // type name the data source uses for each logical data type.
- // e.g. VARCHAR; Oracle calls it VARCHAR2.
- wxDbSqlTypeInfo typeInfVarchar;
- wxDbSqlTypeInfo typeInfInteger;
- wxDbSqlTypeInfo typeInfFloat;
- wxDbSqlTypeInfo typeInfDate;
- wxDbSqlTypeInfo typeInfBlob;
- wxDbSqlTypeInfo typeInfMemo;
-#endif
-
-public:
-
- void setCached(bool cached) { dbIsCached = cached; } // This function must only be called by wxDbGetConnection() and wxDbCloseConnections!!!
- bool IsCached() { return dbIsCached; }
-
- bool GetDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo)
- { return getDataTypeInfo(fSqlType, structSQLTypeInfo); }
-
-#if wxODBC_BACKWARD_COMPATABILITY
- // ODBC handles
- HENV henv; // ODBC Environment handle
- HDBC hdbc; // ODBC DB Connection handle
- HSTMT hstmt; // ODBC Statement handle
-
- //Error reporting mode
- bool silent;
-
- // Number of Ctable objects connected to this db object. FOR INTERNAL USE ONLY!!!
- unsigned int nTables;
-#endif
-
- // The following structure contains database information gathered from the
- // datasource when the datasource is first opened.
- struct
- {
- wxChar dbmsName[40]; // Name of the dbms product
- wxChar dbmsVer[64]; // Version # of the dbms product
- wxChar driverName[40]; // Driver name
- wxChar odbcVer[60]; // ODBC version of the driver
- wxChar drvMgrOdbcVer[60]; // ODBC version of the driver manager
- wxChar driverVer[60]; // Driver version
- wxChar serverName[80]; // Server Name, typically a connect string
- wxChar databaseName[128]; // Database filename
- wxChar outerJoins[2]; // Indicates whether the data source supports outer joins
- wxChar procedureSupport[2]; // Indicates whether the data source supports stored procedures
- wxChar accessibleTables[2]; // Indicates whether the data source only reports accessible tables in SQLTables.
- UWORD maxConnections; // Maximum # of connections the data source supports
- UWORD maxStmts; // Maximum # of HSTMTs per HDBC
- UWORD apiConfLvl; // ODBC API conformance level
- UWORD cliConfLvl; // Indicates whether the data source is SAG compliant
- UWORD sqlConfLvl; // SQL conformance level
- UWORD cursorCommitBehavior; // Indicates how cursors are affected by a db commit
- UWORD cursorRollbackBehavior; // Indicates how cursors are affected by a db rollback
- UWORD supportNotNullClause; // Indicates if data source supports NOT NULL clause
- wxChar supportIEF[2]; // Integrity Enhancement Facility (Referential Integrity)
- UDWORD txnIsolation; // Default transaction isolation level supported by the driver
- UDWORD txnIsolationOptions; // Transaction isolation level options available
- UDWORD fetchDirections; // Fetch directions supported
- UDWORD lockTypes; // Lock types supported in SQLSetPos
- UDWORD posOperations; // Position operations supported in SQLSetPos
- UDWORD posStmts; // Position statements supported
- UDWORD scrollConcurrency; // Concurrency control options supported for scrollable cursors
- UDWORD scrollOptions; // Scroll Options supported for scrollable cursors
- UDWORD staticSensitivity; // Indicates if additions, deletions and updates can be detected
- UWORD txnCapable; // Indicates if the data source supports transactions
- UDWORD loginTimeout; // Number seconds to wait for a login request
- } dbInf;
-
- // ODBC Error Inf.
- SWORD cbErrorMsg;
- int DB_STATUS;
-#ifdef __VMS
- // The DECC compiler chokes when in db.cpp the array is accessed outside
- // its bounds. Maybe this change should also applied for other platforms.
- wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN+1];
-#else
- wxChar errorList[DB_MAX_ERROR_HISTORY][DB_MAX_ERROR_MSG_LEN];
-#endif
- wxChar errorMsg[SQL_MAX_MESSAGE_LENGTH];
- SQLINTEGER nativeError;
- wxChar sqlState[20];
-
-#if wxODBC_BACKWARD_COMPATABILITY
- // Information about logical data types VARCHAR, INTEGER, FLOAT and DATE.
- //
- // This information is obtained from the ODBC driver by use of the
- // SQLGetTypeInfo() function. The key piece of information is the
- // type name the data source uses for each logical data type.
- // e.g. VARCHAR; Oracle calls it VARCHAR2.
- wxDbSqlTypeInfo typeInfVarchar;
- wxDbSqlTypeInfo typeInfInteger;
- wxDbSqlTypeInfo typeInfFloat;
- wxDbSqlTypeInfo typeInfDate;
- wxDbSqlTypeInfo typeInfBlob;
-#endif
-
- // Public member functions
- wxDb(const HENV &aHenv, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS);
- ~wxDb();
-
- // Data Source Name, User ID, Password and whether open should fail on data type not supported
- bool Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported=true);
- ///This version of Open will open the odbc source selection dialog. Cast a wxWindow::GetHandle() to SQLHWND to use.
- bool Open(const wxString& inConnectStr, SQLHWND parentWnd, bool failOnDataTypeUnsupported=true);
- bool Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported=true);
- bool Open(wxDbConnectInf *dbConnectInf, bool failOnDataTypeUnsupported=true);
- bool Open(wxDb *copyDb); // pointer to a wxDb whose connection info should be copied rather than re-queried
- void Close(void);
- bool CommitTrans(void);
- bool RollbackTrans(void);
- bool DispAllErrors(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
- bool GetNextError(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
- void DispNextError(void);
- bool CreateView(const wxString &viewName, const wxString &colList, const wxString &pSqlStmt, bool attemptDrop=true);
- bool DropView(const wxString &viewName);
- bool ExecSql(const wxString &pSqlStmt);
- bool ExecSql(const wxString &pSqlStmt, wxDbColInf** columns, short& numcols);
- bool GetNext(void);
- bool GetData(UWORD colNo, SWORD cType, PTR pData, SDWORD maxLen, SQLLEN FAR *cbReturned);
- bool Grant(int privileges, const wxString &tableName, const wxString &userList = wxT("PUBLIC"));
- int TranslateSqlState(const wxString &SQLState);
- wxDbInf *GetCatalog(const wxChar *userID=NULL);
- bool Catalog(const wxChar *userID=NULL, const wxString &fileName=SQL_CATALOG_FILENAME);
- int GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCols);
-
- wxDbColInf *GetColumns(wxChar *tableName[], const wxChar *userID=NULL);
- wxDbColInf *GetColumns(const wxString &tableName, UWORD *numCols, const wxChar *userID=NULL);
-
- int GetColumnCount(const wxString &tableName, const wxChar *userID=NULL);
- const wxChar *GetDatabaseName(void) {return dbInf.dbmsName;}
- const wxString &GetDataSource(void) {return dsn;}
- const wxString &GetDatasourceName(void){return dsn;}
- const wxString &GetUsername(void) {return uid;}
- const wxString &GetPassword(void) {return authStr;}
- const wxString &GetConnectionInStr(void) {return inConnectionStr;}
- const wxString &GetConnectionOutStr(void) {return outConnectionStr;}
- bool IsOpen(void) {return dbIsOpen;}
- bool OpenedWithConnectionString(void) {return dbOpenedWithConnectionString;}
- HENV GetHENV(void) {return henv;}
- HDBC GetHDBC(void) {return hdbc;}
- HSTMT GetHSTMT(void) {return hstmt;}
- int GetTableCount() {return nTables;} // number of tables using this connection
- wxDbSqlTypeInfo GetTypeInfVarchar() {return typeInfVarchar;}
- wxDbSqlTypeInfo GetTypeInfInteger() {return typeInfInteger;}
- wxDbSqlTypeInfo GetTypeInfFloat() {return typeInfFloat;}
- wxDbSqlTypeInfo GetTypeInfDate() {return typeInfDate;}
- wxDbSqlTypeInfo GetTypeInfBlob() {return typeInfBlob;}
- wxDbSqlTypeInfo GetTypeInfMemo() {return typeInfMemo;}
-
- // tableName can refer to a table, view, alias or synonym
- bool TableExists(const wxString &tableName, const wxChar *userID=NULL,
- const wxString &tablePath=wxEmptyString);
- bool TablePrivileges(const wxString &tableName, const wxString &priv,
- const wxChar *userID=NULL, const wxChar *schema=NULL,
- const wxString &path=wxEmptyString);
-
- // These two functions return the table name or column name in a form ready
- // for use in SQL statements. For example, if the datasource allows spaces
- // in the table name or column name, the returned string will have the
- // correct enclosing marks around the name to allow it to be properly
- // included in a SQL statement
- const wxString SQLTableName(const wxChar *tableName);
- const wxString SQLColumnName(const wxChar *colName);
-
- void LogError(const wxString &errMsg, const wxString &SQLState = wxEmptyString)
- { logError(errMsg, SQLState); }
- void SetDebugErrorMessages(bool state) { silent = !state; }
- bool SetSqlLogging(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME,
- bool append = false);
- bool WriteSqlLog(const wxString &logMsg);
-
- wxDBMS Dbms(void);
- bool ModifyColumn(const wxString &tableName, const wxString &columnName,
- int dataType, ULONG columnLength=0,
- const wxString &optionalParam=wxEmptyString);
-
- bool FwdOnlyCursors(void) {return fwdOnlyCursors;}
-
- // return the string with all special SQL characters escaped
- wxString EscapeSqlChars(const wxString& value);
-
- // These two functions are provided strictly for use by wxDbTable.
- // DO NOT USE THESE FUNCTIONS, OR MEMORY LEAKS MAY OCCUR
- void incrementTableCount() { nTables++; return; }
- void decrementTableCount() { nTables--; return; }
-
-}; // wxDb
-
-
-// This structure forms a node in a linked list. The linked list of "DbList" objects
-// keeps track of allocated database connections. This allows the application to
-// open more than one database connection through ODBC for multiple transaction support
-// or for multiple database support.
-struct wxDbList
-{
- wxDbList *PtrPrev; // Pointer to previous item in the list
- wxString Dsn; // Data Source Name
- wxString Uid; // User ID
- wxString AuthStr; // Authorization string (password)
- wxString ConnectionStr; // Connection string used instead of DSN
- wxDb *PtrDb; // Pointer to the wxDb object
- bool Free; // Is item free or in use?
- wxDbList *PtrNext; // Pointer to next item in the list
-};
-
-
-#ifdef __WXDEBUG__
-#include "wx/object.h"
-class wxTablesInUse : public wxObject
-{
- public:
- const wxChar *tableName;
- ULONG tableID;
- class wxDb *pDb;
-}; // wxTablesInUse
-#endif
-
-
-// The following routines allow a user to get new database connections, free them
-// for other code segments to use, or close all of them when the application has
-// completed.
-wxDb WXDLLIMPEXP_ODBC *wxDbGetConnection(wxDbConnectInf *pDbConfig, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS);
-bool WXDLLIMPEXP_ODBC wxDbFreeConnection(wxDb *pDb);
-void WXDLLIMPEXP_ODBC wxDbCloseConnections(void);
-int WXDLLIMPEXP_ODBC wxDbConnectionsInUse(void);
-
-
-// Writes a message to the wxLog window (stdout usually) when an internal error
-// situation occurs. This function only works in DEBUG builds
-const wxChar WXDLLIMPEXP_ODBC *
-wxDbLogExtendedErrorMsg(const wxChar *userText,
- wxDb *pDb,
- const wxChar *ErrFile,
- int ErrLine);
-
-
-// This function sets the sql log state for all open wxDb objects
-bool WXDLLIMPEXP_ODBC
-wxDbSqlLog(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME);
-
-
-#if 0
-// MSW/VC6 ONLY!!! Experimental
-int WXDLLEXPORT wxDbCreateDataSource(const wxString &driverName, const wxString &dsn, const wxString &description=wxEmptyString,
- bool sysDSN=false, const wxString &defDir=wxEmptyString, wxWindow *parent=NULL);
-#endif
-
-// This routine allows you to query a driver manager
-// for a list of available datasources. Call this routine
-// the first time using SQL_FETCH_FIRST. Continue to call it
-// using SQL_FETCH_NEXT until you've exhausted the list.
-bool WXDLLIMPEXP_ODBC
-wxDbGetDataSource(HENV henv, wxChar *Dsn, SWORD DsnMaxLength, wxChar *DsDesc,
- SWORD DsDescMaxLength, UWORD direction = SQL_FETCH_NEXT);
-
-
-// Change this to 0 to remove use of all deprecated functions
-#if wxODBC_BACKWARD_COMPATABILITY
-//#################################################################################
-//############### DEPRECATED functions for backward compatibility #################
-//#################################################################################
-
-// Backward compability structures/classes. This will eventually go away
-const int DB_PATH_MAX = wxDB_PATH_MAX;
-
-typedef wxDb wxDB;
-typedef wxDbTableInf wxTableInf;
-typedef wxDbColInf wxColInf;
-typedef wxDbColInf CcolInf;
-typedef wxDbColFor wxColFor;
-typedef wxDbSqlTypeInfo SqlTypeInfo;
-typedef wxDbSqlTypeInfo wxSqlTypeInfo;
-typedef enum wxDbSqlLogState sqlLog;
-typedef enum wxDbSqlLogState wxSqlLogState;
-typedef enum wxDBMS dbms;
-typedef enum wxDBMS DBMS;
-typedef wxODBC_ERRORS ODBC_ERRORS;
-typedef wxDbConnectInf DbStuff;
-typedef wxDbList DbList;
-#ifdef __WXDEBUG__
-typedef wxTablesInUse CstructTablesInUse;
-#endif
-
-// Deprecated function names that are replaced by the function names listed above
-wxDB WXDLLIMPEXP_ODBC
-*GetDbConnection(DbStuff *pDbStuff, bool FwdOnlyCursors=(bool)wxODBC_FWD_ONLY_CURSORS);
-bool WXDLLIMPEXP_ODBC FreeDbConnection(wxDB *pDb);
-void WXDLLIMPEXP_ODBC CloseDbConnections(void);
-int WXDLLIMPEXP_ODBC NumberDbConnectionsInUse(void);
-
-bool SqlLog(sqlLog state, const wxChar *filename = SQL_LOG_FILENAME);
-
-bool WXDLLIMPEXP_ODBC
-GetDataSource(HENV henv, char *Dsn, SWORD DsnMaxLength, char *DsDesc, SWORD DsDescMaxLength,
- UWORD direction = SQL_FETCH_NEXT);
-
-#endif // Deprecated structures/classes/functions
-
-#endif // _WX_DB_H_
-
diff --git a/desmume/src/windows/wx/include/wx/dbgrid.h b/desmume/src/windows/wx/include/wx/dbgrid.h
deleted file mode 100644
index 4e8655cbe..000000000
--- a/desmume/src/windows/wx/include/wx/dbgrid.h
+++ /dev/null
@@ -1,177 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: dbgrid.h
-// Purpose: Displays a wxDbTable in a wxGrid.
-// Author: Roger Gammans, Paul Gammans
-// Modified by:
-// Created:
-// RCS-ID: $Id: dbgrid.h 41020 2006-09-05 20:47:48Z VZ $
-// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-// Branched From : dbgrid.h,v 1.19 2001/03/28 11:16:01
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_GENERIC_DBGRID_H_
-#define _WX_GENERIC_DBGRID_H_
-
-#if wxUSE_ODBC
-#if wxUSE_GRID
-
-#include "wx/log.h"
-#include "wx/dbtable.h"
-#include "wx/dynarray.h"
-#include "wx/grid.h"
-#include "wx/dbkeyg.h"
-
-#define wxGRID_VALUE_DBAUTO _T("dbauto")
-
-WX_DECLARE_USER_EXPORTED_OBJARRAY(GenericKey,keyarray,WXDLLIMPEXP_DBGRID);
-
-static const int wxUSE_QUERY = -1;
-
-class WXDLLIMPEXP_DBGRID wxDbGridColInfoBase
-{
-public:
- //Default ctor
- wxDbGridColInfoBase() { }
- wxDbGridColInfoBase(int colNo,
- wxString type, wxString title) :
- DbCol(colNo),
- wxtypename(type),
- Title(title)
- { }
- //Copy Ctor
- wxDbGridColInfoBase(const wxDbGridColInfoBase& ref)
- {
- DbCol = ref.DbCol;
- wxtypename = ref.wxtypename;
- Title = ref.Title;
- }
- //Empty destructor for member obj's
- ~wxDbGridColInfoBase() {}
-
- int DbCol;
- wxString wxtypename;
- wxString Title;
-};
-
-
-class WXDLLIMPEXP_DBGRID wxDbGridColInfo
-{
-public:
- wxDbGridColInfo(int colNo,
- wxString type,
- wxString title,
- wxDbGridColInfo *next) :
- m_data(colNo,type,title)
- {
- m_next=next;
- }
-
- //Empty List
- ~wxDbGridColInfo() { delete m_next; }
-
- //Recurse to find length.
- int Length() { return (m_next ? m_next->Length() +1 : 1); }
-
- // Adds a new column info (2 step creation)
- void AddColInfo (int colNo,
- wxString type,
- wxString title)
- {
- GetLast()->m_next = new wxDbGridColInfo (colNo, type, title, NULL);
- }
-
- // Searches last
- wxDbGridColInfo *GetLast() { return (m_next ? m_next->GetLast() : this); }
-
-
- protected:
- wxDbGridColInfoBase m_data;
- wxDbGridColInfo *m_next;
-
- friend class wxDbGridTableBase;
-};
-
-
-class WXDLLIMPEXP_DBGRID wxDbGridCellAttrProvider : public wxGridCellAttrProvider
-{
-public:
- wxDbGridCellAttrProvider();
- wxDbGridCellAttrProvider(wxDbTable *tab, wxDbGridColInfoBase* ColInfo);
- virtual ~wxDbGridCellAttrProvider();
-
- virtual wxGridCellAttr *GetAttr(int row, int col,
- wxGridCellAttr::wxAttrKind kind) const;
- virtual void AssignDbTable(wxDbTable *tab);
-private:
- wxDbTable *m_data;
- wxDbGridColInfoBase *m_ColInfo;
-};
-
-
-class WXDLLIMPEXP_DBGRID wxDbGridTableBase : public wxGridTableBase
-{
-public:
- wxDbGridTableBase(wxDbTable *tab, wxDbGridColInfo *ColInfo,
- int count = wxUSE_QUERY, bool takeOwnership = true);
- virtual ~wxDbGridTableBase();
-
- virtual int GetNumberRows()
- {
- wxLogDebug(_T(" GetNumberRows() = %i"),m_rowtotal);
- return m_rowtotal;
- }
- virtual int GetNumberCols()
- {
- wxLogDebug(_T(" GetNumberCols() = %i"),m_nocols);
- return m_nocols;
- }
- virtual bool IsEmptyCell(int row, int col) ;
- virtual wxString GetValue(int row, int col) ;
- virtual void SetValue(int row, int col, const wxString& value);
- virtual bool CanHaveAttributes();
- virtual wxString GetTypeName(int row, int col);
- virtual bool CanGetValueAs(int row, int col, const wxString& typeName);
- virtual bool CanSetValueAs(int row, int col, const wxString& typeName);
- virtual long GetValueAsLong(int row, int col);
- virtual double GetValueAsDouble(int row, int col);
- virtual bool GetValueAsBool(int row, int col);
- virtual void SetValueAsLong(int row, int col, long value);
- virtual void SetValueAsDouble(int row, int col, double value);
- virtual void SetValueAsBool(int row, int col, bool value);
- virtual void *GetValueAsCustom(int row, int col, const wxString& typeName);
- virtual void SetValueAsCustom(int row, int col, const wxString& typeName, void* value);
-
-
- virtual wxString GetColLabelValue(int col);
-
- virtual bool AssignDbTable(wxDbTable *tab, int count = wxUSE_QUERY, bool takeOwnership=true);
- virtual void ValidateRow(int row);
- virtual bool UpdateRow(int row) const
- {
- if (m_row != row)
- return true;
- else
- return Writeback();
- }
-
-private:
- //Operates on the current row
- bool Writeback() const;
-
- typedef wxGridTableBase inherited;
- keyarray m_keys;
- wxDbTable *m_data;
- bool m_dbowner;
- int m_rowtotal;
- int m_nocols;
- int m_row;
- wxDbGridColInfoBase *m_ColInfo;
- bool m_rowmodified;
-};
-
-#endif // #if wxUSE_GRID
-#endif // #if wxUSE_ODBC
-
-#endif // _WX_GENERIC_DBGRID_H_
diff --git a/desmume/src/windows/wx/include/wx/dbkeyg.h b/desmume/src/windows/wx/include/wx/dbkeyg.h
deleted file mode 100644
index eb91f1ce1..000000000
--- a/desmume/src/windows/wx/include/wx/dbkeyg.h
+++ /dev/null
@@ -1,41 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: dbkeyg.h
-// Purpose: Generic key support for wxDbTable
-// Author: Roger Gammans
-// Modified by:
-// Created:
-// RCS-ID: $Id: dbkeyg.h 29077 2004-09-10 12:56:07Z ABX $
-// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
-// Licence: wxWindows licence
-//
-// NOTE : There is no CPP file to go along with this
-//
-///////////////////////////////////////////////////////////////////////////////
-// Branched From : gkey.h,v 1.3 2001/06/01 10:31:41
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DBGKEY_H_
-#define _WX_DBGKEY_H_
-
-class GenericKey
-{
-public:
- GenericKey(void *blk, size_t sz) { clone(blk,sz); }
- GenericKey(const GenericKey &ref) { clone(ref.m_data,ref.m_sz); }
- ~GenericKey() { free(m_data); }
-
- void *GetBlk(void) const { return m_data; }
-
-private:
- void clone(void *blk, size_t sz)
- {
- m_data = malloc(sz);
- memcpy(m_data,blk,sz);
- m_sz = sz;
- }
-
- void *m_data;
- size_t m_sz;
-};
-
-#endif // _WX_DBGKEY_H_
diff --git a/desmume/src/windows/wx/include/wx/dbtable.h b/desmume/src/windows/wx/include/wx/dbtable.h
deleted file mode 100644
index 1bbef54d7..000000000
--- a/desmume/src/windows/wx/include/wx/dbtable.h
+++ /dev/null
@@ -1,377 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: dbtable.h
-// Purpose: Declaration of the wxDbTable class.
-// Author: Doug Card
-// Modified by: George Tasker
-// Bart Jourquin
-// Mark Johnson
-// Created: 9.96
-// RCS-ID: $Id: dbtable.h 35650 2005-09-23 12:56:45Z MR $
-// Copyright: (c) 1996 Remstar International, Inc.
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-/*
-// SYNOPSIS START
-// SYNOPSIS STOP
-*/
-
-#ifndef DBTABLE_DOT_H
-#define DBTABLE_DOT_H
-
-#include "wx/defs.h"
-
-#include "wx/db.h"
-
-#include "wx/variant.h"
-#include "wx/dbkeyg.h"
-
-const int wxDB_ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger
-const int wxDB_DEFAULT_CURSOR = 0;
-const bool wxDB_QUERY_ONLY = true;
-const bool wxDB_DISABLE_VIEW = true;
-
-// Used to indicate end of a variable length list of
-// column numbers passed to member functions
-const int wxDB_NO_MORE_COLUMN_NUMBERS = -1;
-
-// The following class is used to define a column of a table.
-// The wxDbTable constructor will dynamically allocate as many of
-// these as there are columns in the table. The class derived
-// from wxDbTable must initialize these column definitions in it's
-// constructor. These column definitions provide inf. to the
-// wxDbTable class which allows it to create a table in the data
-// source, exchange data between the data source and the C++
-// object, and so on.
-class WXDLLIMPEXP_ODBC wxDbColDef
-{
-public:
- wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name
- int DbDataType; // Logical Data Type; e.g. DB_DATA_TYPE_INTEGER
- SWORD SqlCtype; // C data type; e.g. SQL_C_LONG
- void *PtrDataObj; // Address of the data object
- int SzDataObj; // Size, in bytes, of the data object
- bool KeyField; // true if this column is part of the PRIMARY KEY to the table; Date fields should NOT be KeyFields.
- bool Updateable; // Specifies whether this column is updateable
- bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
- bool DerivedCol; // Specifies whether this column is a derived value
- SQLLEN CbValue; // Internal use only!!!
- bool Null; // NOT FULLY IMPLEMENTED - Allows NULL values in Inserts and Updates
-
- wxDbColDef();
-
- bool Initialize();
-}; // wxDbColDef
-
-
-class WXDLLIMPEXP_ODBC wxDbColDataPtr
-{
-public:
- void *PtrDataObj;
- int SzDataObj;
- SWORD SqlCtype;
-}; // wxDbColDataPtr
-
-
-// This structure is used when creating secondary indexes.
-class WXDLLIMPEXP_ODBC wxDbIdxDef
-{
-public:
- wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1];
- bool Ascending;
-}; // wxDbIdxDef
-
-
-class WXDLLIMPEXP_ODBC wxDbTable
-{
-private:
- ULONG tableID; // Used for debugging. This can help to match up mismatched constructors/destructors
-
- // Private member variables
- UDWORD cursorType;
- bool insertable;
-
- // Private member functions
- bool initialize(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
- const wxString &qryTblName, bool qryOnly, const wxString &tblPath);
- void cleanup();
-
- void setCbValueForColumn(int columnIndex);
- bool bindParams(bool forUpdate); // called by the other 'bind' functions
- bool bindInsertParams(void);
- bool bindUpdateParams(void);
-
- bool bindCols(HSTMT cursor);
- bool getRec(UWORD fetchType);
- bool execDelete(const wxString &pSqlStmt);
- bool execUpdate(const wxString &pSqlStmt);
- bool query(int queryType, bool forUpdate, bool distinct, const wxString &pSqlStmt=wxEmptyString);
-
-#if !wxODBC_BACKWARD_COMPATABILITY
-// these were public
- // Where, Order By and From clauses
- wxString where; // Standard SQL where clause, minus the word WHERE
- wxString orderBy; // Standard SQL order by clause, minus the ORDER BY
- wxString from; // Allows for joins in a wxDbTable::Query(). Format: ",tbl,tbl..."
-
- // ODBC Handles
- HENV henv; // ODBC Environment handle
- HDBC hdbc; // ODBC DB Connection handle
- HSTMT hstmt; // ODBC Statement handle
- HSTMT *hstmtDefault; // Default cursor
- HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts
- HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes
- HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates
- HSTMT hstmtInternal; // ODBC Statement handle used internally only
- HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns)
-
- // Flags
- bool selectForUpdate;
-
- // Pointer to the database object this table belongs to
- wxDb *pDb;
-
- // Table Inf.
- wxString tablePath; // needed for dBase tables
- wxString tableName; // Table name
- wxString queryTableName; // Query Table Name
- UWORD m_numCols; // # of columns in the table
- bool queryOnly; // Query Only, no inserts, updates or deletes
-
- // Column Definitions
- wxDbColDef *colDefs; // Array of wxDbColDef structures
-#endif
-public:
-#if wxODBC_BACKWARD_COMPATABILITY
- // Where, Order By and From clauses
- char *where; // Standard SQL where clause, minus the word WHERE
- char *orderBy; // Standard SQL order by clause, minus the ORDER BY
- char *from; // Allows for joins in a wxDbTable::Query(). Format: ",tbl,tbl..."
-
- // ODBC Handles
- HENV henv; // ODBC Environment handle
- HDBC hdbc; // ODBC DB Connection handle
- HSTMT hstmt; // ODBC Statement handle
- HSTMT *hstmtDefault; // Default cursor
- HSTMT hstmtInsert; // ODBC Statement handle used specifically for inserts
- HSTMT hstmtDelete; // ODBC Statement handle used specifically for deletes
- HSTMT hstmtUpdate; // ODBC Statement handle used specifically for updates
- HSTMT hstmtInternal; // ODBC Statement handle used internally only
- HSTMT *hstmtCount; // ODBC Statement handle used by Count() function (No binding of columns)
-
- // Flags
- bool selectForUpdate;
-
- // Pointer to the database object this table belongs to
- wxDb *pDb;
-
- // Table Inf.
- char tablePath[wxDB_PATH_MAX]; // needed for dBase tables
- char tableName[DB_MAX_TABLE_NAME_LEN+1]; // Table name
- char queryTableName[DB_MAX_TABLE_NAME_LEN+1]; // Query Table Name
- UWORD m_numCols; // # of columns in the table
- bool queryOnly; // Query Only, no inserts, updates or deletes
-
- // Column Definitions
- wxDbColDef *colDefs; // Array of wxDbColDef structures
-#endif
- // Public member functions
- wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
- const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
- const wxString &tblPath=wxEmptyString);
-
-#if WXWIN_COMPATIBILITY_2_4
- wxDEPRECATED(
- wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
- const wxChar *qryTblName, bool qryOnly,
- const wxString &tblPath)
- );
-#endif // WXWIN_COMPATIBILITY_2_4
-
- virtual ~wxDbTable();
-
- bool Open(bool checkPrivileges=false, bool checkTableExists=true);
- bool CreateTable(bool attemptDrop=true);
- bool DropTable(void);
- bool CreateIndex(const wxString &indexName, bool unique, UWORD numIndexColumns,
- wxDbIdxDef *pIndexDefs, bool attemptDrop=true);
- bool DropIndex(const wxString &indexName);
-
- // Accessors
-
- // The member variables returned by these accessors are all
- // set when the wxDbTable instance is created and cannot be
- // changed, hence there is no corresponding SetXxxx function
- wxDb *GetDb() { return pDb; }
- const wxString &GetTableName() { return tableName; }
- const wxString &GetQueryTableName() { return queryTableName; }
- const wxString &GetTablePath() { return tablePath; }
-
- UWORD GetNumberOfColumns() { return m_numCols; } // number of "defined" columns for this wxDbTable instance
-
- const wxString &GetFromClause() { return from; }
- const wxString &GetOrderByClause() { return orderBy; }
- const wxString &GetWhereClause() { return where; }
-
- bool IsQueryOnly() { return queryOnly; }
-#if wxODBC_BACKWARD_COMPATABILITY
- void SetFromClause(const char *From) { from = (char *)From; }
- void SetOrderByClause(const char *OrderBy) { orderBy = (char *)OrderBy; }
- void SetWhereClause(const char *Where) { where = (char *)Where; }
-#else
- void SetFromClause(const wxString &From) { from = From; }
- void SetOrderByClause(const wxString &OrderBy) { orderBy = OrderBy; }
- bool SetOrderByColNums(UWORD first, ...);
- void SetWhereClause(const wxString &Where) { where = Where; }
- void From(const wxString &From) { from = From; }
- void OrderBy(const wxString &OrderBy) { orderBy = OrderBy; }
- void Where(const wxString &Where) { where = Where; }
- const wxString &Where() { return where; }
- const wxString &OrderBy() { return orderBy; }
- const wxString &From() { return from; }
-#endif
- int Insert(void);
- bool Update(void);
- bool Update(const wxString &pSqlStmt);
- bool UpdateWhere(const wxString &pWhereClause);
- bool Delete(void);
- bool DeleteWhere(const wxString &pWhereClause);
- bool DeleteMatching(void);
- virtual bool Query(bool forUpdate = false, bool distinct = false);
- bool QueryBySqlStmt(const wxString &pSqlStmt);
- bool QueryMatching(bool forUpdate = false, bool distinct = false);
- bool QueryOnKeyFields(bool forUpdate = false, bool distinct = false);
- bool Refresh(void);
- bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); }
- bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); }
-
- /***** These four functions only work with wxDb instances that are defined *****
- ***** as not being FwdOnlyCursors *****/
- bool GetPrev(void);
- bool operator--(int);
- bool GetFirst(void);
- bool GetLast(void);
-
- bool IsCursorClosedOnCommit(void);
- UWORD GetRowNum(void);
-
- void BuildSelectStmt(wxString &pSqlStmt, int typeOfSelect, bool distinct);
- void BuildSelectStmt(wxChar *pSqlStmt, int typeOfSelect, bool distinct);
-
- void BuildDeleteStmt(wxString &pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString);
- void BuildDeleteStmt(wxChar *pSqlStmt, int typeOfDel, const wxString &pWhereClause=wxEmptyString);
-
- void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpdate, const wxString &pWhereClause=wxEmptyString);
- void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpdate, const wxString &pWhereClause=wxEmptyString);
-
- void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=false);
- void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=false);
-
-#if wxODBC_BACKWARD_COMPATABILITY
-// The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above)
- void GetSelectStmt(char *pSqlStmt, int typeOfSelect, bool distinct)
- { BuildSelectStmt(pSqlStmt,typeOfSelect,distinct); }
- void GetDeleteStmt(char *pSqlStmt, int typeOfDel, const char *pWhereClause = NULL)
- { BuildDeleteStmt(pSqlStmt,typeOfDel,pWhereClause); }
- void GetUpdateStmt(char *pSqlStmt, int typeOfUpdate, const char *pWhereClause = NULL)
- { BuildUpdateStmt(pSqlStmt,typeOfUpdate,pWhereClause); }
- void GetWhereClause(char *pWhereClause, int typeOfWhere,
- const char *qualTableName = NULL, bool useLikeComparison=false)
- { BuildWhereClause(pWhereClause,typeOfWhere,qualTableName,useLikeComparison); }
-#endif
- bool CanSelectForUpdate(void);
-#if wxODBC_BACKWARD_COMPATABILITY
- bool CanUpdByROWID(void) { return CanUpdateByRowID(); };
-#endif
- bool CanUpdateByROWID(void);
- void ClearMemberVar(UWORD colNumber, bool setToNull=false);
- void ClearMemberVars(bool setToNull=false);
- bool SetQueryTimeout(UDWORD nSeconds);
-
- wxDbColDef *GetColDefs() { return colDefs; }
- bool SetColDefs(UWORD index, const wxString &fieldName, int dataType,
- void *pData, SWORD cType,
- int size, bool keyField = false, bool updateable = true,
- bool insertAllowed = true, bool derivedColumn = false);
- wxDbColDataPtr *SetColDefs(wxDbColInf *colInfs, UWORD numCols);
-
- bool CloseCursor(HSTMT cursor);
- bool DeleteCursor(HSTMT *hstmtDel);
- void SetCursor(HSTMT *hstmtActivate = (void **) wxDB_DEFAULT_CURSOR);
- HSTMT GetCursor(void) { return(hstmt); }
- HSTMT *GetNewCursor(bool setCursor = false, bool bindColumns = true);
-#if wxODBC_BACKWARD_COMPATABILITY
-// The following member function is deprecated. You should use the GetNewCursor
- HSTMT *NewCursor(bool setCursor = false, bool bindColumns = true) { return GetNewCursor(setCursor,bindColumns); }
-#endif
-
- ULONG Count(const wxString &args=_T("*"));
- int DB_STATUS(void) { return(pDb->DB_STATUS); }
-
- bool IsColNull(UWORD colNumber) const;
- bool SetColNull(UWORD colNumber, bool set=true);
- bool SetColNull(const wxString &colName, bool set=true);
-#if wxODBC_BACKWARD_COMPATABILITY
-// The following member functions are deprecated. You should use the SetColNull()
- bool SetNull(int colNumber, bool set=true) { return (SetNull(colNumber,set)); }
- bool SetNull(const char *colName, bool set=true) { return (SetNull(colName,set)); }
-#endif
-#ifdef __WXDEBUG__
- ULONG GetTableID() { return tableID; }
-#endif
-
-//TODO: Need to Document
- typedef enum { WX_ROW_MODE_QUERY , WX_ROW_MODE_INDIVIDUAL } rowmode_t;
- virtual void SetRowMode(const rowmode_t rowmode);
-#if wxODBC_BACKWARD_COMPATABILITY
- virtual wxVariant GetCol(const int colNumber) const { return GetColumn(colNumber); };
- virtual void SetCol(const int colNumber, const wxVariant value) { return SetColumn(colNumber, value); };
-#endif
- virtual wxVariant GetColumn(const int colNumber) const ;
- virtual void SetColumn(const int colNumber, const wxVariant value);
- virtual GenericKey GetKey(void);
- virtual void SetKey(const GenericKey &key);
-
- private:
- HSTMT *m_hstmtGridQuery;
- rowmode_t m_rowmode;
- size_t m_keysize;
-
-// typedef enum {unmodified=0, UpdatePending, InsertPending } recStatus;
-
-// recStatus get_ModifiedStatus() { return m_recstatus; }
-
-// void modify() {
-// if (m_recstatus==unmodified)
-// m_recstatus=UpdatePending;
-// }
-// protected:
-// void insertify() {m_recstatus=InsertPending; }
-// void unmodify() {m_recstatus=unmodified; }
-// recStatus m_recstatus;
-//TODO: Need to Document
-}; // wxDbTable
-
-
-// Change this to 0 to remove use of all deprecated functions
-#if wxODBC_BACKWARD_COMPATABILITY
-//#################################################################################
-//############### DEPRECATED functions for backward compatibility #################
-//#################################################################################
-
-// Backward compability. These will eventually go away
-typedef wxDbTable wxTable;
-typedef wxDbIdxDef wxIdxDef;
-typedef wxDbIdxDef CidxDef;
-typedef wxDbColDef wxColDef;
-typedef wxDbColDef CcolDef;
-typedef wxDbColDataPtr wxColDataPtr;
-typedef wxDbColDataPtr CcolDataPtr;
-
-const int ROWID = wxDB_ROWID_LEN;
-const int DEFAULT_CURSOR = wxDB_DEFAULT_CURSOR;
-const bool QUERY_ONLY = wxDB_QUERY_ONLY;
-const bool DISABLE_VIEW = wxDB_DISABLE_VIEW;
-#endif
-
-#endif
diff --git a/desmume/src/windows/wx/include/wx/dc.h b/desmume/src/windows/wx/include/wx/dc.h
deleted file mode 100644
index d4790403a..000000000
--- a/desmume/src/windows/wx/include/wx/dc.h
+++ /dev/null
@@ -1,1003 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dc.h
-// Purpose: wxDC class
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 05/25/99
-// RCS-ID: $Id: dc.h 55927 2008-09-28 09:12:16Z VS $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DC_H_BASE_
-#define _WX_DC_H_BASE_
-
-// ----------------------------------------------------------------------------
-// headers which we must include here
-// ----------------------------------------------------------------------------
-
-#include "wx/object.h" // the base class
-
-#include "wx/intl.h" // for wxLayoutDirection
-#include "wx/cursor.h" // we have member variables of these classes
-#include "wx/font.h" // so we can't do without them
-#include "wx/colour.h"
-#include "wx/bitmap.h" // for wxNullBitmap
-#include "wx/brush.h"
-#include "wx/pen.h"
-#include "wx/palette.h"
-#include "wx/list.h" // we use wxList in inline functions
-#include "wx/dynarray.h"
-#include "wx/math.h"
-
-class WXDLLIMPEXP_FWD_CORE wxDC;
-class WXDLLIMPEXP_FWD_CORE wxDCBase;
-
-class WXDLLEXPORT wxDrawObject
-{
-public:
-
- wxDrawObject()
- : m_isBBoxValid(false)
- , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
- { }
-
- virtual ~wxDrawObject() { }
-
- virtual void Draw(wxDCBase&) const { }
-
- virtual void CalcBoundingBox(wxCoord x, wxCoord y)
- {
- if ( m_isBBoxValid )
- {
- if ( x < m_minX ) m_minX = x;
- if ( y < m_minY ) m_minY = y;
- if ( x > m_maxX ) m_maxX = x;
- if ( y > m_maxY ) m_maxY = y;
- }
- else
- {
- m_isBBoxValid = true;
-
- m_minX = x;
- m_minY = y;
- m_maxX = x;
- m_maxY = y;
- }
- }
-
- void ResetBoundingBox()
- {
- m_isBBoxValid = false;
-
- m_minX = m_maxX = m_minY = m_maxY = 0;
- }
-
- // Get the final bounding box of the PostScript or Metafile picture.
-
- wxCoord MinX() const { return m_minX; }
- wxCoord MaxX() const { return m_maxX; }
- wxCoord MinY() const { return m_minY; }
- wxCoord MaxY() const { return m_maxY; }
-
- //to define the type of object for derived objects
- virtual int GetType()=0;
-
-protected:
- //for boundingbox calculation
- bool m_isBBoxValid:1;
- //for boundingbox calculation
- wxCoord m_minX, m_minY, m_maxX, m_maxY;
-};
-
-// ---------------------------------------------------------------------------
-// global variables
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-// wxDC is the device context - object on which any drawing is done
-// ---------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDCBase : public wxObject
-{
-public:
- wxDCBase()
- : m_colour(wxColourDisplay())
- , m_ok(true)
- , m_clipping(false)
- , m_isInteractive(0)
- , m_isBBoxValid(false)
- , m_logicalOriginX(0), m_logicalOriginY(0)
- , m_deviceOriginX(0), m_deviceOriginY(0)
- , m_logicalScaleX(1.0), m_logicalScaleY(1.0)
- , m_userScaleX(1.0), m_userScaleY(1.0)
- , m_scaleX(1.0), m_scaleY(1.0)
- , m_signX(1), m_signY(1)
- , m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
- , m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0)
- , m_logicalFunction(wxCOPY)
- , m_backgroundMode(wxTRANSPARENT)
- , m_mappingMode(wxMM_TEXT)
- , m_pen()
- , m_brush()
- , m_backgroundBrush(*wxTRANSPARENT_BRUSH)
- , m_textForegroundColour(*wxBLACK)
- , m_textBackgroundColour(*wxWHITE)
- , m_font()
-#if wxUSE_PALETTE
- , m_palette()
- , m_hasCustomPalette(false)
-#endif // wxUSE_PALETTE
- {
- ResetBoundingBox();
- ResetClipping();
- }
-
- virtual ~wxDCBase() { }
-
- // graphic primitives
- // ------------------
-
- virtual void DrawObject(wxDrawObject* drawobject)
- {
- drawobject->Draw(*this);
- CalcBoundingBox(drawobject->MinX(),drawobject->MinY());
- CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY());
- }
-
- bool FloodFill(wxCoord x, wxCoord y, const wxColour& col,
- int style = wxFLOOD_SURFACE)
- { return DoFloodFill(x, y, col, style); }
- bool FloodFill(const wxPoint& pt, const wxColour& col,
- int style = wxFLOOD_SURFACE)
- { return DoFloodFill(pt.x, pt.y, col, style); }
-
- // fill the area specified by rect with a radial gradient, starting from
- // initialColour in the centre of the cercle and fading to destColour.
- void GradientFillConcentric(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour)
- { GradientFillConcentric(rect, initialColour, destColour,
- wxPoint(rect.GetWidth() / 2,
- rect.GetHeight() / 2)); }
-
- void GradientFillConcentric(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- const wxPoint& circleCenter)
- { DoGradientFillConcentric(rect, initialColour, destColour, circleCenter); }
-
- // fill the area specified by rect with a linear gradient
- void GradientFillLinear(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- wxDirection nDirection = wxEAST)
- { DoGradientFillLinear(rect, initialColour, destColour, nDirection); }
-
- bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const
- { return DoGetPixel(x, y, col); }
- bool GetPixel(const wxPoint& pt, wxColour *col) const
- { return DoGetPixel(pt.x, pt.y, col); }
-
- void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
- { DoDrawLine(x1, y1, x2, y2); }
- void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
- { DoDrawLine(pt1.x, pt1.y, pt2.x, pt2.y); }
-
- void CrossHair(wxCoord x, wxCoord y)
- { DoCrossHair(x, y); }
- void CrossHair(const wxPoint& pt)
- { DoCrossHair(pt.x, pt.y); }
-
- void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
- wxCoord xc, wxCoord yc)
- { DoDrawArc(x1, y1, x2, y2, xc, yc); }
- void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
- { DoDrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); }
-
- void DrawCheckMark(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height)
- { DoDrawCheckMark(x, y, width, height); }
- void DrawCheckMark(const wxRect& rect)
- { DoDrawCheckMark(rect.x, rect.y, rect.width, rect.height); }
-
- void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
- double sa, double ea)
- { DoDrawEllipticArc(x, y, w, h, sa, ea); }
- void DrawEllipticArc(const wxPoint& pt, const wxSize& sz,
- double sa, double ea)
- { DoDrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); }
-
- void DrawPoint(wxCoord x, wxCoord y)
- { DoDrawPoint(x, y); }
- void DrawPoint(const wxPoint& pt)
- { DoDrawPoint(pt.x, pt.y); }
-
- void DrawLines(int n, wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0)
- { DoDrawLines(n, points, xoffset, yoffset); }
- void DrawLines(const wxList *list,
- wxCoord xoffset = 0, wxCoord yoffset = 0);
-
- void DrawPolygon(int n, wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- int fillStyle = wxODDEVEN_RULE)
- { DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); }
-
- void DrawPolygon(const wxList *list,
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- int fillStyle = wxODDEVEN_RULE);
-
- void DrawPolyPolygon(int n, int count[], wxPoint points[],
- wxCoord xoffset = 0, wxCoord yoffset = 0,
- int fillStyle = wxODDEVEN_RULE)
- { DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); }
-
- void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- { DoDrawRectangle(x, y, width, height); }
- void DrawRectangle(const wxPoint& pt, const wxSize& sz)
- { DoDrawRectangle(pt.x, pt.y, sz.x, sz.y); }
- void DrawRectangle(const wxRect& rect)
- { DoDrawRectangle(rect.x, rect.y, rect.width, rect.height); }
-
- void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height,
- double radius)
- { DoDrawRoundedRectangle(x, y, width, height, radius); }
- void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz,
- double radius)
- { DoDrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); }
- void DrawRoundedRectangle(const wxRect& r, double radius)
- { DoDrawRoundedRectangle(r.x, r.y, r.width, r.height, radius); }
-
- void DrawCircle(wxCoord x, wxCoord y, wxCoord radius)
- { DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); }
- void DrawCircle(const wxPoint& pt, wxCoord radius)
- { DrawCircle(pt.x, pt.y, radius); }
-
- void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- { DoDrawEllipse(x, y, width, height); }
- void DrawEllipse(const wxPoint& pt, const wxSize& sz)
- { DoDrawEllipse(pt.x, pt.y, sz.x, sz.y); }
- void DrawEllipse(const wxRect& rect)
- { DoDrawEllipse(rect.x, rect.y, rect.width, rect.height); }
-
- void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
- { DoDrawIcon(icon, x, y); }
- void DrawIcon(const wxIcon& icon, const wxPoint& pt)
- { DoDrawIcon(icon, pt.x, pt.y); }
-
- void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
- bool useMask = false)
- { DoDrawBitmap(bmp, x, y, useMask); }
- void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt,
- bool useMask = false)
- { DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
-
- void DrawText(const wxString& text, wxCoord x, wxCoord y)
- { DoDrawText(text, x, y); }
- void DrawText(const wxString& text, const wxPoint& pt)
- { DoDrawText(text, pt.x, pt.y); }
-
- void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
- { DoDrawRotatedText(text, x, y, angle); }
- void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle)
- { DoDrawRotatedText(text, pt.x, pt.y, angle); }
-
- // this version puts both optional bitmap and the text into the given
- // rectangle and aligns is as specified by alignment parameter; it also
- // will emphasize the character with the given index if it is != -1 and
- // return the bounding rectangle if required
- virtual void DrawLabel(const wxString& text,
- const wxBitmap& image,
- const wxRect& rect,
- int alignment = wxALIGN_LEFT | wxALIGN_TOP,
- int indexAccel = -1,
- wxRect *rectBounding = NULL);
-
- void DrawLabel(const wxString& text, const wxRect& rect,
- int alignment = wxALIGN_LEFT | wxALIGN_TOP,
- int indexAccel = -1)
- { DrawLabel(text, wxNullBitmap, rect, alignment, indexAccel); }
-
- bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
- wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
- {
- return DoBlit(xdest, ydest, width, height,
- source, xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask);
- }
- bool Blit(const wxPoint& destPt, const wxSize& sz,
- wxDC *source, const wxPoint& srcPt,
- int rop = wxCOPY, bool useMask = false, const wxPoint& srcPtMask = wxDefaultPosition)
- {
- return DoBlit(destPt.x, destPt.y, sz.x, sz.y,
- source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y);
- }
-
- wxBitmap GetAsBitmap(const wxRect *subrect = (const wxRect *) NULL) const
- {
- return DoGetAsBitmap(subrect);
- }
-
-#if wxUSE_SPLINES
- // TODO: this API needs fixing (wxPointList, why (!const) "wxList *"?)
- void DrawSpline(wxCoord x1, wxCoord y1,
- wxCoord x2, wxCoord y2,
- wxCoord x3, wxCoord y3);
- void DrawSpline(int n, wxPoint points[]);
-
- void DrawSpline(wxList *points) { DoDrawSpline(points); }
-#endif // wxUSE_SPLINES
-
- // Eventually we will have wxUSE_GENERIC_DRAWELLIPSE
-#ifdef __WXWINCE__
- //! Generic method to draw ellipses, circles and arcs with current pen and brush.
- /*! \param x Upper left corner of bounding box.
- * \param y Upper left corner of bounding box.
- * \param w Width of bounding box.
- * \param h Height of bounding box.
- * \param sa Starting angle of arc
- * (counterclockwise, start at 3 o'clock, 360 is full circle).
- * \param ea Ending angle of arc.
- * \param angle Rotation angle, the Arc will be rotated after
- * calculating begin and end.
- */
- void DrawEllipticArcRot( wxCoord x, wxCoord y,
- wxCoord width, wxCoord height,
- double sa = 0, double ea = 0, double angle = 0 )
- { DoDrawEllipticArcRot( x, y, width, height, sa, ea, angle ); }
-
- void DrawEllipticArcRot( const wxPoint& pt,
- const wxSize& sz,
- double sa = 0, double ea = 0, double angle = 0 )
- { DoDrawEllipticArcRot( pt.x, pt.y, sz.x, sz.y, sa, ea, angle ); }
-
- void DrawEllipticArcRot( const wxRect& rect,
- double sa = 0, double ea = 0, double angle = 0 )
- { DoDrawEllipticArcRot( rect.x, rect.y, rect.width, rect.height, sa, ea, angle ); }
-
- virtual void DoDrawEllipticArcRot( wxCoord x, wxCoord y,
- wxCoord w, wxCoord h,
- double sa = 0, double ea = 0, double angle = 0 );
-
- //! Rotates points around center.
- /*! This is a quite straight method, it calculates in pixels
- * and so it produces rounding errors.
- * \param points The points inside will be rotated.
- * \param angle Rotating angle (counterclockwise, start at 3 o'clock, 360 is full circle).
- * \param center Center of rotation.
- */
- void Rotate( wxList* points, double angle, wxPoint center = wxPoint(0,0) );
-
- // used by DrawEllipticArcRot
- // Careful: wxList gets filled with points you have to delete later.
- void CalculateEllipticPoints( wxList* points,
- wxCoord xStart, wxCoord yStart,
- wxCoord w, wxCoord h,
- double sa, double ea );
-#endif
-
- // global DC operations
- // --------------------
-
- virtual void Clear() = 0;
-
- virtual bool StartDoc(const wxString& WXUNUSED(message)) { return true; }
- virtual void EndDoc() { }
-
- virtual void StartPage() { }
- virtual void EndPage() { }
-
-#if WXWIN_COMPATIBILITY_2_6
- wxDEPRECATED( void BeginDrawing() );
- wxDEPRECATED( void EndDrawing() );
-#endif // WXWIN_COMPATIBILITY_2_6
-
-
- // set objects to use for drawing
- // ------------------------------
-
- virtual void SetFont(const wxFont& font) = 0;
- virtual void SetPen(const wxPen& pen) = 0;
- virtual void SetBrush(const wxBrush& brush) = 0;
- virtual void SetBackground(const wxBrush& brush) = 0;
- virtual void SetBackgroundMode(int mode) = 0;
-#if wxUSE_PALETTE
- virtual void SetPalette(const wxPalette& palette) = 0;
-#endif // wxUSE_PALETTE
-
- // clipping region
- // ---------------
-
- void SetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
- { DoSetClippingRegion(x, y, width, height); }
- void SetClippingRegion(const wxPoint& pt, const wxSize& sz)
- { DoSetClippingRegion(pt.x, pt.y, sz.x, sz.y); }
- void SetClippingRegion(const wxRect& rect)
- { DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height); }
- void SetClippingRegion(const wxRegion& region)
- { DoSetClippingRegionAsRegion(region); }
-
- virtual void DestroyClippingRegion() { ResetClipping(); }
-
- void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const
- { DoGetClippingBox(x, y, w, h); }
- void GetClippingBox(wxRect& rect) const
- {
- DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height);
- }
-
- // text extent
- // -----------
-
- virtual wxCoord GetCharHeight() const = 0;
- virtual wxCoord GetCharWidth() const = 0;
-
- // only works for single line strings
- void GetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const
- { DoGetTextExtent(string, x, y, descent, externalLeading, theFont); }
-
- wxSize GetTextExtent(const wxString& string) const
- {
- wxCoord w, h;
- DoGetTextExtent(string, &w, &h);
- return wxSize(w, h);
- }
-
- // works for single as well as multi-line strings
- virtual void GetMultiLineTextExtent(const wxString& string,
- wxCoord *width,
- wxCoord *height,
- wxCoord *heightLine = NULL,
- wxFont *font = NULL) const;
-
- wxSize GetMultiLineTextExtent(const wxString& string) const
- {
- wxCoord w, h;
- GetMultiLineTextExtent(string, &w, &h);
- return wxSize(w, h);
- }
-
- // Measure cumulative width of text after each character
- bool GetPartialTextExtents(const wxString& text, wxArrayInt& widths) const
- { return DoGetPartialTextExtents(text, widths); }
-
- // size and resolution
- // -------------------
-
- // in device units
- void GetSize(int *width, int *height) const
- { DoGetSize(width, height); }
- wxSize GetSize() const
- {
- int w, h;
- DoGetSize(&w, &h);
-
- return wxSize(w, h);
- }
-
- // in mm
- void GetSizeMM(int* width, int* height) const
- { DoGetSizeMM(width, height); }
- wxSize GetSizeMM() const
- {
- int w, h;
- DoGetSizeMM(&w, &h);
-
- return wxSize(w, h);
- }
-
- // coordinates conversions
- // -----------------------
-
- // This group of functions does actual conversion of the input, as you'd
- // expect.
- wxCoord DeviceToLogicalX(wxCoord x) const;
- wxCoord DeviceToLogicalY(wxCoord y) const;
- wxCoord DeviceToLogicalXRel(wxCoord x) const;
- wxCoord DeviceToLogicalYRel(wxCoord y) const;
- wxCoord LogicalToDeviceX(wxCoord x) const;
- wxCoord LogicalToDeviceY(wxCoord y) const;
- wxCoord LogicalToDeviceXRel(wxCoord x) const;
- wxCoord LogicalToDeviceYRel(wxCoord y) const;
-
- // query DC capabilities
- // ---------------------
-
- virtual bool CanDrawBitmap() const = 0;
- virtual bool CanGetTextExtent() const = 0;
-
- // colour depth
- virtual int GetDepth() const = 0;
-
- // Resolution in Pixels per inch
- virtual wxSize GetPPI() const = 0;
-
- virtual bool Ok() const { return IsOk(); }
- virtual bool IsOk() const { return m_ok; }
-
- // accessors and setters
- // ---------------------
-
- virtual int GetBackgroundMode() const { return m_backgroundMode; }
- virtual const wxBrush& GetBackground() const { return m_backgroundBrush; }
- virtual const wxBrush& GetBrush() const { return m_brush; }
- virtual const wxFont& GetFont() const { return m_font; }
- virtual const wxPen& GetPen() const { return m_pen; }
-
- virtual const wxColour& GetTextForeground() const { return m_textForegroundColour; }
- virtual const wxColour& GetTextBackground() const { return m_textBackgroundColour; }
- virtual void SetTextForeground(const wxColour& colour)
- { m_textForegroundColour = colour; }
- virtual void SetTextBackground(const wxColour& colour)
- { m_textBackgroundColour = colour; }
-
- virtual int GetMapMode() const { return m_mappingMode; }
- virtual void SetMapMode(int mode) = 0;
-
- virtual void GetUserScale(double *x, double *y) const
- {
- if ( x ) *x = m_userScaleX;
- if ( y ) *y = m_userScaleY;
- }
- virtual void SetUserScale(double x, double y) = 0;
-
- virtual void GetLogicalScale(double *x, double *y)
- {
- if ( x ) *x = m_logicalScaleX;
- if ( y ) *y = m_logicalScaleY;
- }
- virtual void SetLogicalScale(double x, double y)
- {
- m_logicalScaleX = x;
- m_logicalScaleY = y;
- }
-
- void GetLogicalOrigin(wxCoord *x, wxCoord *y) const
- { DoGetLogicalOrigin(x, y); }
- wxPoint GetLogicalOrigin() const
- { wxCoord x, y; DoGetLogicalOrigin(&x, &y); return wxPoint(x, y); }
- virtual void SetLogicalOrigin(wxCoord x, wxCoord y) = 0;
-
- void GetDeviceOrigin(wxCoord *x, wxCoord *y) const
- { DoGetDeviceOrigin(x, y); }
- wxPoint GetDeviceOrigin() const
- { wxCoord x, y; DoGetDeviceOrigin(&x, &y); return wxPoint(x, y); }
- virtual void SetDeviceOrigin(wxCoord x, wxCoord y) = 0;
-
- virtual void ComputeScaleAndOrigin() {}
-
- virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp) = 0;
-
- virtual int GetLogicalFunction() const { return m_logicalFunction; }
- virtual void SetLogicalFunction(int function) = 0;
-
-#if WXWIN_COMPATIBILITY_2_4
- virtual void SetOptimization(bool WXUNUSED(opt)) { }
- virtual bool GetOptimization() { return false; }
-#endif
-
- // bounding box
- // ------------
-
- virtual void CalcBoundingBox(wxCoord x, wxCoord y)
- {
- if ( m_isBBoxValid )
- {
- if ( x < m_minX ) m_minX = x;
- if ( y < m_minY ) m_minY = y;
- if ( x > m_maxX ) m_maxX = x;
- if ( y > m_maxY ) m_maxY = y;
- }
- else
- {
- m_isBBoxValid = true;
-
- m_minX = x;
- m_minY = y;
- m_maxX = x;
- m_maxY = y;
- }
- }
-
- void ResetBoundingBox()
- {
- m_isBBoxValid = false;
-
- m_minX = m_maxX = m_minY = m_maxY = 0;
- }
-
- // Get the final bounding box of the PostScript or Metafile picture.
- wxCoord MinX() const { return m_minX; }
- wxCoord MaxX() const { return m_maxX; }
- wxCoord MinY() const { return m_minY; }
- wxCoord MaxY() const { return m_maxY; }
-
- // misc old functions
- // ------------------
-
- // for compatibility with the old code when wxCoord was long everywhere
- void GetTextExtent(const wxString& string,
- long *x, long *y,
- long *descent = NULL,
- long *externalLeading = NULL,
- wxFont *theFont = NULL) const
- {
- wxCoord x2, y2, descent2, externalLeading2;
- DoGetTextExtent(string, &x2, &y2,
- &descent2, &externalLeading2,
- theFont);
- if ( x )
- *x = x2;
- if ( y )
- *y = y2;
- if ( descent )
- *descent = descent2;
- if ( externalLeading )
- *externalLeading = externalLeading2;
- }
-
- void GetLogicalOrigin(long *x, long *y) const
- {
- wxCoord x2, y2;
- DoGetLogicalOrigin(&x2, &y2);
- if ( x )
- *x = x2;
- if ( y )
- *y = y2;
- }
-
- void GetDeviceOrigin(long *x, long *y) const
- {
- wxCoord x2, y2;
- DoGetDeviceOrigin(&x2, &y2);
- if ( x )
- *x = x2;
- if ( y )
- *y = y2;
- }
- void GetClippingBox(long *x, long *y, long *w, long *h) const
- {
- wxCoord xx,yy,ww,hh;
- DoGetClippingBox(&xx, &yy, &ww, &hh);
- if (x) *x = xx;
- if (y) *y = yy;
- if (w) *w = ww;
- if (h) *h = hh;
- }
-
- // RTL related functions
- // ---------------------
-
- // get or change the layout direction (LTR or RTL) for this dc,
- // wxLayout_Default is returned if layout direction is not supported
- virtual wxLayoutDirection GetLayoutDirection() const
- { return wxLayout_Default; }
- virtual void SetLayoutDirection(wxLayoutDirection WXUNUSED(dir))
- { }
-
-protected:
- // the pure virtual functions which should be implemented by wxDC
- virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
- int style = wxFLOOD_SURFACE) = 0;
-
- virtual void DoGradientFillLinear(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- wxDirection nDirection = wxEAST);
-
- virtual void DoGradientFillConcentric(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- const wxPoint& circleCenter);
-
- virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0;
-
- virtual void DoDrawPoint(wxCoord x, wxCoord y) = 0;
- virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) = 0;
-
- virtual void DoDrawArc(wxCoord x1, wxCoord y1,
- wxCoord x2, wxCoord y2,
- wxCoord xc, wxCoord yc) = 0;
- virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height);
- virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
- double sa, double ea) = 0;
-
- virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) = 0;
- virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height,
- double radius) = 0;
- virtual void DoDrawEllipse(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height) = 0;
-
- virtual void DoCrossHair(wxCoord x, wxCoord y) = 0;
-
- virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) = 0;
- virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
- bool useMask = false) = 0;
-
- virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) = 0;
- virtual void DoDrawRotatedText(const wxString& text,
- wxCoord x, wxCoord y, double angle) = 0;
-
- virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
- wxCoord width, wxCoord height,
- wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) = 0;
-
- virtual wxBitmap DoGetAsBitmap(const wxRect *WXUNUSED(subrect)) const { return wxNullBitmap; }
-
- virtual void DoGetSize(int *width, int *height) const = 0;
- virtual void DoGetSizeMM(int* width, int* height) const = 0;
-
- virtual void DoDrawLines(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset) = 0;
- virtual void DoDrawPolygon(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- int fillStyle = wxODDEVEN_RULE) = 0;
- virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- int fillStyle);
-
- virtual void DoSetClippingRegionAsRegion(const wxRegion& region) = 0;
- virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height) = 0;
-
-#if WXWIN_COMPATIBILITY_2_4
- // this was only for confusing people, use DoGetClippingBox only
- virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y,
- wxCoord *w, wxCoord *h)
- { DoGetClippingBox(x, y, w, h); }
-#endif
-
- virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
- wxCoord *w, wxCoord *h) const
- {
- if ( x )
- *x = m_clipX1;
- if ( y )
- *y = m_clipY1;
- if ( w )
- *w = m_clipX2 - m_clipX1;
- if ( h )
- *h = m_clipY2 - m_clipY1;
- }
-
- virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const
- {
- if ( x ) *x = m_logicalOriginX;
- if ( y ) *y = m_logicalOriginY;
- }
-
- virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const
- {
- if ( x ) *x = m_deviceOriginX;
- if ( y ) *y = m_deviceOriginY;
- }
-
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const = 0;
-
- virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
-
-#if wxUSE_SPLINES
- virtual void DoDrawSpline(wxList *points);
-#endif
-
-#if wxABI_VERSION >= 20810
- // returns adjustment factor for converting wxFont "point size"; in wx
- // it is point size on screen and needs to be multiplied by this value
- // for rendering on higher-resolution DCs such as printer ones
- static float GetFontPointSizeAdjustment(float dpi);
-#endif
-
-protected:
- // unset clipping variables (after clipping region was destroyed)
- void ResetClipping()
- {
- m_clipping = false;
-
- m_clipX1 = m_clipX2 = m_clipY1 = m_clipY2 = 0;
- }
-
- // flags
- bool m_colour:1;
- bool m_ok:1;
- bool m_clipping:1;
- bool m_isInteractive:1;
- bool m_isBBoxValid:1;
-
- // coordinate system variables
-
- // TODO short descriptions of what exactly they are would be nice...
-
- wxCoord m_logicalOriginX, m_logicalOriginY;
- wxCoord m_deviceOriginX, m_deviceOriginY;
-
- double m_logicalScaleX, m_logicalScaleY;
- double m_userScaleX, m_userScaleY;
- double m_scaleX, m_scaleY;
-
- // Used by SetAxisOrientation() to invert the axes
- int m_signX, m_signY;
-
- // bounding and clipping boxes
- wxCoord m_minX, m_minY, m_maxX, m_maxY;
- wxCoord m_clipX1, m_clipY1, m_clipX2, m_clipY2;
-
- int m_logicalFunction;
- int m_backgroundMode;
- int m_mappingMode;
-
- // GDI objects
- wxPen m_pen;
- wxBrush m_brush;
- wxBrush m_backgroundBrush;
- wxColour m_textForegroundColour;
- wxColour m_textBackgroundColour;
- wxFont m_font;
-
-#if wxUSE_PALETTE
- wxPalette m_palette;
- bool m_hasCustomPalette;
-#endif // wxUSE_PALETTE
-
-private:
- DECLARE_NO_COPY_CLASS(wxDCBase)
- DECLARE_ABSTRACT_CLASS(wxDCBase)
-};
-
-// ----------------------------------------------------------------------------
-// now include the declaration of wxDC class
-// ----------------------------------------------------------------------------
-
-#if defined(__WXPALMOS__)
- #include "wx/palmos/dc.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/dc.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/dc.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dc.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/dc.h"
-#elif defined(__WXX11__)
- #include "wx/x11/dc.h"
-#elif defined(__WXMGL__)
- #include "wx/mgl/dc.h"
-#elif defined(__WXDFB__)
- #include "wx/dfb/dc.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/dc.h"
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/dc.h"
-#elif defined(__WXPM__)
- #include "wx/os2/dc.h"
-#endif
-
-#if wxUSE_GRAPHICS_CONTEXT
- #include "wx/dcgraph.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// helper class: you can use it to temporarily change the DC text colour and
-// restore it automatically when the object goes out of scope
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDCTextColourChanger
-{
-public:
- wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { }
-
- wxDCTextColourChanger(wxDC& dc, const wxColour& col) : m_dc(dc)
- {
- Set(col);
- }
-
- ~wxDCTextColourChanger()
- {
- if ( m_colFgOld.Ok() )
- m_dc.SetTextForeground(m_colFgOld);
- }
-
- void Set(const wxColour& col)
- {
- if ( !m_colFgOld.Ok() )
- m_colFgOld = m_dc.GetTextForeground();
- m_dc.SetTextForeground(col);
- }
-
-private:
- wxDC& m_dc;
-
- wxColour m_colFgOld;
-
- DECLARE_NO_COPY_CLASS(wxDCTextColourChanger)
-};
-
-// ----------------------------------------------------------------------------
-// helper class: you can use it to temporarily change the DC pen and
-// restore it automatically when the object goes out of scope
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDCPenChanger
-{
-public:
- wxDCPenChanger(wxDC& dc, const wxPen& pen) : m_dc(dc), m_penOld(dc.GetPen())
- {
- m_dc.SetPen(pen);
- }
-
- ~wxDCPenChanger()
- {
- if ( m_penOld.Ok() )
- m_dc.SetPen(m_penOld);
- }
-
-private:
- wxDC& m_dc;
-
- wxPen m_penOld;
-
- DECLARE_NO_COPY_CLASS(wxDCPenChanger)
-};
-
-// ----------------------------------------------------------------------------
-// helper class: you can use it to temporarily change the DC brush and
-// restore it automatically when the object goes out of scope
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDCBrushChanger
-{
-public:
- wxDCBrushChanger(wxDC& dc, const wxBrush& brush) : m_dc(dc), m_brushOld(dc.GetBrush())
- {
- m_dc.SetBrush(brush);
- }
-
- ~wxDCBrushChanger()
- {
- if ( m_brushOld.Ok() )
- m_dc.SetBrush(m_brushOld);
- }
-
-private:
- wxDC& m_dc;
-
- wxBrush m_brushOld;
-
- DECLARE_NO_COPY_CLASS(wxDCBrushChanger)
-};
-
-// ----------------------------------------------------------------------------
-// another small helper class: sets the clipping region in its ctor and
-// destroys it in the dtor
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDCClipper
-{
-public:
- wxDCClipper(wxDC& dc, const wxRegion& r) : m_dc(dc)
- { dc.SetClippingRegion(r); }
- wxDCClipper(wxDC& dc, const wxRect& r) : m_dc(dc)
- { dc.SetClippingRegion(r.x, r.y, r.width, r.height); }
- wxDCClipper(wxDC& dc, wxCoord x, wxCoord y, wxCoord w, wxCoord h) : m_dc(dc)
- { dc.SetClippingRegion(x, y, w, h); }
-
- ~wxDCClipper() { m_dc.DestroyClippingRegion(); }
-
-private:
- wxDC& m_dc;
-
- DECLARE_NO_COPY_CLASS(wxDCClipper)
-};
-
-#endif // _WX_DC_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dcbuffer.h b/desmume/src/windows/wx/include/wx/dcbuffer.h
deleted file mode 100644
index 46c28ba53..000000000
--- a/desmume/src/windows/wx/include/wx/dcbuffer.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcbuffer.h
-// Purpose: wxBufferedDC class
-// Author: Ron Lee
-// Modified by: Vadim Zeitlin (refactored, added bg preservation)
-// Created: 16/03/02
-// RCS-ID: $Id: dcbuffer.h 44609 2007-03-05 08:58:09Z VZ $
-// Copyright: (c) Ron Lee
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCBUFFER_H_
-#define _WX_DCBUFFER_H_
-
-#include "wx/dcmemory.h"
-#include "wx/dcclient.h"
-#include "wx/window.h"
-
-// Split platforms into two groups - those which have well-working
-// double-buffering by default, and those which do not.
-#if defined(__WXMAC__) || defined(__WXGTK20__) || defined(__WXDFB__)
- #define wxALWAYS_NATIVE_DOUBLE_BUFFER 1
-#else
- #define wxALWAYS_NATIVE_DOUBLE_BUFFER 0
-#endif
-
-
-// ----------------------------------------------------------------------------
-// Double buffering helper.
-// ----------------------------------------------------------------------------
-
-// Assumes the buffer bitmap covers the entire scrolled window,
-// and prepares the window DC accordingly
-#define wxBUFFER_VIRTUAL_AREA 0x01
-
-// Assumes the buffer bitmap only covers the client area;
-// does not prepare the window DC
-#define wxBUFFER_CLIENT_AREA 0x02
-
-class WXDLLEXPORT wxBufferedDC : public wxMemoryDC
-{
-public:
- // Default ctor, must subsequently call Init for two stage construction.
- wxBufferedDC()
- : m_dc(NULL),
- m_buffer(NULL),
- m_style(0)
- {
- }
-
- // Construct a wxBufferedDC using a user supplied buffer.
- wxBufferedDC(wxDC *dc,
- wxBitmap& buffer = wxNullBitmap,
- int style = wxBUFFER_CLIENT_AREA)
- : m_dc(NULL), m_buffer(NULL)
- {
- Init(dc, buffer, style);
- }
-
- // Construct a wxBufferedDC with an internal buffer of 'area'
- // (where area is usually something like the size of the window
- // being buffered)
- wxBufferedDC(wxDC *dc, const wxSize& area, int style = wxBUFFER_CLIENT_AREA)
- : m_dc(NULL), m_buffer(NULL)
- {
- Init(dc, area, style);
- }
-
- // The usually desired action in the dtor is to blit the buffer.
- virtual ~wxBufferedDC()
- {
- if ( m_dc )
- UnMask();
- }
-
- // These reimplement the actions of the ctors for two stage creation
- void Init(wxDC *dc,
- wxBitmap& buffer = wxNullBitmap,
- int style = wxBUFFER_CLIENT_AREA)
- {
- InitCommon(dc, style);
-
- m_buffer = &buffer;
-
- UseBuffer();
- }
-
- void Init(wxDC *dc, const wxSize &area, int style = wxBUFFER_CLIENT_AREA)
- {
- InitCommon(dc, style);
-
- UseBuffer(area.x, area.y);
- }
-
- // Blits the buffer to the dc, and detaches the dc from the buffer (so it
- // can be effectively used once only).
- //
- // Usually called in the dtor or by the dtor of derived classes if the
- // BufferedDC must blit before the derived class (which may own the dc it's
- // blitting to) is destroyed.
- void UnMask()
- {
- wxCHECK_RET( m_dc, _T("no underlying wxDC?") );
- wxASSERT_MSG( m_buffer && m_buffer->IsOk(), _T("invalid backing store") );
-
- wxCoord x = 0,
- y = 0;
-
- if ( m_style & wxBUFFER_CLIENT_AREA )
- GetDeviceOrigin(&x, &y);
-
- m_dc->Blit(0, 0, m_buffer->GetWidth(), m_buffer->GetHeight(),
- this, -x, -y );
- m_dc = NULL;
- }
-
- // Set and get the style
- void SetStyle(int style) { m_style = style; }
- int GetStyle() const { return m_style; }
-
-private:
- // common part of Init()s
- void InitCommon(wxDC *dc, int style)
- {
- wxASSERT_MSG( !m_dc, _T("wxBufferedDC already initialised") );
-
- m_dc = dc;
- m_style = style;
-
- // inherit the same layout direction as the original DC
- if (dc && dc->IsOk())
- SetLayoutDirection(dc->GetLayoutDirection());
- }
-
- // check that the bitmap is valid and use it
- void UseBuffer(wxCoord w = -1, wxCoord h = -1);
-
- // the underlying DC to which we copy everything drawn on this one in
- // UnMask()
- //
- // NB: Without the existence of a wxNullDC, this must be a pointer, else it
- // could probably be a reference.
- wxDC *m_dc;
-
- // the buffer (selected in this DC), initially invalid
- wxBitmap *m_buffer;
-
- // the buffering style
- int m_style;
-
- DECLARE_DYNAMIC_CLASS(wxBufferedDC)
- DECLARE_NO_COPY_CLASS(wxBufferedDC)
-};
-
-
-// ----------------------------------------------------------------------------
-// Double buffered PaintDC.
-// ----------------------------------------------------------------------------
-
-// Creates a double buffered wxPaintDC, optionally allowing the
-// user to specify their own buffer to use.
-class WXDLLEXPORT wxBufferedPaintDC : public wxBufferedDC
-{
-public:
- // If no bitmap is supplied by the user, a temporary one will be created.
- wxBufferedPaintDC(wxWindow *window, wxBitmap& buffer, int style = wxBUFFER_CLIENT_AREA)
- : m_paintdc(window)
- {
- // If we're buffering the virtual window, scale the paint DC as well
- if (style & wxBUFFER_VIRTUAL_AREA)
- window->PrepareDC( m_paintdc );
-
- if( buffer.IsOk() )
- Init(&m_paintdc, buffer, style);
- else
- Init(&m_paintdc, GetBufferedSize(window, style), style);
- }
-
- // If no bitmap is supplied by the user, a temporary one will be created.
- wxBufferedPaintDC(wxWindow *window, int style = wxBUFFER_CLIENT_AREA)
- : m_paintdc(window)
- {
- // If we're using the virtual window, scale the paint DC as well
- if (style & wxBUFFER_VIRTUAL_AREA)
- window->PrepareDC( m_paintdc );
-
- Init(&m_paintdc, GetBufferedSize(window, style), style);
- }
-
- // default copy ctor ok.
-
- virtual ~wxBufferedPaintDC()
- {
- // We must UnMask here, else by the time the base class
- // does it, the PaintDC will have already been destroyed.
- UnMask();
- }
-
-protected:
- // return the size needed by the buffer: this depends on whether we're
- // buffering just the currently shown part or the total (scrolled) window
- static wxSize GetBufferedSize(wxWindow *window, int style)
- {
- return style & wxBUFFER_VIRTUAL_AREA ? window->GetVirtualSize()
- : window->GetClientSize();
- }
-
-private:
- wxPaintDC m_paintdc;
-
- DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC)
- DECLARE_NO_COPY_CLASS(wxBufferedPaintDC)
-};
-
-
-
-//
-// wxAutoBufferedPaintDC is a wxPaintDC in toolkits which have double-
-// buffering by default. Otherwise it is a wxBufferedPaintDC. Thus,
-// you can only expect it work with a simple constructor that
-// accepts single wxWindow* argument.
-//
-#if wxALWAYS_NATIVE_DOUBLE_BUFFER
- #define wxAutoBufferedPaintDCBase wxPaintDC
-#else
- #define wxAutoBufferedPaintDCBase wxBufferedPaintDC
-#endif
-
-
-#ifdef __WXDEBUG__
-
-class wxAutoBufferedPaintDC : public wxAutoBufferedPaintDCBase
-{
-public:
-
- wxAutoBufferedPaintDC(wxWindow* win)
- : wxAutoBufferedPaintDCBase(win)
- {
- TestWinStyle(win);
- }
-
- virtual ~wxAutoBufferedPaintDC() { }
-
-private:
-
- void TestWinStyle(wxWindow* win)
- {
- // Help the user to get the double-buffering working properly.
- wxASSERT_MSG( win->GetBackgroundStyle() == wxBG_STYLE_CUSTOM,
- wxT("In constructor, you need to call SetBackgroundStyle(wxBG_STYLE_CUSTOM), ")
- wxT("and also, if needed, paint the background manually in the paint event handler."));
- }
-
- DECLARE_NO_COPY_CLASS(wxAutoBufferedPaintDC)
-};
-
-#else // !__WXDEBUG__
-
-// In release builds, just use typedef
-typedef wxAutoBufferedPaintDCBase wxAutoBufferedPaintDC;
-
-#endif
-
-
-// Check if the window is natively double buffered and will return a wxPaintDC
-// if it is, a wxBufferedPaintDC otherwise. It is the caller's responsibility
-// to delete the wxDC pointer when finished with it.
-inline wxDC* wxAutoBufferedPaintDCFactory(wxWindow* window)
-{
- if ( window->IsDoubleBuffered() )
- return new wxPaintDC(window);
- else
- return new wxBufferedPaintDC(window);
-}
-
-#endif // _WX_DCBUFFER_H_
diff --git a/desmume/src/windows/wx/include/wx/dcclient.h b/desmume/src/windows/wx/include/wx/dcclient.h
deleted file mode 100644
index c8bc31a15..000000000
--- a/desmume/src/windows/wx/include/wx/dcclient.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcclient.h
-// Purpose: wxClientDC base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dcclient.h 40865 2006-08-27 09:42:42Z VS $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCCLIENT_H_BASE_
-#define _WX_DCCLIENT_H_BASE_
-
-#include "wx/defs.h"
-
-#if defined(__WXPALMOS__)
-#include "wx/palmos/dcclient.h"
-#elif defined(__WXMSW__)
-#include "wx/msw/dcclient.h"
-#elif defined(__WXMOTIF__)
-#include "wx/motif/dcclient.h"
-#elif defined(__WXGTK20__)
-#include "wx/gtk/dcclient.h"
-#elif defined(__WXGTK__)
-#include "wx/gtk1/dcclient.h"
-#elif defined(__WXX11__)
-#include "wx/x11/dcclient.h"
-#elif defined(__WXMGL__)
-#include "wx/mgl/dcclient.h"
-#elif defined(__WXDFB__)
-#include "wx/dfb/dcclient.h"
-#elif defined(__WXMAC__)
-#include "wx/mac/dcclient.h"
-#elif defined(__WXCOCOA__)
-#include "wx/cocoa/dcclient.h"
-#elif defined(__WXPM__)
-#include "wx/os2/dcclient.h"
-#endif
-
-#endif
- // _WX_DCCLIENT_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dcgraph.h b/desmume/src/windows/wx/include/wx/dcgraph.h
deleted file mode 100644
index e94996657..000000000
--- a/desmume/src/windows/wx/include/wx/dcgraph.h
+++ /dev/null
@@ -1,190 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/graphdc.h
-// Purpose: graphics context device bridge header
-// Author: Stefan Csomor
-// Modified by:
-// Created:
-// Copyright: (c) Stefan Csomor
-// RCS-ID: $Id: dcgraph.h 53390 2008-04-28 04:19:15Z KO $
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_GRAPHICS_DC_H_
-#define _WX_GRAPHICS_DC_H_
-
-#if wxUSE_GRAPHICS_CONTEXT
-
-#include "wx/geometry.h"
-#include "wx/dynarray.h"
-#include "wx/graphics.h"
-
-class WXDLLEXPORT wxWindowDC;
-
-#ifdef __WXMAC__
-#define wxGCDC wxDC
-#endif
-
-class WXDLLEXPORT wxGCDC:
-#ifdef __WXMAC__
- public wxDCBase
-#else
- public wxDC
-#endif
-{
- DECLARE_DYNAMIC_CLASS(wxGCDC)
- DECLARE_NO_COPY_CLASS(wxGCDC)
-
-public:
- wxGCDC(const wxWindowDC& dc);
-#ifdef __WXMSW__
- wxGCDC( const wxMemoryDC& dc);
-#endif
- wxGCDC();
- virtual ~wxGCDC();
-
- void Init();
-
-
- // implement base class pure virtuals
- // ----------------------------------
-
- virtual void Clear();
-
- virtual bool StartDoc( const wxString& message );
- virtual void EndDoc();
-
- virtual void StartPage();
- virtual void EndPage();
-
- // to be virtualized on next major
- // flushing the content of this dc immediately onto screen
- void Flush();
-
- virtual void SetFont(const wxFont& font);
- virtual void SetPen(const wxPen& pen);
- virtual void SetBrush(const wxBrush& brush);
- virtual void SetBackground(const wxBrush& brush);
- virtual void SetBackgroundMode(int mode);
- virtual void SetPalette(const wxPalette& palette);
-
- virtual void DestroyClippingRegion();
-
- virtual wxCoord GetCharHeight() const;
- virtual wxCoord GetCharWidth() const;
-
- virtual bool CanDrawBitmap() const;
- virtual bool CanGetTextExtent() const;
- virtual int GetDepth() const;
- virtual wxSize GetPPI() const;
-
- virtual void SetMapMode(int mode);
- virtual void SetUserScale(double x, double y);
-
- virtual void SetLogicalScale(double x, double y);
- virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
- virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
- virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
- virtual void SetLogicalFunction(int function);
-
- virtual void SetTextForeground(const wxColour& colour);
- virtual void SetTextBackground(const wxColour& colour);
-
- virtual void ComputeScaleAndOrigin();
-
- wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; }
- virtual void SetGraphicsContext( wxGraphicsContext* ctx );
-
-protected:
- // the true implementations
- virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
- int style = wxFLOOD_SURFACE);
-
- virtual void DoGradientFillLinear(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- wxDirection nDirection = wxEAST);
-
- virtual void DoGradientFillConcentric(const wxRect& rect,
- const wxColour& initialColour,
- const wxColour& destColour,
- const wxPoint& circleCenter);
-
- virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const;
-
- virtual void DoDrawPoint(wxCoord x, wxCoord y);
-
-#if wxUSE_SPLINES
- virtual void DoDrawSpline(wxList *points);
-#endif
-
- virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
-
- virtual void DoDrawArc(wxCoord x1, wxCoord y1,
- wxCoord x2, wxCoord y2,
- wxCoord xc, wxCoord yc);
-
- virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height);
-
- virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
- double sa, double ea);
-
- virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
- virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height,
- double radius);
- virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
-
- virtual void DoCrossHair(wxCoord x, wxCoord y);
-
- virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y);
- virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
- bool useMask = false);
-
- virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y);
- virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
- double angle);
-
- virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
- wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
-
- virtual void DoGetSize(int *,int *) const;
- virtual void DoGetSizeMM(int* width, int* height) const;
-
- virtual void DoDrawLines(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset);
- virtual void DoDrawPolygon(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- int fillStyle = wxODDEVEN_RULE);
- virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- int fillStyle);
-
- virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
- virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
- wxCoord width, wxCoord height);
-
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const;
-
- virtual bool DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths) const;
-
-protected:
- // scaling variables
- bool m_logicalFunctionSupported;
- double m_mm_to_pix_x, m_mm_to_pix_y;
- wxGraphicsMatrix m_matrixOriginal;
- wxGraphicsMatrix m_matrixCurrent;
-
- double m_formerScaleX, m_formerScaleY;
-
- wxGraphicsContext* m_graphicContext;
-};
-
-#endif
-
-#endif // _WX_GRAPHICS_DC_H_
diff --git a/desmume/src/windows/wx/include/wx/dcmemory.h b/desmume/src/windows/wx/include/wx/dcmemory.h
deleted file mode 100644
index 68d4355ac..000000000
--- a/desmume/src/windows/wx/include/wx/dcmemory.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcmemory.h
-// Purpose: wxMemoryDC base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dcmemory.h 43843 2006-12-07 05:44:44Z PC $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCMEMORY_H_BASE_
-#define _WX_DCMEMORY_H_BASE_
-
-#include "wx/bitmap.h"
-
-// NOTE: different native implementations of wxMemoryDC will derive from
-// different wxDC classes (wxPaintDC, wxWindowDC, etc), so that
-// we cannot derive wxMemoryDCBase from wxDC and then use it as the
-// only base class for native impl of wxMemoryDC...
-class WXDLLEXPORT wxMemoryDCBase
-{
-public:
- wxMemoryDCBase() { }
-
- // avoid warnings about having virtual functions but non virtual dtor
- virtual ~wxMemoryDCBase() { }
-
- // select the given bitmap to draw on it
- void SelectObject(wxBitmap& bmp)
- {
- // make sure that the given wxBitmap is not sharing its data with other
- // wxBitmap instances as its contents will be modified by any drawing
- // operation done on this DC
- if (bmp.IsOk())
- bmp.UnShare();
-
- DoSelect(bmp);
- }
-
- // select the given bitmap for read-only
- virtual void SelectObjectAsSource(const wxBitmap& bmp)
- {
- DoSelect(bmp);
- }
-
-protected:
- virtual void DoSelect(const wxBitmap& bmp) = 0;
-};
-
-#if defined(__WXPALMOS__)
-#include "wx/palmos/dcmemory.h"
-#elif defined(__WXMSW__)
-#include "wx/msw/dcmemory.h"
-#elif defined(__WXMOTIF__)
-#include "wx/motif/dcmemory.h"
-#elif defined(__WXGTK20__)
-#include "wx/gtk/dcmemory.h"
-#elif defined(__WXGTK__)
-#include "wx/gtk1/dcmemory.h"
-#elif defined(__WXX11__)
-#include "wx/x11/dcmemory.h"
-#elif defined(__WXMGL__)
-#include "wx/mgl/dcmemory.h"
-#elif defined(__WXDFB__)
-#include "wx/dfb/dcmemory.h"
-#elif defined(__WXMAC__)
-#include "wx/mac/dcmemory.h"
-#elif defined(__WXCOCOA__)
-#include "wx/cocoa/dcmemory.h"
-#elif defined(__WXPM__)
-#include "wx/os2/dcmemory.h"
-#endif
-
-#endif
- // _WX_DCMEMORY_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dcmirror.h b/desmume/src/windows/wx/include/wx/dcmirror.h
deleted file mode 100644
index bc15a398e..000000000
--- a/desmume/src/windows/wx/include/wx/dcmirror.h
+++ /dev/null
@@ -1,287 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcmirror.h
-// Purpose: wxMirrorDC class
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 21.07.2003
-// RCS-ID: $Id: dcmirror.h 41751 2006-10-08 21:56:55Z VZ $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCMIRROR_H_
-#define _WX_DCMIRROR_H_
-
-#include "wx/dc.h"
-
-// ----------------------------------------------------------------------------
-// wxMirrorDC allows to write the same code for horz/vertical layout
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxMirrorDC : public wxDC
-{
-public:
- // constructs a mirror DC associated with the given real DC
- //
- // if mirror parameter is true, all vertical and horizontal coordinates are
- // exchanged, otherwise this class behaves in exactly the same way as a
- // plain DC
- //
- // the cast to wxMirrorDC is a dirty hack done to allow us to call the
- // protected methods of wxDCBase directly in our code below, without it it
- // would be impossible (this is correct from C++ point of view but doesn't
- // make any sense in this particular situation)
- wxMirrorDC(wxDC& dc, bool mirror) : m_dc((wxMirrorDC&)dc)
- { m_mirror = mirror; }
-
- // wxDCBase operations
- virtual void Clear() { m_dc.Clear(); }
- virtual void SetFont(const wxFont& font) { m_dc.SetFont(font); }
- virtual void SetPen(const wxPen& pen) { m_dc.SetPen(pen); }
- virtual void SetBrush(const wxBrush& brush) { m_dc.SetBrush(brush); }
- virtual void SetBackground(const wxBrush& brush)
- { m_dc.SetBackground(brush); }
- virtual void SetBackgroundMode(int mode) { m_dc.SetBackgroundMode(mode); }
-#if wxUSE_PALETTE
- virtual void SetPalette(const wxPalette& palette)
- { m_dc.SetPalette(palette); }
-#endif // wxUSE_PALETTE
- virtual void DestroyClippingRegion() { m_dc.DestroyClippingRegion(); }
- virtual wxCoord GetCharHeight() const { return m_dc.GetCharHeight(); }
- virtual wxCoord GetCharWidth() const { return m_dc.GetCharWidth(); }
- virtual bool CanDrawBitmap() const { return m_dc.CanDrawBitmap(); }
- virtual bool CanGetTextExtent() const { return m_dc.CanGetTextExtent(); }
- virtual int GetDepth() const { return m_dc.GetDepth(); }
- virtual wxSize GetPPI() const { return m_dc.GetPPI(); }
- virtual bool Ok() const { return IsOk(); }
- virtual bool IsOk() const { return m_dc.Ok(); }
- virtual void SetMapMode(int mode) { m_dc.SetMapMode(mode); }
- virtual void SetUserScale(double x, double y)
- { m_dc.SetUserScale(GetX(x, y), GetY(x, y)); }
- virtual void SetLogicalOrigin(wxCoord x, wxCoord y)
- { m_dc.SetLogicalOrigin(GetX(x, y), GetY(x, y)); }
- virtual void SetDeviceOrigin(wxCoord x, wxCoord y)
- { m_dc.SetDeviceOrigin(GetX(x, y), GetY(x, y)); }
- virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp)
- { m_dc.SetAxisOrientation(GetX(xLeftRight, yBottomUp),
- GetY(xLeftRight, yBottomUp)); }
- virtual void SetLogicalFunction(int function)
- { m_dc.SetLogicalFunction(function); }
-
- // helper functions which may be useful for the users of this class
- wxSize Reflect(const wxSize& sizeOrig)
- {
- return m_mirror ? wxSize(sizeOrig.y, sizeOrig.x) : sizeOrig;
- }
-
-protected:
- // returns x and y if not mirroring or y and x if mirroring
- wxCoord GetX(wxCoord x, wxCoord y) const { return m_mirror ? y : x; }
- wxCoord GetY(wxCoord x, wxCoord y) const { return m_mirror ? x : y; }
- double GetX(double x, double y) const { return m_mirror ? y : x; }
- double GetY(double x, double y) const { return m_mirror ? x : y; }
- bool GetX(bool x, bool y) const { return m_mirror ? y : x; }
- bool GetY(bool x, bool y) const { return m_mirror ? x : y; }
-
- // same thing but for pointers
- wxCoord *GetX(wxCoord *x, wxCoord *y) const { return m_mirror ? y : x; }
- wxCoord *GetY(wxCoord *x, wxCoord *y) const { return m_mirror ? x : y; }
-
- // exchange x and y unconditionally
- static void Swap(wxCoord& x, wxCoord& y)
- {
- wxCoord t = x;
- x = y;
- y = t;
- }
-
- // exchange x and y components of all points in the array if necessary
- void Mirror(int n, wxPoint points[]) const
- {
- if ( m_mirror )
- {
- for ( int i = 0; i < n; i++ )
- {
- Swap(points[i].x, points[i].y);
- }
- }
- }
-
-
- // wxDCBase functions
- virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
- int style = wxFLOOD_SURFACE)
- {
- return m_dc.DoFloodFill(GetX(x, y), GetY(x, y), col, style);
- }
-
- virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
- {
- return m_dc.DoGetPixel(GetX(x, y), GetY(x, y), col);
- }
-
-
- virtual void DoDrawPoint(wxCoord x, wxCoord y)
- {
- m_dc.DoDrawPoint(GetX(x, y), GetY(x, y));
- }
-
- virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
- {
- m_dc.DoDrawLine(GetX(x1, y1), GetY(x1, y1), GetX(x2, y2), GetY(x2, y2));
- }
-
- virtual void DoDrawArc(wxCoord x1, wxCoord y1,
- wxCoord x2, wxCoord y2,
- wxCoord xc, wxCoord yc)
- {
- wxFAIL_MSG( _T("this is probably wrong") );
-
- m_dc.DoDrawArc(GetX(x1, y1), GetY(x1, y1),
- GetX(x2, y2), GetY(x2, y2),
- xc, yc);
- }
-
- virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
- wxCoord w, wxCoord h)
- {
- m_dc.DoDrawCheckMark(GetX(x, y), GetY(x, y),
- GetX(w, h), GetY(w, h));
- }
-
- virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
- double sa, double ea)
- {
- wxFAIL_MSG( _T("this is probably wrong") );
-
- m_dc.DoDrawEllipticArc(GetX(x, y), GetY(x, y),
- GetX(w, h), GetY(w, h),
- sa, ea);
- }
-
- virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
- {
- m_dc.DoDrawRectangle(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h));
- }
-
- virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
- wxCoord w, wxCoord h,
- double radius)
- {
- m_dc.DoDrawRoundedRectangle(GetX(x, y), GetY(x, y),
- GetX(w, h), GetY(w, h),
- radius);
- }
-
- virtual void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
- {
- m_dc.DoDrawEllipse(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h));
- }
-
- virtual void DoCrossHair(wxCoord x, wxCoord y)
- {
- m_dc.DoCrossHair(GetX(x, y), GetY(x, y));
- }
-
- virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
- {
- m_dc.DoDrawIcon(icon, GetX(x, y), GetY(x, y));
- }
-
- virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
- bool useMask = false)
- {
- m_dc.DoDrawBitmap(bmp, GetX(x, y), GetY(x, y), useMask);
- }
-
- virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y)
- {
- // this is never mirrored
- m_dc.DoDrawText(text, x, y);
- }
-
- virtual void DoDrawRotatedText(const wxString& text,
- wxCoord x, wxCoord y, double angle)
- {
- // this is never mirrored
- m_dc.DoDrawRotatedText(text, x, y, angle);
- }
-
- virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
- wxCoord w, wxCoord h,
- wxDC *source, wxCoord xsrc, wxCoord ysrc,
- int rop = wxCOPY, bool useMask = false,
- wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
- {
- return m_dc.DoBlit(GetX(xdest, ydest), GetY(xdest, ydest),
- GetX(w, h), GetY(w, h),
- source, GetX(xsrc, ysrc), GetY(xsrc, ysrc),
- rop, useMask,
- GetX(xsrcMask, ysrcMask), GetX(xsrcMask, ysrcMask));
- }
-
- virtual void DoGetSize(int *w, int *h) const
- {
- m_dc.DoGetSize(GetX(w, h), GetY(w, h));
- }
-
- virtual void DoGetSizeMM(int *w, int *h) const
- {
- m_dc.DoGetSizeMM(GetX(w, h), GetY(w, h));
- }
-
- virtual void DoDrawLines(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset)
- {
- Mirror(n, points);
-
- m_dc.DoDrawLines(n, points,
- GetX(xoffset, yoffset), GetY(xoffset, yoffset));
-
- Mirror(n, points);
- }
-
- virtual void DoDrawPolygon(int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset,
- int fillStyle = wxODDEVEN_RULE)
- {
- Mirror(n, points);
-
- m_dc.DoDrawPolygon(n, points,
- GetX(xoffset, yoffset), GetY(xoffset, yoffset),
- fillStyle);
-
- Mirror(n, points);
- }
-
- virtual void DoSetClippingRegionAsRegion(const wxRegion& WXUNUSED(region))
- {
- wxFAIL_MSG( _T("not implemented") );
- }
-
- virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
- wxCoord w, wxCoord h)
- {
- m_dc.DoSetClippingRegion(GetX(x, y), GetY(x, y), GetX(w, h), GetY(w, h));
- }
-
- virtual void DoGetTextExtent(const wxString& string,
- wxCoord *x, wxCoord *y,
- wxCoord *descent = NULL,
- wxCoord *externalLeading = NULL,
- wxFont *theFont = NULL) const
- {
- // never mirrored
- m_dc.DoGetTextExtent(string, x, y, descent, externalLeading, theFont);
- }
-
-private:
- wxMirrorDC& m_dc;
-
- bool m_mirror;
-
- DECLARE_NO_COPY_CLASS(wxMirrorDC)
-};
-
-#endif // _WX_DCMIRROR_H_
-
diff --git a/desmume/src/windows/wx/include/wx/dcprint.h b/desmume/src/windows/wx/include/wx/dcprint.h
deleted file mode 100644
index 5a40911d1..000000000
--- a/desmume/src/windows/wx/include/wx/dcprint.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcprint.h
-// Purpose: wxPrinterDC base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dcprint.h 41240 2006-09-15 16:45:48Z PC $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCPRINT_H_BASE_
-#define _WX_DCPRINT_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_PRINTING_ARCHITECTURE
-
-#if defined(__WXPALMOS__)
-#include "wx/palmos/dcprint.h"
-#elif defined(__WXMSW__)
-#include "wx/msw/dcprint.h"
-#endif
-#if defined(__WXPM__)
-#include "wx/os2/dcprint.h"
-#endif
-#if defined(__WXMAC__)
-#include "wx/mac/dcprint.h"
-#endif
-
-#endif // wxUSE_PRINTING_ARCHITECTURE
-#endif
- // _WX_DCPRINT_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dcps.h b/desmume/src/windows/wx/include/wx/dcps.h
deleted file mode 100644
index 2615d3324..000000000
--- a/desmume/src/windows/wx/include/wx/dcps.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcps.h
-// Purpose: wxPostScriptDC base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dcps.h 33948 2005-05-04 18:57:50Z JS $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCPS_H_BASE_
-#define _WX_DCPS_H_BASE_
-
-#include "wx/generic/dcpsg.h"
-
-#endif
-
diff --git a/desmume/src/windows/wx/include/wx/dcscreen.h b/desmume/src/windows/wx/include/wx/dcscreen.h
deleted file mode 100644
index 7e59787ef..000000000
--- a/desmume/src/windows/wx/include/wx/dcscreen.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dcscreen.h
-// Purpose: wxScreenDC base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dcscreen.h 40865 2006-08-27 09:42:42Z VS $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DCSCREEN_H_BASE_
-#define _WX_DCSCREEN_H_BASE_
-
-#include "wx/defs.h"
-
-#if defined(__WXPALMOS__)
-#include "wx/palmos/dcscreen.h"
-#elif defined(__WXMSW__)
-#include "wx/msw/dcscreen.h"
-#elif defined(__WXMOTIF__)
-#include "wx/motif/dcscreen.h"
-#elif defined(__WXGTK20__)
-#include "wx/gtk/dcscreen.h"
-#elif defined(__WXGTK__)
-#include "wx/gtk1/dcscreen.h"
-#elif defined(__WXX11__)
-#include "wx/x11/dcscreen.h"
-#elif defined(__WXMGL__)
-#include "wx/mgl/dcscreen.h"
-#elif defined(__WXDFB__)
-#include "wx/dfb/dcscreen.h"
-#elif defined(__WXMAC__)
-#include "wx/mac/dcscreen.h"
-#elif defined(__WXCOCOA__)
-#include "wx/cocoa/dcscreen.h"
-#elif defined(__WXPM__)
-#include "wx/os2/dcscreen.h"
-#endif
-
-#endif
- // _WX_DCSCREEN_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dde.h b/desmume/src/windows/wx/include/wx/dde.h
deleted file mode 100644
index 402a6ec70..000000000
--- a/desmume/src/windows/wx/include/wx/dde.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dde.h
-// Purpose: DDE base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dde.h 53135 2008-04-12 02:31:04Z VZ $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DDE_H_BASE_
-#define _WX_DDE_H_BASE_
-
-#include "wx/list.h"
-
-class WXDLLIMPEXP_FWD_BASE wxDDEClient;
-class WXDLLIMPEXP_FWD_BASE wxDDEServer;
-class WXDLLIMPEXP_FWD_BASE wxDDEConnection;
-
-WX_DECLARE_USER_EXPORTED_LIST(wxDDEClient, wxDDEClientList, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_LIST(wxDDEServer, wxDDEServerList, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_BASE);
-
-#if defined(__WXMSW__)
- #include "wx/msw/dde.h"
-#else
- #error DDE is only supported on MSW
-#endif
-
-#endif
- // _WX_DDE_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/debug.h b/desmume/src/windows/wx/include/wx/debug.h
deleted file mode 100644
index fd389d516..000000000
--- a/desmume/src/windows/wx/include/wx/debug.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
-* Name: wx/debug.h
-* Purpose: Misc debug functions and macros
-* Author: Vadim Zeitlin
-* Modified by: Ryan Norton (Converted to C)
-* Created: 29/01/98
-* RCS-ID: $Id: debug.h 54492 2008-07-05 17:54:03Z SN $
-* Copyright: (c) 1998 Vadim Zeitlin
-* Licence: wxWindows licence
-*/
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-#ifndef _WX_DEBUG_H_
-#define _WX_DEBUG_H_
-
-#ifndef __WXWINCE__
-#include
-#endif
-#include /* for CHAR_BIT used below */
-
-#include "wx/wxchar.h" /* for __TFILE__ and wxChar */
-
-/* ---------------------------------------------------------------------------- */
-/* Defines controlling the debugging macros */
-/* ---------------------------------------------------------------------------- */
-
-/* if _DEBUG is defined (MS VC++ and others use it in debug builds), define */
-/* __WXDEBUG__ too */
-#ifdef _DEBUG
- #ifndef __WXDEBUG__
- #define __WXDEBUG__
- #endif /* !__WXDEBUG__ */
-#endif /* _DEBUG */
-
-/* if NDEBUG is defined ( uses it), undef __WXDEBUG__ and WXDEBUG */
-#ifdef NDEBUG
- #undef __WXDEBUG__
- #undef WXDEBUG
-#endif /* NDEBUG */
-
-/* if __WXDEBUG__ is defined, make sure that WXDEBUG is defined and >= 1 */
-#ifdef __WXDEBUG__
- #if !defined(WXDEBUG) || !WXDEBUG
- #undef WXDEBUG
- #define WXDEBUG 1
- #endif /* !WXDEBUG */
-#endif /* __WXDEBUG__ */
-
-#ifndef __WXFUNCTION__
- /* TODO: add more compilers supporting __FUNCTION__ */
- #if defined(__DMC__)
- /*
- __FUNCTION__ happens to be not defined within class members
- http://www.digitalmars.com/drn-bin/wwwnews?c%2B%2B.beta/485
- */
- #define __WXFUNCTION__ (NULL)
- #elif defined(__GNUC__) || \
- (defined(_MSC_VER) && _MSC_VER >= 1300) || \
- defined(__FUNCTION__)
- #define __WXFUNCTION__ __FUNCTION__
- #else
- /* still define __WXFUNCTION__ to avoid #ifdefs elsewhere */
- #define __WXFUNCTION__ (NULL)
- #endif
-#endif /* __WXFUNCTION__ already defined */
-
-/* ---------------------------------------------------------------------------- */
-/* Debugging macros */
-/* */
-/* All debugging macros rely on ASSERT() which in turn calls the user-defined */
-/* OnAssert() function. To keep things simple, it's called even when the */
-/* expression is true (i.e. everything is ok) and by default does nothing: just */
-/* returns the same value back. But if you redefine it to do something more sexy */
-/* (popping up a message box in your favourite GUI, sending you e-mail or */
-/* whatever) it will affect all ASSERTs, FAILs and CHECKs in your code. */
-/* */
-/* Warning: if you don't like advice on programming style, don't read */
-/* further! ;-) */
-/* */
-/* Extensive use of these macros is recommended! Remember that ASSERTs are */
-/* disabled in final build (without __WXDEBUG__ defined), so they add strictly */
-/* nothing to your program's code. On the other hand, CHECK macros do stay */
-/* even in release builds, but in general are not much of a burden, while */
-/* a judicious use of them might increase your program's stability. */
-/* ---------------------------------------------------------------------------- */
-
-/* Macros which are completely disabled in 'release' mode */
-/* */
-/* NB: these functions are implemented in src/common/appcmn.cpp */
-#if defined(__cplusplus) && defined(__WXDEBUG__)
- /*
- This function is called whenever one of debugging macros fails (i.e.
- condition is false in an assertion). To customize its behaviour, override
- wxApp::OnAssert().
-
- Parameters:
- szFile and nLine - file name and line number of the ASSERT
- szFunc - function name of the ASSERT, may be NULL (NB: ASCII)
- szCond - text form of the condition which failed
- szMsg - optional message explaining the reason
- */
- extern void WXDLLIMPEXP_BASE wxOnAssert(const wxChar *szFile,
- int nLine,
- const char *szFunc,
- const wxChar *szCond,
- const wxChar *szMsg = NULL);
-
- /* call this function to break into the debugger unconditionally (assuming */
- /* the program is running under debugger, of course) */
- extern void WXDLLIMPEXP_BASE wxTrap();
-
- /* generic assert macro */
- #define wxASSERT(cond) wxASSERT_MSG(cond, NULL)
-
-
- /* assert with additional message explaining its cause */
-
- /* compilers can give a warning (such as "possible unwanted ;") when using */
- /* the default definition of wxASSERT_MSG so we provide an alternative */
- #if defined(__MWERKS__)
- #define wxASSERT_MSG(cond, msg) \
- if ( cond ) \
- {} \
- else \
- wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg)
- #else
- #define wxASSERT_MSG(cond, msg) \
- if ( cond ) \
- ; \
- else \
- wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg)
- #endif
-
- /* special form of assert: always triggers it (in debug mode) */
- #define wxFAIL wxFAIL_MSG(NULL)
-
- /* FAIL with some message */
- #define wxFAIL_MSG(msg) wxFAIL_COND_MSG("wxAssertFailure", msg)
-
- /* FAIL with some message and a condition */
- #define wxFAIL_COND_MSG(cond, msg) \
- wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(cond), msg)
-
- /* An assert helper used to avoid warning when testing constant expressions, */
- /* i.e. wxASSERT( sizeof(int) == 4 ) can generate a compiler warning about */
- /* expression being always true, but not using */
- /* wxASSERT( wxAssertIsEqual(sizeof(int), 4) ) */
- /* */
- /* NB: this is made obsolete by wxCOMPILE_TIME_ASSERT() and should no */
- /* longer be used. */
- extern bool WXDLLIMPEXP_BASE wxAssertIsEqual(int x, int y);
-#else
- #define wxTrap()
-
- /* nothing to do in release mode (hopefully at this moment there are */
- /* no more bugs ;-) */
- #define wxASSERT(cond)
- #define wxASSERT_MSG(cond, msg)
- #define wxFAIL
- #define wxFAIL_MSG(msg)
- #define wxFAIL_COND_MSG(cond, msg)
-#endif /* __WXDEBUG__ */
-
-#ifdef __cplusplus
- /* Use of wxFalse instead of false suppresses compiler warnings about testing */
- /* constant expression */
- extern WXDLLIMPEXP_DATA_BASE(const bool) wxFalse;
-#endif
-
-#define wxAssertFailure wxFalse
-
-/* NB: the following macros also work in release mode! */
-
-/*
- These macros must be used only in invalid situation: for example, an
- invalid parameter (e.g. a NULL pointer) is passed to a function. Instead of
- dereferencing it and causing core dump the function might try using
- CHECK( p != NULL ) or CHECK( p != NULL, return LogError("p is NULL!!") )
-*/
-
-/* check that expression is true, "return" if not (also FAILs in debug mode) */
-#define wxCHECK(cond, rc) wxCHECK_MSG(cond, rc, NULL)
-
-/* as wxCHECK but with a message explaining why we fail */
-#define wxCHECK_MSG(cond, rc, msg) wxCHECK2_MSG(cond, return rc, msg)
-
-/* check that expression is true, perform op if not */
-#define wxCHECK2(cond, op) wxCHECK2_MSG(cond, op, NULL)
-
-/* as wxCHECK2 but with a message explaining why we fail */
-
-#ifdef __GNUC__
- #define wxFORCE_SEMICOLON typedef int wxDummyCheckInt
- /* Note: old gcc versions (e.g. 2.8) give an internal compiler error */
- /* on a simple forward declaration, when used in a template */
- /* function, so rather use a dummy typedef which does work... */
-#else
- #define wxFORCE_SEMICOLON struct wxDummyCheckStruct
- /* Note2: however, some other compilers (notably Digital Mars */
- /* don't like multiple typedefs (even though the standard */
- /* does allow them), so use a forward declaration for non-gcc. */
-#endif
-/* see comment near the definition of wxASSERT_MSG for the # if/else reason */
-#if defined(__MWERKS__)
- #define wxCHECK2_MSG(cond, op, msg) \
- if ( cond ) \
- {} \
- else \
- { \
- wxFAIL_COND_MSG(#cond, msg); \
- op; \
- } \
- struct wxDummyCheckStruct /* just to force a semicolon */
-#else
- #define wxCHECK2_MSG(cond, op, msg) \
- if ( cond ) \
- ; \
- else \
- { \
- wxFAIL_COND_MSG(#cond, msg); \
- op; \
- } \
- wxFORCE_SEMICOLON /* just to force a semicolon */
-#endif
-
-/* special form of wxCHECK2: as wxCHECK, but for use in void functions */
-/* */
-/* NB: there is only one form (with msg parameter) and it's intentional: */
-/* there is no other way to tell the caller what exactly went wrong */
-/* from the void function (of course, the function shouldn't be void */
-/* to begin with...) */
-#define wxCHECK_RET(cond, msg) wxCHECK2_MSG(cond, return, msg)
-
-/* ---------------------------------------------------------------------------- */
-/* Compile time asserts */
-/* */
-/* Unlike the normal assert and related macros above which are checked during */
-/* the program tun-time the macros below will result in a compilation error if */
-/* the condition they check is false. This is usually used to check the */
-/* expressions containing sizeof()s which cannot be tested with the */
-/* preprocessor. If you can use the #if's, do use them as you can give a more */
-/* detailed error message then. */
-/* ---------------------------------------------------------------------------- */
-
-/*
- How this works (you don't have to understand it to be able to use the
- macros): we rely on the fact that it is invalid to define a named bit field
- in a struct of width 0. All the rest are just the hacks to minimize the
- possibility of the compiler warnings when compiling this macro: in
- particular, this is why we define a struct and not an object (which would
- result in a warning about unused variable) and a named struct (otherwise we'd
- get a warning about an unnamed struct not used to define an object!).
- */
-
-#define wxMAKE_UNIQUE_ASSERT_NAME wxMAKE_UNIQUE_NAME(wxAssert_)
-
-/*
- The second argument of this macro must be a valid C++ identifier and not a
- string. I.e. you should use it like this:
-
- wxCOMPILE_TIME_ASSERT( sizeof(int) >= 2, YourIntsAreTooSmall );
-
- It may be used both within a function and in the global scope.
-*/
-#if defined(__WATCOMC__) && defined(__cplusplus)
- /* avoid "unused symbol" warning */
- #define wxCOMPILE_TIME_ASSERT(expr, msg) \
- class wxMAKE_UNIQUE_ASSERT_NAME { \
- unsigned int msg: expr; \
- wxMAKE_UNIQUE_ASSERT_NAME() { wxUnusedVar(msg); } \
- }
-#else
- #define wxCOMPILE_TIME_ASSERT(expr, msg) \
- struct wxMAKE_UNIQUE_ASSERT_NAME { unsigned int msg: expr; }
-#endif
-
-/*
- When using VC++ 6 with "Edit and Continue" on, the compiler completely
- mishandles __LINE__ and so wxCOMPILE_TIME_ASSERT() doesn't work, provide a
- way to make "unique" assert names by specifying a unique prefix explicitly
- */
-#define wxMAKE_UNIQUE_ASSERT_NAME2(text) wxCONCAT(wxAssert_, text)
-
-#define wxCOMPILE_TIME_ASSERT2(expr, msg, text) \
- struct wxMAKE_UNIQUE_ASSERT_NAME2(text) { unsigned int msg: expr; }
-
-/* helpers for wxCOMPILE_TIME_ASSERT below, for private use only */
-#define wxMAKE_BITSIZE_MSG(type, size) type ## SmallerThan ## size ## Bits
-
-/* a special case of compile time assert: check that the size of the given type */
-/* is at least the given number of bits */
-#define wxASSERT_MIN_BITSIZE(type, size) \
- wxCOMPILE_TIME_ASSERT(sizeof(type) * CHAR_BIT >= size, \
- wxMAKE_BITSIZE_MSG(type, size))
-
-/* ---------------------------------------------------------------------------- */
-/* other miscellaneous debugger-related functions */
-/* ---------------------------------------------------------------------------- */
-
-/*
- Return true if we're running under debugger.
-
- Currently this only really works under Win32 and Mac in CodeWarrior builds,
- it always returns false in other cases.
- */
-#ifdef __cplusplus
- /* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
- #if defined(__WXMAC__) || defined(__WIN32__)
- extern bool WXDLLIMPEXP_BASE wxIsDebuggerRunning();
- #else /* !Mac */
- inline bool wxIsDebuggerRunning() { return false; }
- #endif /* Mac/!Mac */
-#endif /* __cplusplus */
-
-#endif /* _WX_DEBUG_H_ */
diff --git a/desmume/src/windows/wx/include/wx/debugrpt.h b/desmume/src/windows/wx/include/wx/debugrpt.h
deleted file mode 100644
index a50f1cbd0..000000000
--- a/desmume/src/windows/wx/include/wx/debugrpt.h
+++ /dev/null
@@ -1,235 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/debugrpt.h
-// Purpose: declaration of wxDebugReport class
-// Author: Vadim Zeitlin
-// Created: 2005-01-17
-// RCS-ID: $Id: debugrpt.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) 2005 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DEBUGRPT_H_
-#define _WX_DEBUGRPT_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_DEBUGREPORT && wxUSE_XML
-
-#include "wx/string.h"
-#include "wx/arrstr.h"
-
-class WXDLLIMPEXP_FWD_XML wxXmlNode;
-
-// ----------------------------------------------------------------------------
-// wxDebugReport: generate a debug report, processing is done in derived class
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_QA wxDebugReport
-{
-public:
- // this is used for the functions which may report either the current state
- // or the state during the last (fatal) exception
- enum Context { Context_Current, Context_Exception };
-
-
- // ctor creates a temporary directory where we create the files which will
- // be included in the report, use IsOk() to check for errors
- wxDebugReport();
-
- // dtor normally destroys the temporary directory created in the ctor (with
- // all the files it contains), call Reset() to prevent this from happening
- virtual ~wxDebugReport();
-
- // return the name of the directory used for this report
- const wxString& GetDirectory() const { return m_dir; }
-
- // return true if the object was successfully initialized
- bool IsOk() const { return !GetDirectory().empty(); }
-
- // reset the directory name we use, the object can't be used any more after
- // this as it becomes invalid/uninitialized
- void Reset() { m_dir.clear(); }
-
-
- // add another file to the report: the file must already exist, its name
- // can be either absolute in which case it is copied to the debug report
- // directory or relative to GetDirectory()
- //
- // description is shown to the user in the report summary
- virtual void AddFile(const wxString& filename, const wxString& description);
-
- // convenience function: write the given text to a file with the given name
- // and then add it to the report (the difference with AddFile() is that the
- // file will be created by this function and doesn't have to already exist)
- bool AddText(const wxString& filename,
- const wxString& text,
- const wxString& description);
-
-#if wxUSE_STACKWALKER
- // add an XML file containing the current or exception context and the
- // stack trace
- bool AddCurrentContext() { return AddContext(Context_Current); }
- bool AddExceptionContext() { return AddContext(Context_Exception); }
- virtual bool AddContext(Context ctx);
-#endif
-
-#if wxUSE_CRASHREPORT
- // add a file with crash report
- bool AddCurrentDump() { return AddDump(Context_Current); }
- bool AddExceptionDump() { return AddDump(Context_Exception); }
- virtual bool AddDump(Context ctx);
-#endif // wxUSE_CRASHREPORT
-
- // add all available information to the report
- void AddAll(Context context = Context_Exception);
-
-
- // process this report: the base class simply notifies the user that the
- // report has been generated, this is usually not enough -- instead you
- // should override this method to do something more useful to you
- bool Process();
-
- // get the name used as base name for various files, by default
- // wxApp::GetName()
- virtual wxString GetReportName() const;
-
- // get the files in this report
- size_t GetFilesCount() const { return m_files.GetCount(); }
- bool GetFile(size_t n, wxString *name, wxString *desc) const;
-
- // remove the file from report: this is used by wxDebugReportPreview to
- // allow the user to remove files potentially containing private
- // information from the report
- void RemoveFile(const wxString& name);
-
-protected:
-#if wxUSE_STACKWALKER
- // used by AddContext()
- virtual bool DoAddSystemInfo(wxXmlNode *nodeSystemInfo);
- virtual bool DoAddLoadedModules(wxXmlNode *nodeModules);
- virtual bool DoAddExceptionInfo(wxXmlNode *nodeContext);
- virtual void DoAddCustomContext(wxXmlNode * WXUNUSED(nodeRoot)) { }
-#endif
-
- // used by Process()
- virtual bool DoProcess();
-
-private:
- // name of the report directory
- wxString m_dir;
-
- // the arrays of files in this report and their descriptions
- wxArrayString m_files,
- m_descriptions;
-};
-
-#if wxUSE_ZIPSTREAM
-
-// ----------------------------------------------------------------------------
-// wxDebugReportCompress: compress all files of this debug report in a .ZIP
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_QA wxDebugReportCompress : public wxDebugReport
-{
-public:
- wxDebugReportCompress() { }
-
- // returns the full path of the compressed file (empty if creation failed)
- const wxString& GetCompressedFileName() const { return m_zipfile; }
-
-protected:
- virtual bool DoProcess();
-
-private:
- // full path to the ZIP file we created
- wxString m_zipfile;
-};
-
-// ----------------------------------------------------------------------------
-// wxDebugReportUploader: uploads compressed file using HTTP POST request
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_QA wxDebugReportUpload : public wxDebugReportCompress
-{
-public:
- // this class will upload the compressed file created by its base class to
- // an HTML multipart/form-data form at the specified address
- //
- // the URL is the base address, input is the name of the "type=file"
- // control on the form used for the file name and action is the value of
- // the form action field
- wxDebugReportUpload(const wxString& url,
- const wxString& input,
- const wxString& action,
- const wxString& curl = _T("curl"));
-
-protected:
- virtual bool DoProcess();
-
- // this function may be overridden in a derived class to show the output
- // from curl: this may be an HTML page or anything else that the server
- // returned
- //
- // return value becomes the return value of Process()
- virtual bool OnServerReply(const wxArrayString& WXUNUSED(reply))
- {
- return true;
- }
-
-private:
- // the full URL to use with HTTP POST request
- wxString m_uploadURL;
-
- // the name of the input field containing the file name in the form at
- // above URL
- wxString m_inputField;
-
- // the curl command (by default it is just "curl" but could be full path to
- // curl or a wrapper script with curl-compatible syntax)
- wxString m_curlCmd;
-};
-
-#endif // wxUSE_ZIPSTREAM
-
-
-// ----------------------------------------------------------------------------
-// wxDebugReportPreview: presents the debug report to the user and allows him
-// to veto report entirely or remove some parts of it
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_QA wxDebugReportPreview
-{
-public:
- // ctor is trivial
- wxDebugReportPreview() { }
-
- // present the report to the user and allow him to modify it by removing
- // some or all of the files and, potentially, adding some notes
- //
- // return true if the report should be processed or false if the user chose
- // to cancel report generation or removed all files from it
- virtual bool Show(wxDebugReport& dbgrpt) const = 0;
-
- // dtor is trivial as well but should be virtual for a base class
- virtual ~wxDebugReportPreview() { }
-};
-
-#if wxUSE_GUI
-
-// ----------------------------------------------------------------------------
-// wxDebugReportPreviewStd: standard debug report preview window
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_QA wxDebugReportPreviewStd : public wxDebugReportPreview
-{
-public:
- wxDebugReportPreviewStd() { }
-
- virtual bool Show(wxDebugReport& dbgrpt) const;
-};
-
-#endif // wxUSE_GUI
-
-#endif // wxUSE_DEBUGREPORT && wxUSE_XML
-
-#endif // _WX_DEBUGRPT_H_
diff --git a/desmume/src/windows/wx/include/wx/defs.h b/desmume/src/windows/wx/include/wx/defs.h
deleted file mode 100644
index 0e2ca0c5d..000000000
--- a/desmume/src/windows/wx/include/wx/defs.h
+++ /dev/null
@@ -1,2900 +0,0 @@
-/*
- * Name: wx/defs.h
- * Purpose: Declarations/definitions common to all wx source files
- * Author: Julian Smart and others
- * Modified by: Ryan Norton (Converted to C)
- * Created: 01/02/97
- * RCS-ID: $Id: defs.h 53370 2008-04-26 05:43:41Z KO $
- * Copyright: (c) Julian Smart
- * Licence: wxWindows licence
- */
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-#ifndef _WX_DEFS_H_
-#define _WX_DEFS_H_
-
-/* ---------------------------------------------------------------------------- */
-/* compiler and OS identification */
-/* ---------------------------------------------------------------------------- */
-
-#include "wx/platform.h"
-
-#ifdef __cplusplus
-/* Make sure the environment is set correctly */
-# if defined(__WXMSW__) && defined(__X__)
-# error "Target can't be both X and Windows"
-# elif defined(__WXMSW__) && defined(__PALMOS__)
-# error "Target can't be both PalmOS and Windows"
-# elif !defined(__WXMOTIF__) && \
- !defined(__WXMSW__) && \
- !defined(__WXPALMOS__)&& \
- !defined(__WXGTK__) && \
- !defined(__WXPM__) && \
- !defined(__WXMAC__) && \
- !defined(__WXCOCOA__) && \
- !defined(__X__) && \
- !defined(__WXMGL__) && \
- !defined(__WXDFB__) && \
- !defined(__WXX11__) && \
- wxUSE_GUI
-# ifdef __UNIX__
-# error "No Target! You should use wx-config program for compilation flags!"
-# else /* !Unix */
-# error "No Target! You should use supplied makefiles for compilation!"
-# endif /* Unix/!Unix */
-# endif
-#endif /*__cplusplus*/
-
-#ifndef __WXWINDOWS__
- #define __WXWINDOWS__ 1
-#endif
-
-#ifndef wxUSE_BASE
- /* by default consider that this is a monolithic build */
- #define wxUSE_BASE 1
-#endif
-
-#if !wxUSE_GUI && !defined(__WXBASE__)
- #define __WXBASE__
-#endif
-
-/* include the feature test macros */
-#include "wx/features.h"
-
-/* suppress some Visual C++ warnings */
-#ifdef __VISUALC__
- /* the only "real" warning here is 4244 but there are just too many of them */
- /* in our code... one day someone should go and fix them but until then... */
-# pragma warning(disable:4097) /* typedef used as class */
-# pragma warning(disable:4201) /* nonstandard extension used: nameless struct/union */
-# pragma warning(disable:4244) /* conversion from double to float */
-# pragma warning(disable:4355) /* 'this' used in base member initializer list */
-# pragma warning(disable:4511) /* copy ctor couldn't be generated */
-# pragma warning(disable:4512) /* operator=() couldn't be generated */
-# pragma warning(disable:4710) /* function not inlined */
-
- /* For VC++ 5.0 for release mode, the warning 'C4702: unreachable code */
- /* is buggy, and occurs for code that does actually get executed */
-# if !defined __WXDEBUG__ && __VISUALC__ <= 1100
-# pragma warning(disable:4702) /* unreachable code */
-# endif
- /* The VC++ 5.0 warning 'C4003: not enough actual parameters for macro'
- * is incompatible with the wxWidgets headers since it is given when
- * parameters are empty but not missing. */
-# if __VISUALC__ <= 1100
-# pragma warning(disable:4003) /* not enough actual parameters for macro */
-# endif
-
- /*
- VC++ 8 gives a warning when using standard functions such as sprintf,
- localtime, ... -- stop this madness, unless the user had already done it
- */
- #if __VISUALC__ >= 1400
- #ifndef _CRT_SECURE_NO_DEPRECATE
- #define _CRT_SECURE_NO_DEPRECATE 1
- #endif
- #ifndef _CRT_NON_CONFORMING_SWPRINTFS
- #define _CRT_NON_CONFORMING_SWPRINTFS 1
- #endif
- #endif /* VC++ 8 */
-#endif /* __VISUALC__ */
-
-/* suppress some Salford C++ warnings */
-#ifdef __SALFORDC__
-# pragma suppress 353 /* Possible nested comments */
-# pragma suppress 593 /* Define not used */
-# pragma suppress 61 /* enum has no name (doesn't suppress!) */
-# pragma suppress 106 /* unnamed, unused parameter */
-# pragma suppress 571 /* Virtual function hiding */
-#endif /* __SALFORDC__ */
-
-/* suppress some Borland C++ warnings */
-#ifdef __BORLANDC__
-# pragma warn -inl /* Functions containing reserved words and certain constructs are not expanded inline */
-#endif /* __BORLANDC__ */
-
-/*
- g++ gives a warning when a class has private dtor if it has no friends but
- this is a perfectly valid situation for a ref-counted class which destroys
- itself when its ref count drops to 0, so provide a macro to suppress this
- warning
- */
-#ifdef __GNUG__
-# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) \
- friend class wxDummyFriendFor ## name;
-#else /* !g++ */
-# define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name)
-#endif
-
-/* ---------------------------------------------------------------------------- */
-/* wxWidgets version and compatibility defines */
-/* ---------------------------------------------------------------------------- */
-
-#include "wx/version.h"
-
-/* ============================================================================ */
-/* non portable C++ features */
-/* ============================================================================ */
-
-/* ---------------------------------------------------------------------------- */
-/* compiler defects workarounds */
-/* ---------------------------------------------------------------------------- */
-
-/*
- Digital Unix C++ compiler only defines this symbol for .cxx and .hxx files,
- so define it ourselves (newer versions do it for all files, though, and
- don't allow it to be redefined)
- */
-#if defined(__DECCXX) && !defined(__VMS) && !defined(__cplusplus)
-#define __cplusplus
-#endif /* __DECCXX */
-
-/* Resolves linking problems under HP-UX when compiling with gcc/g++ */
-#if defined(__HPUX__) && defined(__GNUG__)
-#define va_list __gnuc_va_list
-#endif /* HP-UX */
-
-/* ---------------------------------------------------------------------------- */
-/* check for native bool type and TRUE/FALSE constants */
-/* ---------------------------------------------------------------------------- */
-
-/* Add more tests here for Windows compilers that already define bool */
-/* (under Unix, configure tests for this) */
-#ifndef HAVE_BOOL
- #if defined( __MWERKS__ )
- #if (__MWERKS__ >= 0x1000) && __option(bool)
- #define HAVE_BOOL
- #endif
- #elif defined(__APPLE__) && defined(__APPLE_CC__)
- /* Apple bundled gcc supports bool */
- #define HAVE_BOOL
- #elif defined(__VISUALC__) && (__VISUALC__ == 1020)
- /* in VC++ 4.2 the bool keyword is reserved (hence can't be typedefed) */
- /* but not implemented, so we must #define it */
- #define bool unsigned int
- #elif defined(__VISUALC__) && (__VISUALC__ == 1010)
- /* For VisualC++ 4.1, we need to define */
- /* bool as something between 4.0 & 5.0... */
- typedef unsigned int wxbool;
- #define bool wxbool
- #define HAVE_BOOL
- #elif defined(__VISUALC__) && (__VISUALC__ > 1020)
- /* VC++ supports bool since 4.2 */
- #define HAVE_BOOL
- #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)
- /* Borland 5.0+ supports bool */
- #define HAVE_BOOL
- #elif wxCHECK_WATCOM_VERSION(1,0)
- /* Watcom 11+ supports bool */
- #define HAVE_BOOL
- #elif defined(__DIGITALMARS__)
- /* DigitalMars supports bool */
- #define HAVE_BOOL
- #elif defined(__GNUWIN32__) || defined(__MINGW32__) || defined(__CYGWIN__)
- /* Cygwin supports bool */
- #define HAVE_BOOL
- #elif defined(__VISAGECPP__)
- #if __IBMCPP__ < 400
- typedef unsigned long bool;
- #define true ((bool)1)
- #define false ((bool)0)
- #endif
- #define HAVE_BOOL
- #endif /* compilers */
-#endif /* HAVE_BOOL */
-
-#if !defined(__MWERKS__) || !defined(true)
-#if !defined(HAVE_BOOL) && !defined(bool) && !defined(VMS)
- /* NB: of course, this doesn't replace the standard type, because, for */
- /* example, overloading based on bool/int parameter doesn't work and */
- /* so should be avoided in portable programs */
- typedef unsigned int bool;
-#endif /* bool */
-
-/* deal with TRUE/true stuff: we assume that if the compiler supports bool, it */
-/* supports true/false as well and that, OTOH, if it does _not_ support bool, */
-/* it doesn't support these keywords (this is less sure, in particular VC++ */
-/* 4.x could be a problem here) */
-#ifndef HAVE_BOOL
- #define true ((bool)1)
- #define false ((bool)0)
-#endif
-#endif
-
-/* for backwards compatibility, also define TRUE and FALSE */
-/* */
-/* note that these definitions should work both in C++ and C code, so don't */
-/* use true/false below */
-#ifndef TRUE
- #define TRUE 1
-#endif
-
-#ifndef FALSE
- #define FALSE 0
-#endif
-
-typedef short int WXTYPE;
-
-/* special care should be taken with this type under Windows where the real */
-/* window id is unsigned, so we must always do the cast before comparing them */
-/* (or else they would be always different!). Using wxGetWindowId() which does */
-/* the cast itself is recommended. Note that this type can't be unsigned */
-/* because wxID_ANY == -1 is a valid (and largely used) value for window id. */
-typedef int wxWindowID;
-
-/* ---------------------------------------------------------------------------- */
-/* other feature tests */
-/* ---------------------------------------------------------------------------- */
-
-/* Every ride down a slippery slope begins with a single step.. */
-/* */
-/* Yes, using nested classes is indeed against our coding standards in */
-/* general, but there are places where you can use them to advantage */
-/* without totally breaking ports that cannot use them. If you do, then */
-/* wrap it in this guard, but such cases should still be relatively rare. */
-#define wxUSE_NESTED_CLASSES 1
-
-/* check for explicit keyword support */
-#ifndef HAVE_EXPLICIT
- #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
- /* VC++ 6.0 and 5.0 have explicit (what about earlier versions?) */
- #define HAVE_EXPLICIT
- #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
- && wxCHECK_GCC_VERSION(2, 95)
- /* GCC 2.95 has explicit, what about earlier versions? */
- #define HAVE_EXPLICIT
- #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520)
- /* BC++ 4.52 doesn't support explicit, CBuilder 1 does */
- #define HAVE_EXPLICIT
- #elif defined(__MWERKS__) && (__MWERKS__ >= 0x2400)
- /* Metrowerks CW6 or higher has explicit */
- #define HAVE_EXPLICIT
- #elif defined(__DIGITALMARS__)
- #define HAVE_EXPLICIT
- #endif
-#endif /* !HAVE_EXPLICIT */
-
-#ifdef HAVE_EXPLICIT
- #define wxEXPLICIT explicit
-#else /* !HAVE_EXPLICIT */
- #define wxEXPLICIT
-#endif /* HAVE_EXPLICIT/!HAVE_EXPLICIT */
-
-/* check for static/const_cast<>() (we don't use the other ones for now) */
-#ifndef HAVE_CXX_CASTS
- #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
- /* VC++ 6.0 and 5.0 have C++ casts (what about earlier versions?) */
- #define HAVE_CXX_CASTS
- #elif defined(__MINGW32__) || defined(__CYGWIN32__)
- #if wxCHECK_GCC_VERSION(2, 95)
- /* GCC 2.95 has C++ casts, what about earlier versions? */
- #define HAVE_CXX_CASTS
- #endif
- #endif
-#endif /* !HAVE_CXX_CASTS */
-
-#ifdef HAVE_CXX_CASTS
- #ifndef HAVE_CONST_CAST
- #define HAVE_CONST_CAST
- #endif
- #ifndef HAVE_REINTERPRET_CAST
- #define HAVE_REINTERPRET_CAST
- #endif
- #ifndef HAVE_STATIC_CAST
- #define HAVE_STATIC_CAST
- #endif
- #ifndef HAVE_DYNAMIC_CAST
- #define HAVE_DYNAMIC_CAST
- #endif
-#endif /* HAVE_CXX_CASTS */
-
-#ifdef HAVE_STATIC_CAST
- #define wx_static_cast(t, x) static_cast(x)
-#else
- #define wx_static_cast(t, x) ((t)(x))
-#endif
-
-#ifdef HAVE_CONST_CAST
- #define wx_const_cast(t, x) const_cast(x)
-#else
- #define wx_const_cast(t, x) ((t)(x))
-#endif
-
-#ifdef HAVE_REINTERPRET_CAST
- #define wx_reinterpret_cast(t, x) reinterpret_cast(x)
-#else
- #define wx_reinterpret_cast(t, x) ((t)(x))
-#endif
-
-/*
- This one is a wx invention: like static cast but used when we intentionally
- truncate from a larger to smaller type, static_cast<> can't be used for it
- as it results in warnings when using some compilers (SGI mipspro for example)
- */
-#if defined(__INTELC__) && defined(__cplusplus)
- template
- inline T wx_truncate_cast_impl(X x)
- {
- #pragma warning(push)
- /* implicit conversion of a 64-bit integral type to a smaller integral type */
- #pragma warning(disable: 1682)
- /* conversion from "X" to "T" may lose significant bits */
- #pragma warning(disable: 810)
-
- return x;
-
- #pragma warning(pop)
- }
-
- #define wx_truncate_cast(t, x) wx_truncate_cast_impl(x)
-
-#elif defined(__cplusplus) && defined(__VISUALC__) && __VISUALC__ >= 1310
- template
- inline T wx_truncate_cast_impl(X x)
- {
- #pragma warning(push)
- /* conversion from 'X' to 'T', possible loss of data */
- #pragma warning(disable: 4267)
-
- return x;
-
- #pragma warning(pop)
- }
-
- #define wx_truncate_cast(t, x) wx_truncate_cast_impl(x)
-#else
- #define wx_truncate_cast(t, x) ((t)(x))
-#endif
-
-/* for consistency with wxStatic/DynamicCast defined in wx/object.h */
-#define wxConstCast(obj, className) wx_const_cast(className *, obj)
-
-#ifndef HAVE_STD_WSTRING
- #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
- /* VC++ 6.0 and 5.0 have std::wstring (what about earlier versions?) */
- #define HAVE_STD_WSTRING
- #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
- && wxCHECK_GCC_VERSION(3, 3)
- /* GCC 3.1 has std::wstring; 3.0 never was in MinGW, 2.95 hasn't it */
- #define HAVE_STD_WSTRING
- #endif
-#endif
-
-#ifndef HAVE_STD_STRING_COMPARE
- #if defined(__VISUALC__) && (__VISUALC__ >= 1100)
- /* VC++ 6.0 and 5.0 have std::string::compare */
- /* (what about earlier versions?) */
- #define HAVE_STD_STRING_COMPARE
- #elif ( defined(__MINGW32__) || defined(__CYGWIN32__) ) \
- && wxCHECK_GCC_VERSION(3, 1)
- /* GCC 3.1 has std::string::compare; */
- /* 3.0 never was in MinGW, 2.95 hasn't it */
- #define HAVE_STD_STRING_COMPARE
- #endif
-#endif
-
-/* provide replacement for C99 va_copy() if the compiler doesn't have it */
-
-/* could be already defined by configure or the user */
-#ifndef wxVaCopy
- /* if va_copy is a macro or configure detected that we have it, use it */
- #if defined(va_copy) || defined(HAVE_VA_COPY)
- #define wxVaCopy va_copy
- #else /* no va_copy, try to provide a replacement */
- /*
- configure tries to determine whether va_list is an array or struct
- type, but it may not be used under Windows, so deal with a few
- special cases.
- */
-
- #ifdef __WATCOMC__
- /* Watcom uses array type for va_list except for PPC and Alpha */
- #if !defined(__PPC__) && !defined(__AXP__)
- #define VA_LIST_IS_ARRAY
- #endif
- #endif /* __WATCOMC__ */
-
- #if defined(__PPC__) && (defined(_CALL_SYSV) || defined (_WIN32))
- /*
- PPC using SysV ABI and NT/PPC are special in that they use an
- extra level of indirection.
- */
- #define VA_LIST_IS_POINTER
- #endif /* SysV or Win32 on __PPC__ */
-
- /*
- note that we use memmove(), not memcpy(), in case anybody tries
- to do wxVaCopy(ap, ap)
- */
- #if defined(VA_LIST_IS_POINTER)
- #define wxVaCopy(d, s) memmove(*(d), *(s), sizeof(va_list))
- #elif defined(VA_LIST_IS_ARRAY)
- #define wxVaCopy(d, s) memmove((d), (s), sizeof(va_list))
- #else /* we can only hope that va_lists are simple lvalues */
- #define wxVaCopy(d, s) ((d) = (s))
- #endif
- #endif /* va_copy/!va_copy */
-#endif /* wxVaCopy */
-
-
-/* ---------------------------------------------------------------------------- */
-/* portable calling conventions macros */
-/* ---------------------------------------------------------------------------- */
-
-/* stdcall is used for all functions called by Windows under Windows */
-#if defined(__WINDOWS__)
- #if defined(__GNUWIN32__)
- #define wxSTDCALL __attribute__((stdcall))
- #else
- /* both VC++ and Borland understand this */
- #define wxSTDCALL _stdcall
- #endif
-
-#else /* Win */
- /* no such stupidness under Unix */
- #define wxSTDCALL
-#endif /* platform */
-
-/* LINKAGEMODE mode is empty for everyting except OS/2 */
-#ifndef LINKAGEMODE
- #define LINKAGEMODE
-#endif /* LINKAGEMODE */
-
-/* wxCALLBACK should be used for the functions which are called back by */
-/* Windows (such as compare function for wxListCtrl) */
-#if defined(__WIN32__) && !defined(__WXMICROWIN__)
- #define wxCALLBACK wxSTDCALL
-#else
- /* no stdcall under Unix nor Win16 */
- #define wxCALLBACK
-#endif /* platform */
-
-/* generic calling convention for the extern "C" functions */
-
-#if defined(__VISUALC__)
- #define wxC_CALLING_CONV _cdecl
-#elif defined(__VISAGECPP__)
- #define wxC_CALLING_CONV _Optlink
-#else /* !Visual C++ */
- #define wxC_CALLING_CONV
-#endif /* compiler */
-
-/* callling convention for the qsort(3) callback */
-#define wxCMPFUNC_CONV wxC_CALLING_CONV
-
-/* compatibility :-( */
-#define CMPFUNC_CONV wxCMPFUNC_CONV
-
-/* DLL import/export declarations */
-#include "wx/dlimpexp.h"
-
-/* ---------------------------------------------------------------------------- */
-/* Very common macros */
-/* ---------------------------------------------------------------------------- */
-
-/* Printf-like attribute definitions to obtain warnings with GNU C/C++ */
-#ifndef ATTRIBUTE_PRINTF
-# if defined(__GNUC__) && !wxUSE_UNICODE
-# define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n)))
-# else
-# define ATTRIBUTE_PRINTF(m, n)
-# endif
-
-# define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
-# define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
-# define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
-# define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
-# define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
-#endif /* !defined(ATTRIBUTE_PRINTF) */
-
-/* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */
-#if wxCHECK_GCC_VERSION(3, 1)
- #define wxDEPRECATED(x) x __attribute__ ((deprecated))
-#elif defined(__VISUALC__) && (__VISUALC__ >= 1300)
- #define wxDEPRECATED(x) __declspec(deprecated) x
-#else
- #define wxDEPRECATED(x) x
-#endif
-
-/* everybody gets the assert and other debug macros */
-#include "wx/debug.h"
-
-/* NULL declaration: it must be defined as 0 for C++ programs (in particular, */
-/* it must not be defined as "(void *)0" which is standard for C but completely */
-/* breaks C++ code) */
-#ifndef __HANDHELDPC__
-#include
-#endif
-
-/* delete pointer if it is not NULL and NULL it afterwards */
-/* (checking that it's !NULL before passing it to delete is just a */
-/* a question of style, because delete will do it itself anyhow, but it might */
-/* be considered as an error by some overzealous debugging implementations of */
-/* the library, so we do it ourselves) */
-#define wxDELETE(p) if ( (p) != NULL ) { delete p; p = NULL; }
-
-/* delete an array and NULL it (see comments above) */
-#define wxDELETEA(p) if ( (p) ) { delete [] (p); p = NULL; }
-
-/* size of statically declared array */
-#define WXSIZEOF(array) (sizeof(array)/sizeof(array[0]))
-
-/* symbolic constant used by all Find()-like functions returning positive */
-/* integer on success as failure indicator */
-#define wxNOT_FOUND (-1)
-
-/* ---------------------------------------------------------------------------- */
-/* macros to avoid compiler warnings */
-/* ---------------------------------------------------------------------------- */
-
-/* Macro to cut down on compiler warnings. */
-#if 1 /* there should be no more any compilers needing the "#else" version */
- #define WXUNUSED(identifier) /* identifier */
-#else /* stupid, broken compiler */
- #define WXUNUSED(identifier) identifier
-#endif
-
-/* some arguments are only used in debug mode, but unused in release one */
-#ifdef __WXDEBUG__
- #define WXUNUSED_UNLESS_DEBUG(param) param
-#else
- #define WXUNUSED_UNLESS_DEBUG(param) WXUNUSED(param)
-#endif
-
-/* some arguments are not used in unicode mode */
-#if wxUSE_UNICODE
- #define WXUNUSED_IN_UNICODE(param) WXUNUSED(param)
-#else
- #define WXUNUSED_IN_UNICODE(param) param
-#endif
-
-/* some arguments are not used in WinCE build */
-#ifdef __WXWINCE__
- #define WXUNUSED_IN_WINCE(param) WXUNUSED(param)
-#else
- #define WXUNUSED_IN_WINCE(param) param
-#endif
-
-/* unused parameters in non stream builds */
-#if wxUSE_STREAMS
- #define WXUNUSED_UNLESS_STREAMS(param) param
-#else
- #define WXUNUSED_UNLESS_STREAMS(param) WXUNUSED(param)
-#endif
-
-/* some compilers give warning about a possibly unused variable if it is */
-/* initialized in both branches of if/else and shut up if it is initialized */
-/* when declared, but other compilers then give warnings about unused variable */
-/* value -- this should satisfy both of them */
-#if defined(__VISUALC__)
- #define wxDUMMY_INITIALIZE(val) = val
-#else
- #define wxDUMMY_INITIALIZE(val)
-#endif
-
-/* sometimes the value of a variable is *really* not used, to suppress the */
-/* resulting warning you may pass it to this function */
-#ifdef __cplusplus
-# ifdef __BORLANDC__
-# define wxUnusedVar(identifier) identifier
-# else
- template
- inline void wxUnusedVar(const T& WXUNUSED(t)) { }
-# endif
-#endif
-
-/* ---------------------------------------------------------------------------- */
-/* compiler specific settings */
-/* ---------------------------------------------------------------------------- */
-
-/* to allow compiling with warning level 4 under Microsoft Visual C++ some */
-/* warnings just must be disabled */
-#ifdef __VISUALC__
- #pragma warning(disable: 4514) /* unreferenced inline func has been removed */
-/*
- you might be tempted to disable this one also: triggered by CHECK and FAIL
- macros in debug.h, but it's, overall, a rather useful one, so I leave it and
- will try to find some way to disable this warning just for CHECK/FAIL. Anyone?
-*/
- #pragma warning(disable: 4127) /* conditional expression is constant */
-#endif /* VC++ */
-
-#if defined(__MWERKS__)
- #undef try
- #undef except
- #undef finally
- #define except(x) catch(...)
-#endif /* Metrowerks */
-
-#if wxONLY_WATCOM_EARLIER_THAN(1,4)
- typedef short mode_t;
-#endif
-
-/* where should i put this? we need to make sure of this as it breaks */
-/* the code. */
-#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
-# ifndef __MWERKS__
-/* #undef __WXDEBUG__ */
-# ifdef wxUSE_DEBUG_NEW_ALWAYS
-# undef wxUSE_DEBUG_NEW_ALWAYS
-# define wxUSE_DEBUG_NEW_ALWAYS 0
-# endif
-# endif
-#endif
-
-/* ---------------------------------------------------------------------------- */
-/* standard wxWidgets types */
-/* ---------------------------------------------------------------------------- */
-
-/* the type for screen and DC coordinates */
-typedef int wxCoord;
-
-enum { wxDefaultCoord = -1 };
-
-/* ---------------------------------------------------------------------------- */
-/* define fixed length types */
-/* ---------------------------------------------------------------------------- */
-
-#if defined(__WXPALMOS__) || defined(__MINGW32__)
- #include
-#endif
-
-/* chars are always one byte (by definition), shorts are always two (in */
-/* practice) */
-
-/* 8bit */
-#ifndef SIZEOF_CHAR
- #define SIZEOF_CHAR 1
-#endif
-typedef signed char wxInt8;
-typedef unsigned char wxUint8;
-typedef wxUint8 wxByte;
-
-
-/* 16bit */
-#ifdef SIZEOF_SHORT
- #if SIZEOF_SHORT != 2
- #error "wxWidgets assumes sizeof(short) == 2, please fix the code"
- #endif
-#else
- #define SIZEOF_SHORT 2
-#endif
-
-typedef signed short wxInt16;
-typedef unsigned short wxUint16;
-
-typedef wxUint16 wxWord;
-
-/*
- things are getting more interesting with ints, longs and pointers
-
- there are several different standard data models described by this table:
-
- +-----------+----------------------------+
- |type\model | LP64 ILP64 LLP64 ILP32 LP32|
- +-----------+----------------------------+
- |char | 8 8 8 8 8 |
- |short | 16 16 16 16 16 |
- |int | 32 64 32 32 16 |
- |long | 64 64 32 32 32 |
- |long long | 64 |
- |void * | 64 64 64 32 32 |
- +-----------+----------------------------+
-
- Win16 used LP32 (but we don't support it any longer), Win32 obviously used
- ILP32 and Win64 uses LLP64 (a.k.a. P64)
-
- Under Unix LP64 is the most widely used (the only I've ever seen, in fact)
- */
-
-/* 32bit */
-#ifdef __PALMOS__
- typedef int wxInt32;
- typedef unsigned int wxUint32;
- #define SIZEOF_INT 4
- #define SIZEOF_LONG 4
- #define SIZEOF_WCHAR_T 2
- #define SIZEOF_SIZE_T 4
- #define wxSIZE_T_IS_UINT
- #define SIZEOF_VOID_P 4
- #define SIZEOF_SIZE_T 4
-#elif defined(__WINDOWS__)
- /* Win64 uses LLP64 model and so ints and longs have the same size as in */
- /* Win32 */
- #if defined(__WIN32__)
- typedef int wxInt32;
- typedef unsigned int wxUint32;
-
- /* Assume that if SIZEOF_INT is defined that all the other ones except
- SIZEOF_SIZE_T, are too. See next #if below. */
- #ifndef SIZEOF_INT
- #define SIZEOF_INT 4
- #define SIZEOF_LONG 4
- #define SIZEOF_WCHAR_T 2
-
- /*
- under Win64 sizeof(size_t) == 8 and so it is neither unsigned
- int nor unsigned long!
- */
- #ifdef __WIN64__
- #define SIZEOF_SIZE_T 8
-
- #undef wxSIZE_T_IS_UINT
- #else /* Win32 */
- #define SIZEOF_SIZE_T 4
-
- #define wxSIZE_T_IS_UINT
- #endif
- #undef wxSIZE_T_IS_ULONG
-
- #ifdef __WIN64__
- #define SIZEOF_VOID_P 8
- #else /* Win32 */
- #define SIZEOF_VOID_P 4
- #endif /* Win64/32 */
- #endif /* !defined(SIZEOF_INT) */
-
- /*
- If Python.h was included first, it defines all of the SIZEOF's above
- except for SIZEOF_SIZE_T, so we need to do it here to avoid
- triggering the #error in the ssize_t typedefs below...
- */
- #ifndef SIZEOF_SIZE_T
- #ifdef __WIN64__
- #define SIZEOF_SIZE_T 8
- #else /* Win32 */
- #define SIZEOF_SIZE_T 4
- #endif
- #endif
- #else
- #error "Unsupported Windows version"
- #endif
-#else /* !Windows */
- /* SIZEOF_XXX are normally defined by configure */
- #ifdef SIZEOF_INT
- #if SIZEOF_INT == 8
- /* must be ILP64 data model, there is normally a special 32 bit */
- /* type in it but we don't know what it is... */
- #error "No 32bit int type on this platform"
- #elif SIZEOF_INT == 4
- typedef int wxInt32;
- typedef unsigned int wxUint32;
- #elif SIZEOF_INT == 2
- /* must be LP32 */
- #if SIZEOF_LONG != 4
- #error "No 32bit int type on this platform"
- #endif
-
- typedef long wxInt32;
- typedef unsigned long wxUint32;
- #else
- /* wxWidgets is not ready for 128bit systems yet... */
- #error "Unknown sizeof(int) value, what are you compiling for?"
- #endif
- #else /* !defined(SIZEOF_INT) */
- /* assume default 32bit machine -- what else can we do? */
- wxCOMPILE_TIME_ASSERT( sizeof(int) == 4, IntMustBeExactly4Bytes);
- wxCOMPILE_TIME_ASSERT( sizeof(size_t) == 4, SizeTMustBeExactly4Bytes);
- wxCOMPILE_TIME_ASSERT( sizeof(void *) == 4, PtrMustBeExactly4Bytes);
-
- #define SIZEOF_INT 4
- #define SIZEOF_SIZE_T 4
- #define SIZEOF_VOID_P 4
-
- typedef int wxInt32;
- typedef unsigned int wxUint32;
-
- #if defined(__MACH__) && !defined(SIZEOF_WCHAR_T)
- #define SIZEOF_WCHAR_T 4
- #endif
- #if wxUSE_WCHAR_T && !defined(SIZEOF_WCHAR_T)
- /* also assume that sizeof(wchar_t) == 2 (under Unix the most */
- /* common case is 4 but there configure would have defined */
- /* SIZEOF_WCHAR_T for us) */
- /* the most common case */
- wxCOMPILE_TIME_ASSERT( sizeof(wchar_t) == 2,
- Wchar_tMustBeExactly2Bytes);
-
- #define SIZEOF_WCHAR_T 2
- #endif /* wxUSE_WCHAR_T */
- #endif
-#endif /* Win/!Win */
-
-typedef wxUint32 wxDword;
-
-/*
- Define an integral type big enough to contain all of long, size_t and void *.
- */
-#if SIZEOF_LONG >= SIZEOF_VOID_P && SIZEOF_LONG >= SIZEOF_SIZE_T
- /* normal case */
- typedef unsigned long wxUIntPtr;
-#elif SIZEOF_SIZE_T >= SIZEOF_VOID_P
- /* Win64 case */
- typedef size_t wxUIntPtr;
-#else
- /*
- This should never happen for the current architectures but if you're
- using one where it does, please contact wx-dev@lists.wxwidgets.org.
- */
- #error "Pointers can't be stored inside integer types."
-#endif
-
-#ifdef __cplusplus
-/* And also define a couple of simple functions to cast pointer to/from it. */
-inline wxUIntPtr wxPtrToUInt(const void *p)
-{
- /*
- VC++ 7.1 gives warnings about casts such as below even when they're
- explicit with /Wp64 option, suppress them as we really know what we're
- doing here. Same thing with icc with -Wall.
- */
-#ifdef __VISUALC__
- #if __VISUALC__ >= 1200
- #pragma warning(push)
- #endif
- /* pointer truncation from '' to '' */
- #pragma warning(disable: 4311)
-#elif defined(__INTELC__)
- #pragma warning(push)
- /* conversion from pointer to same-sized integral type */
- #pragma warning(disable: 1684)
-#endif
-
- return wx_reinterpret_cast(wxUIntPtr, p);
-
-#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__)
- #pragma warning(pop)
-#endif
-}
-
-inline void *wxUIntToPtr(wxUIntPtr p)
-{
-#ifdef __VISUALC__
- #if __VISUALC__ >= 1200
- #pragma warning(push)
- #endif
- /* conversion to type of greater size */
- #pragma warning(disable: 4312)
-#elif defined(__INTELC__)
- #pragma warning(push)
- /* invalid type conversion: "wxUIntPtr={unsigned long}" to "void *" */
- #pragma warning(disable: 171)
-#endif
-
- return wx_reinterpret_cast(void *, p);
-
-#if (defined(__VISUALC__) && __VISUALC__ >= 1200) || defined(__INTELC__)
- #pragma warning(pop)
-#endif
-}
-#endif /*__cplusplus*/
-
-
-/* 64 bit */
-
-/* NB: we #define and not typedef wxLongLong_t because we use "#ifdef */
-/* wxLongLong_t" in wx/longlong.h */
-
-/* wxULongLong_t is set later (usually to unsigned wxLongLong_t) */
-
-/* to avoid compilation problems on 64bit machines with ambiguous method calls */
-/* we will need to define this */
-#undef wxLongLongIsLong
-
-/*
- First check for specific compilers which have known 64 bit integer types,
- this avoids clashes with SIZEOF_LONG[_LONG] being defined incorrectly for
- e.g. MSVC builds (Python.h defines it as 8 even for MSVC).
-
- Also notice that we check for "long long" before checking for 64 bit long as
- we still want to use "long long" and not "long" for wxLongLong_t on 64 bit
- architectures to be able to pass wxLongLong_t to the standard functions
- prototyped as taking "long long" such as strtoll().
- */
-#if (defined(__VISUALC__) && defined(__WIN32__))
- #define wxLongLong_t __int64
- #define wxLongLongSuffix i64
- #define wxLongLongFmtSpec _T("I64")
-#elif defined(__BORLANDC__) && defined(__WIN32__) && (__BORLANDC__ >= 0x520)
- #define wxLongLong_t __int64
- #define wxLongLongSuffix i64
- #define wxLongLongFmtSpec _T("L")
-#elif (defined(__WATCOMC__) && (defined(__WIN32__) || defined(__DOS__) || defined(__OS2__)))
- #define wxLongLong_t __int64
- #define wxLongLongSuffix i64
- #define wxLongLongFmtSpec _T("L")
-#elif defined(__DIGITALMARS__)
- #define wxLongLong_t __int64
- #define wxLongLongSuffix LL
- #define wxLongLongFmtSpec _T("ll")
-#elif defined(__MINGW32__)
- #define wxLongLong_t long long
- #define wxLongLongSuffix ll
- #define wxLongLongFmtSpec _T("I64")
-#elif defined(__MWERKS__)
- #if __option(longlong)
- #define wxLongLong_t long long
- #define wxLongLongSuffix ll
- #define wxLongLongFmtSpec _T("ll")
- #else
- #error "The 64 bit integer support in CodeWarrior has been disabled."
- #error "See the documentation on the 'longlong' pragma."
- #endif
-#elif defined(__WXPALMOS__)
- #define wxLongLong_t int64_t
- #define wxLongLongSuffix ll
- #define wxLongLongFmtSpec _T("ll")
-#elif defined(__VISAGECPP__) && __IBMCPP__ >= 400
- #define wxLongLong_t long long
-#elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \
- defined(__GNUC__) || \
- defined(__CYGWIN__) || \
- defined(__WXMICROWIN__) || \
- (defined(__DJGPP__) && __DJGPP__ >= 2)
- #define wxLongLong_t long long
- #define wxLongLongSuffix ll
- #define wxLongLongFmtSpec _T("ll")
-#elif defined(SIZEOF_LONG) && (SIZEOF_LONG == 8)
- #define wxLongLong_t long
- #define wxLongLongSuffix l
- #define wxLongLongFmtSpec _T("l")
- #define wxLongLongIsLong
-#endif
-
-
-#ifdef wxLongLong_t
-
- #ifdef __WXPALMOS__
- #define wxULongLong_t uint64_t
- #else
- #define wxULongLong_t unsigned wxLongLong_t
- #endif
-
- /* these macros allow to define 64 bit constants in a portable way */
- #define wxLL(x) wxCONCAT(x, wxLongLongSuffix)
- #define wxULL(x) wxCONCAT(x, wxCONCAT(u, wxLongLongSuffix))
-
- typedef wxLongLong_t wxInt64;
- typedef wxULongLong_t wxUint64;
-
- #define wxHAS_INT64 1
-
-#elif wxUSE_LONGLONG
- /* these macros allow to define 64 bit constants in a portable way */
- #define wxLL(x) wxLongLong(x)
- #define wxULL(x) wxULongLong(x)
-
- #define wxInt64 wxLongLong
- #define wxUint64 wxULongLong
-
- #define wxHAS_INT64 1
-
-#else /* !wxUSE_LONGLONG */
-
- #define wxHAS_INT64 0
-
-#endif
-
-
-/* Make sure ssize_t is defined (a signed type the same size as size_t) */
-/* HAVE_SSIZE_T should be defined for compiliers that already have it */
-#ifdef __MINGW32__
- #if defined(_SSIZE_T_) && !defined(HAVE_SSIZE_T)
- #define HAVE_SSIZE_T
- #endif
-#endif
-#if defined(__PALMOS__) && !defined(HAVE_SSIZE_T)
- #define HAVE_SSIZE_T
-#endif
-#if wxCHECK_WATCOM_VERSION(1,4)
- #define HAVE_SSIZE_T
-#endif
-#ifndef HAVE_SSIZE_T
- #if SIZEOF_SIZE_T == 4
- typedef wxInt32 ssize_t;
- #elif SIZEOF_SIZE_T == 8
- typedef wxInt64 ssize_t;
- #else
- #error "error defining ssize_t, size_t is not 4 or 8 bytes"
- #endif
-#endif
-
-
-/* base floating point types */
-/* wxFloat32: 32 bit IEEE float ( 1 sign, 8 exponent bits, 23 fraction bits */
-/* wxFloat64: 64 bit IEEE float ( 1 sign, 11 exponent bits, 52 fraction bits */
-/* wxDouble: native fastest representation that has at least wxFloat64 */
-/* precision, so use the IEEE types for storage, and this for */
-/* calculations */
-
-typedef float wxFloat32;
-#if (defined( __WXMAC__ ) || defined(__WXCOCOA__)) && defined (__MWERKS__)
- typedef short double wxFloat64;
-#else
- typedef double wxFloat64;
-#endif
-
-typedef double wxDouble;
-
-/*
- Some (non standard) compilers typedef wchar_t as an existing type instead
- of treating it as a real fundamental type, set wxWCHAR_T_IS_REAL_TYPE to 0
- for them and to 1 for all the others.
- */
-#if wxUSE_WCHAR_T
- /*
- VC++ typedefs wchar_t as unsigned short by default, that is unless
- /Za or /Zc:wchar_t option is used in which case _WCHAR_T_DEFINED is
- defined.
- */
-# if defined(__VISUALC__) && !defined(_NATIVE_WCHAR_T_DEFINED)
-# define wxWCHAR_T_IS_REAL_TYPE 0
-# else /* compiler having standard-conforming wchar_t */
-# define wxWCHAR_T_IS_REAL_TYPE 1
-# endif
-#endif /* wxUSE_WCHAR_T */
-
-/* ---------------------------------------------------------------------------- */
-/* byte ordering related definition and macros */
-/* ---------------------------------------------------------------------------- */
-
-/* byte sex */
-
-#define wxBIG_ENDIAN 4321
-#define wxLITTLE_ENDIAN 1234
-#define wxPDP_ENDIAN 3412
-
-#ifdef WORDS_BIGENDIAN
-#define wxBYTE_ORDER wxBIG_ENDIAN
-#else
-#define wxBYTE_ORDER wxLITTLE_ENDIAN
-#endif
-
-/* byte swapping */
-
-#if defined (__MWERKS__) && ( (__MWERKS__ < 0x0900) || macintosh )
-/* assembler versions for these */
-#ifdef __POWERPC__
- inline wxUint16 wxUINT16_SWAP_ALWAYS( wxUint16 i )
- {return (__lhbrx( &i , 0 ) );}
- inline wxInt16 wxINT16_SWAP_ALWAYS( wxInt16 i )
- {return (__lhbrx( &i , 0 ) );}
- inline wxUint32 wxUINT32_SWAP_ALWAYS( wxUint32 i )
- {return (__lwbrx( &i , 0 ) );}
- inline wxInt32 wxINT32_SWAP_ALWAYS( wxInt32 i )
- {return (__lwbrx( &i , 0 ) );}
-#else
- #pragma parameter __D0 wxUINT16_SWAP_ALWAYS(__D0)
- pascal wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value)
- = { 0xE158 };
-
- #pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0)
- pascal wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value)
- = { 0xE158 };
-
- #pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0)
- pascal wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value)
- = { 0xE158, 0x4840, 0xE158 };
-
- #pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0)
- pascal wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value)
- = { 0xE158, 0x4840, 0xE158 };
-
-#endif
-#else /* !MWERKS */
-#define wxUINT16_SWAP_ALWAYS(val) \
- ((wxUint16) ( \
- (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
- (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8)))
-
-#define wxINT16_SWAP_ALWAYS(val) \
- ((wxInt16) ( \
- (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \
- (((wxUint16) (val) & (wxUint16) 0xff00U) >> 8)))
-
-#define wxUINT32_SWAP_ALWAYS(val) \
- ((wxUint32) ( \
- (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
- (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
- (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
- (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
-
-#define wxINT32_SWAP_ALWAYS(val) \
- ((wxInt32) ( \
- (((wxUint32) (val) & (wxUint32) 0x000000ffU) << 24) | \
- (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \
- (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \
- (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24)))
-#endif
-/* machine specific byte swapping */
-
-#ifdef wxLongLong_t
- #define wxUINT64_SWAP_ALWAYS(val) \
- ((wxUint64) ( \
- (((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56)))
-
- #define wxINT64_SWAP_ALWAYS(val) \
- ((wxInt64) ( \
- (((wxUint64) (val) & (wxUint64) wxULL(0x00000000000000ff)) << 56) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x000000000000ff00)) << 40) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x0000000000ff0000)) << 24) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x00000000ff000000)) << 8) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x000000ff00000000)) >> 8) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x0000ff0000000000)) >> 24) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0x00ff000000000000)) >> 40) | \
- (((wxUint64) (val) & (wxUint64) wxULL(0xff00000000000000)) >> 56)))
-#elif wxUSE_LONGLONG /* !wxLongLong_t */
- #define wxUINT64_SWAP_ALWAYS(val) \
- ((wxUint64) ( \
- ((wxULongLong(val) & wxULongLong(0L, 0x000000ffU)) << 56) | \
- ((wxULongLong(val) & wxULongLong(0L, 0x0000ff00U)) << 40) | \
- ((wxULongLong(val) & wxULongLong(0L, 0x00ff0000U)) << 24) | \
- ((wxULongLong(val) & wxULongLong(0L, 0xff000000U)) << 8) | \
- ((wxULongLong(val) & wxULongLong(0x000000ffL, 0U)) >> 8) | \
- ((wxULongLong(val) & wxULongLong(0x0000ff00L, 0U)) >> 24) | \
- ((wxULongLong(val) & wxULongLong(0x00ff0000L, 0U)) >> 40) | \
- ((wxULongLong(val) & wxULongLong(0xff000000L, 0U)) >> 56)))
-
- #define wxINT64_SWAP_ALWAYS(val) \
- ((wxInt64) ( \
- ((wxLongLong(val) & wxLongLong(0L, 0x000000ffU)) << 56) | \
- ((wxLongLong(val) & wxLongLong(0L, 0x0000ff00U)) << 40) | \
- ((wxLongLong(val) & wxLongLong(0L, 0x00ff0000U)) << 24) | \
- ((wxLongLong(val) & wxLongLong(0L, 0xff000000U)) << 8) | \
- ((wxLongLong(val) & wxLongLong(0x000000ffL, 0U)) >> 8) | \
- ((wxLongLong(val) & wxLongLong(0x0000ff00L, 0U)) >> 24) | \
- ((wxLongLong(val) & wxLongLong(0x00ff0000L, 0U)) >> 40) | \
- ((wxLongLong(val) & wxLongLong(0xff000000L, 0U)) >> 56)))
-#endif /* wxLongLong_t/!wxLongLong_t */
-
-#ifdef WORDS_BIGENDIAN
- #define wxUINT16_SWAP_ON_BE(val) wxUINT16_SWAP_ALWAYS(val)
- #define wxINT16_SWAP_ON_BE(val) wxINT16_SWAP_ALWAYS(val)
- #define wxUINT16_SWAP_ON_LE(val) (val)
- #define wxINT16_SWAP_ON_LE(val) (val)
- #define wxUINT32_SWAP_ON_BE(val) wxUINT32_SWAP_ALWAYS(val)
- #define wxINT32_SWAP_ON_BE(val) wxINT32_SWAP_ALWAYS(val)
- #define wxUINT32_SWAP_ON_LE(val) (val)
- #define wxINT32_SWAP_ON_LE(val) (val)
- #if wxHAS_INT64
- #define wxUINT64_SWAP_ON_BE(val) wxUINT64_SWAP_ALWAYS(val)
- #define wxUINT64_SWAP_ON_LE(val) (val)
- #endif
-#else
- #define wxUINT16_SWAP_ON_LE(val) wxUINT16_SWAP_ALWAYS(val)
- #define wxINT16_SWAP_ON_LE(val) wxINT16_SWAP_ALWAYS(val)
- #define wxUINT16_SWAP_ON_BE(val) (val)
- #define wxINT16_SWAP_ON_BE(val) (val)
- #define wxUINT32_SWAP_ON_LE(val) wxUINT32_SWAP_ALWAYS(val)
- #define wxINT32_SWAP_ON_LE(val) wxINT32_SWAP_ALWAYS(val)
- #define wxUINT32_SWAP_ON_BE(val) (val)
- #define wxINT32_SWAP_ON_BE(val) (val)
- #if wxHAS_INT64
- #define wxUINT64_SWAP_ON_LE(val) wxUINT64_SWAP_ALWAYS(val)
- #define wxUINT64_SWAP_ON_BE(val) (val)
- #endif
-#endif
-
-/* ---------------------------------------------------------------------------- */
-/* Geometric flags */
-/* ---------------------------------------------------------------------------- */
-
-enum wxGeometryCentre
-{
- wxCENTRE = 0x0001,
- wxCENTER = wxCENTRE
-};
-
-/* centering into frame rather than screen (obsolete) */
-#define wxCENTER_FRAME 0x0000
-/* centre on screen rather than parent */
-#define wxCENTRE_ON_SCREEN 0x0002
-#define wxCENTER_ON_SCREEN wxCENTRE_ON_SCREEN
-
-enum wxOrientation
-{
- /* don't change the values of these elements, they are used elsewhere */
- wxHORIZONTAL = 0x0004,
- wxVERTICAL = 0x0008,
-
- wxBOTH = wxVERTICAL | wxHORIZONTAL
-};
-
-enum wxDirection
-{
- wxLEFT = 0x0010,
- wxRIGHT = 0x0020,
- wxUP = 0x0040,
- wxDOWN = 0x0080,
-
- wxTOP = wxUP,
- wxBOTTOM = wxDOWN,
-
- wxNORTH = wxUP,
- wxSOUTH = wxDOWN,
- wxWEST = wxLEFT,
- wxEAST = wxRIGHT,
-
- wxALL = (wxUP | wxDOWN | wxRIGHT | wxLEFT)
-};
-
-enum wxAlignment
-{
- wxALIGN_NOT = 0x0000,
- wxALIGN_CENTER_HORIZONTAL = 0x0100,
- wxALIGN_CENTRE_HORIZONTAL = wxALIGN_CENTER_HORIZONTAL,
- wxALIGN_LEFT = wxALIGN_NOT,
- wxALIGN_TOP = wxALIGN_NOT,
- wxALIGN_RIGHT = 0x0200,
- wxALIGN_BOTTOM = 0x0400,
- wxALIGN_CENTER_VERTICAL = 0x0800,
- wxALIGN_CENTRE_VERTICAL = wxALIGN_CENTER_VERTICAL,
-
- wxALIGN_CENTER = (wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL),
- wxALIGN_CENTRE = wxALIGN_CENTER,
-
- /* a mask to extract alignment from the combination of flags */
- wxALIGN_MASK = 0x0f00
-};
-
-enum wxStretch
-{
- wxSTRETCH_NOT = 0x0000,
- wxSHRINK = 0x1000,
- wxGROW = 0x2000,
- wxEXPAND = wxGROW,
- wxSHAPED = 0x4000,
- wxFIXED_MINSIZE = 0x8000,
-#if wxABI_VERSION >= 20808
- wxRESERVE_SPACE_EVEN_IF_HIDDEN = 0x0002,
-#endif
- wxTILE = 0xc000,
-
- /* for compatibility only, default now, don't use explicitly any more */
-#if WXWIN_COMPATIBILITY_2_4
- wxADJUST_MINSIZE = 0x00100000
-#else
- wxADJUST_MINSIZE = 0
-#endif
-};
-
-/* border flags: the values are chosen for backwards compatibility */
-enum wxBorder
-{
- /* this is different from wxBORDER_NONE as by default the controls do have */
- /* border */
- wxBORDER_DEFAULT = 0,
-
- wxBORDER_NONE = 0x00200000,
- wxBORDER_STATIC = 0x01000000,
- wxBORDER_SIMPLE = 0x02000000,
- wxBORDER_RAISED = 0x04000000,
- wxBORDER_SUNKEN = 0x08000000,
- wxBORDER_DOUBLE = 0x10000000, /* deprecated */
- wxBORDER_THEME = 0x10000000,
-
- /* a mask to extract border style from the combination of flags */
- wxBORDER_MASK = 0x1f200000
-};
-
-/* This makes it easier to specify a 'normal' border for a control */
-#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
-#define wxDEFAULT_CONTROL_BORDER wxBORDER_SIMPLE
-#else
-#define wxDEFAULT_CONTROL_BORDER wxBORDER_SUNKEN
-#endif
-
-/* ---------------------------------------------------------------------------- */
-/* Window style flags */
-/* ---------------------------------------------------------------------------- */
-
-/*
- * Values are chosen so they can be |'ed in a bit list.
- * Some styles are used across more than one group,
- * so the values mustn't clash with others in the group.
- * Otherwise, numbers can be reused across groups.
- *
- * From version 1.66:
- * Window (cross-group) styles now take up the first half
- * of the flag, and control-specific styles the
- * second half.
- *
- */
-
-/*
- * Window (Frame/dialog/subwindow/panel item) style flags
- */
-#define wxVSCROLL 0x80000000
-#define wxHSCROLL 0x40000000
-#define wxCAPTION 0x20000000
-
-/* New styles (border styles are now in their own enum) */
-#define wxDOUBLE_BORDER wxBORDER_DOUBLE
-#define wxSUNKEN_BORDER wxBORDER_SUNKEN
-#define wxRAISED_BORDER wxBORDER_RAISED
-#define wxBORDER wxBORDER_SIMPLE
-#define wxSIMPLE_BORDER wxBORDER_SIMPLE
-#define wxSTATIC_BORDER wxBORDER_STATIC
-#define wxNO_BORDER wxBORDER_NONE
-
-/* wxALWAYS_SHOW_SB: instead of hiding the scrollbar when it is not needed, */
-/* disable it - but still show (see also wxLB_ALWAYS_SB style) */
-/* */
-/* NB: as this style is only supported by wxUniversal and wxMSW so far */
-#define wxALWAYS_SHOW_SB 0x00800000
-
-/* Clip children when painting, which reduces flicker in e.g. frames and */
-/* splitter windows, but can't be used in a panel where a static box must be */
-/* 'transparent' (panel paints the background for it) */
-#define wxCLIP_CHILDREN 0x00400000
-
-/* Note we're reusing the wxCAPTION style because we won't need captions */
-/* for subwindows/controls */
-#define wxCLIP_SIBLINGS 0x20000000
-
-#define wxTRANSPARENT_WINDOW 0x00100000
-
-/* Add this style to a panel to get tab traversal working outside of dialogs */
-/* (on by default for wxPanel, wxDialog, wxScrolledWindow) */
-#define wxTAB_TRAVERSAL 0x00080000
-
-/* Add this style if the control wants to get all keyboard messages (under */
-/* Windows, it won't normally get the dialog navigation key events) */
-#define wxWANTS_CHARS 0x00040000
-
-/* Make window retained (Motif only, see src/generic/scrolwing.cpp)
- * This is non-zero only under wxMotif, to avoid a clash with wxPOPUP_WINDOW
- * on other platforms
- */
-
-#ifdef __WXMOTIF__
-#define wxRETAINED 0x00020000
-#else
-#define wxRETAINED 0x00000000
-#endif
-#define wxBACKINGSTORE wxRETAINED
-
-/* set this flag to create a special popup window: it will be always shown on */
-/* top of other windows, will capture the mouse and will be dismissed when the */
-/* mouse is clicked outside of it or if it loses focus in any other way */
-#define wxPOPUP_WINDOW 0x00020000
-
-/* force a full repaint when the window is resized (instead of repainting just */
-/* the invalidated area) */
-#define wxFULL_REPAINT_ON_RESIZE 0x00010000
-
-/* obsolete: now this is the default behaviour */
-/* */
-/* don't invalidate the whole window (resulting in a PAINT event) when the */
-/* window is resized (currently, makes sense for wxMSW only) */
-#define wxNO_FULL_REPAINT_ON_RESIZE 0
-
-/* A mask which can be used to filter (out) all wxWindow-specific styles.
- */
-#define wxWINDOW_STYLE_MASK \
- (wxVSCROLL|wxHSCROLL|wxBORDER_MASK|wxALWAYS_SHOW_SB|wxCLIP_CHILDREN| \
- wxCLIP_SIBLINGS|wxTRANSPARENT_WINDOW|wxTAB_TRAVERSAL|wxWANTS_CHARS| \
- wxRETAINED|wxPOPUP_WINDOW|wxFULL_REPAINT_ON_RESIZE)
-
-/*
- * Extra window style flags (use wxWS_EX prefix to make it clear that they
- * should be passed to wxWindow::SetExtraStyle(), not SetWindowStyle())
- */
-
-/* by default, TransferDataTo/FromWindow() only work on direct children of the */
-/* window (compatible behaviour), set this flag to make them recursively */
-/* descend into all subwindows */
-#define wxWS_EX_VALIDATE_RECURSIVELY 0x00000001
-
-/* wxCommandEvents and the objects of the derived classes are forwarded to the */
-/* parent window and so on recursively by default. Using this flag for the */
-/* given window allows to block this propagation at this window, i.e. prevent */
-/* the events from being propagated further upwards. The dialogs have this */
-/* flag on by default. */
-#define wxWS_EX_BLOCK_EVENTS 0x00000002
-
-/* don't use this window as an implicit parent for the other windows: this must */
-/* be used with transient windows as otherwise there is the risk of creating a */
-/* dialog/frame with this window as a parent which would lead to a crash if the */
-/* parent is destroyed before the child */
-#define wxWS_EX_TRANSIENT 0x00000004
-
-/* don't paint the window background, we'll assume it will */
-/* be done by a theming engine. This is not yet used but could */
-/* possibly be made to work in the future, at least on Windows */
-#define wxWS_EX_THEMED_BACKGROUND 0x00000008
-
-/* this window should always process idle events */
-#define wxWS_EX_PROCESS_IDLE 0x00000010
-
-/* this window should always process UI update events */
-#define wxWS_EX_PROCESS_UI_UPDATES 0x00000020
-
-/* Draw the window in a metal theme on Mac */
-#define wxFRAME_EX_METAL 0x00000040
-#define wxDIALOG_EX_METAL 0x00000040
-
-/* Use this style to add a context-sensitive help to the window (currently for */
-/* Win32 only and it doesn't work if wxMINIMIZE_BOX or wxMAXIMIZE_BOX are used) */
-#define wxWS_EX_CONTEXTHELP 0x00000080
-
-/* synonyms for wxWS_EX_CONTEXTHELP for compatibility */
-#define wxFRAME_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
-#define wxDIALOG_EX_CONTEXTHELP wxWS_EX_CONTEXTHELP
-
-/* Create a window which is attachable to another top level window */
-#define wxFRAME_DRAWER 0x0020
-
-/*
- * MDI parent frame style flags
- * Can overlap with some of the above.
- */
-
-#define wxFRAME_NO_WINDOW_MENU 0x0100
-
-/*
- * wxMenuBar style flags
- */
-/* use native docking */
-#define wxMB_DOCKABLE 0x0001
-
-/*
- * wxMenu style flags
- */
-#define wxMENU_TEAROFF 0x0001
-
-/*
- * Apply to all panel items
- */
-#define wxCOLOURED 0x0800
-#define wxFIXED_LENGTH 0x0400
-
-/*
- * Styles for wxListBox
- */
-#define wxLB_SORT 0x0010
-#define wxLB_SINGLE 0x0020
-#define wxLB_MULTIPLE 0x0040
-#define wxLB_EXTENDED 0x0080
-/* wxLB_OWNERDRAW is Windows-only */
-#define wxLB_OWNERDRAW 0x0100
-#define wxLB_NEEDED_SB 0x0200
-#define wxLB_ALWAYS_SB 0x0400
-#define wxLB_HSCROLL wxHSCROLL
-/* always show an entire number of rows */
-#define wxLB_INT_HEIGHT 0x0800
-
-#if WXWIN_COMPATIBILITY_2_6
- /* deprecated synonyms */
- #define wxPROCESS_ENTER 0x0400 /* wxTE_PROCESS_ENTER */
- #define wxPASSWORD 0x0800 /* wxTE_PASSWORD */
-#endif
-
-/*
- * wxComboBox style flags
- */
-#define wxCB_SIMPLE 0x0004
-#define wxCB_SORT 0x0008
-#define wxCB_READONLY 0x0010
-#define wxCB_DROPDOWN 0x0020
-
-/*
- * wxRadioBox style flags
- */
-/* should we number the items from left to right or from top to bottom in a 2d */
-/* radiobox? */
-#define wxRA_LEFTTORIGHT 0x0001
-#define wxRA_TOPTOBOTTOM 0x0002
-
-/* New, more intuitive names to specify majorDim argument */
-#define wxRA_SPECIFY_COLS wxHORIZONTAL
-#define wxRA_SPECIFY_ROWS wxVERTICAL
-
-/* Old names for compatibility */
-#define wxRA_HORIZONTAL wxHORIZONTAL
-#define wxRA_VERTICAL wxVERTICAL
-#define wxRA_USE_CHECKBOX 0x0010 /* alternative native subcontrols (wxPalmOS) */
-
-/*
- * wxRadioButton style flag
- */
-#define wxRB_GROUP 0x0004
-#define wxRB_SINGLE 0x0008
-#define wxRB_USE_CHECKBOX 0x0010 /* alternative native control (wxPalmOS) */
-
-/*
- * wxScrollBar flags
- */
-#define wxSB_HORIZONTAL wxHORIZONTAL
-#define wxSB_VERTICAL wxVERTICAL
-
-/*
- * wxSpinButton flags.
- * Note that a wxSpinCtrl is sometimes defined as
- * a wxTextCtrl, and so the flags must be different
- * from wxTextCtrl's.
- */
-#define wxSP_HORIZONTAL wxHORIZONTAL /* 4 */
-#define wxSP_VERTICAL wxVERTICAL /* 8 */
-#define wxSP_ARROW_KEYS 0x1000
-#define wxSP_WRAP 0x2000
-
-/*
- * wxTabCtrl flags
- */
-#define wxTC_RIGHTJUSTIFY 0x0010
-#define wxTC_FIXEDWIDTH 0x0020
-#define wxTC_TOP 0x0000 /* default */
-#define wxTC_LEFT 0x0020
-#define wxTC_RIGHT 0x0040
-#define wxTC_BOTTOM 0x0080
-#define wxTC_MULTILINE 0x0200 /* == wxNB_MULTILINE */
-#define wxTC_OWNERDRAW 0x0400
-
-/*
- * wxStatusBar95 flags
- */
-#define wxST_SIZEGRIP 0x0010
-
-/*
- * wxStaticText flags
- */
-#define wxST_NO_AUTORESIZE 0x0001
-#define wxST_DOTS_MIDDLE 0x0002
-#define wxST_DOTS_END 0x0004
-
-/*
- * wxStaticBitmap flags
- */
-#define wxBI_EXPAND wxEXPAND
-
-/*
- * wxStaticLine flags
- */
-#define wxLI_HORIZONTAL wxHORIZONTAL
-#define wxLI_VERTICAL wxVERTICAL
-
-
-/*
- * extended dialog specifiers. these values are stored in a different
- * flag and thus do not overlap with other style flags. note that these
- * values do not correspond to the return values of the dialogs (for
- * those values, look at the wxID_XXX defines).
- */
-
-/* wxCENTRE already defined as 0x00000001 */
-#define wxYES 0x00000002
-#define wxOK 0x00000004
-#define wxNO 0x00000008
-#define wxYES_NO (wxYES | wxNO)
-#define wxCANCEL 0x00000010
-
-#define wxYES_DEFAULT 0x00000000 /* has no effect (default) */
-#define wxNO_DEFAULT 0x00000080
-
-#define wxICON_EXCLAMATION 0x00000100
-#define wxICON_HAND 0x00000200
-#define wxICON_WARNING wxICON_EXCLAMATION
-#define wxICON_ERROR wxICON_HAND
-#define wxICON_QUESTION 0x00000400
-#define wxICON_INFORMATION 0x00000800
-#define wxICON_STOP wxICON_HAND
-#define wxICON_ASTERISK wxICON_INFORMATION
-#define wxICON_MASK (0x00000100|0x00000200|0x00000400|0x00000800)
-
-#define wxFORWARD 0x00001000
-#define wxBACKWARD 0x00002000
-#define wxRESET 0x00004000
-#define wxHELP 0x00008000
-#define wxMORE 0x00010000
-#define wxSETUP 0x00020000
-
-/*
- * Background styles. See wxWindow::SetBackgroundStyle
- */
-
-enum wxBackgroundStyle
-{
- wxBG_STYLE_SYSTEM,
- wxBG_STYLE_COLOUR,
- wxBG_STYLE_CUSTOM
-};
-
-/* ---------------------------------------------------------------------------- */
-/* standard IDs */
-/* ---------------------------------------------------------------------------- */
-
-/* Standard menu IDs */
-enum
-{
- /* no id matches this one when compared to it */
- wxID_NONE = -3,
-
- /* id for a separator line in the menu (invalid for normal item) */
- wxID_SEPARATOR = -2,
-
- /* any id: means that we don't care about the id, whether when installing
- * an event handler or when creating a new window */
- wxID_ANY = -1,
-
-
- /* all predefined ids are between wxID_LOWEST and wxID_HIGHEST */
- wxID_LOWEST = 4999,
-
- wxID_OPEN,
- wxID_CLOSE,
- wxID_NEW,
- wxID_SAVE,
- wxID_SAVEAS,
- wxID_REVERT,
- wxID_EXIT,
- wxID_UNDO,
- wxID_REDO,
- wxID_HELP,
- wxID_PRINT,
- wxID_PRINT_SETUP,
- wxID_PAGE_SETUP,
- wxID_PREVIEW,
- wxID_ABOUT,
- wxID_HELP_CONTENTS,
- wxID_HELP_INDEX,
- wxID_HELP_SEARCH,
- wxID_HELP_COMMANDS,
- wxID_HELP_PROCEDURES,
- wxID_HELP_CONTEXT,
- wxID_CLOSE_ALL,
- wxID_PREFERENCES,
-
- wxID_EDIT = 5030,
- wxID_CUT,
- wxID_COPY,
- wxID_PASTE,
- wxID_CLEAR,
- wxID_FIND,
- wxID_DUPLICATE,
- wxID_SELECTALL,
- wxID_DELETE,
- wxID_REPLACE,
- wxID_REPLACE_ALL,
- wxID_PROPERTIES,
-
- wxID_VIEW_DETAILS,
- wxID_VIEW_LARGEICONS,
- wxID_VIEW_SMALLICONS,
- wxID_VIEW_LIST,
- wxID_VIEW_SORTDATE,
- wxID_VIEW_SORTNAME,
- wxID_VIEW_SORTSIZE,
- wxID_VIEW_SORTTYPE,
-
- wxID_FILE = 5050,
- wxID_FILE1,
- wxID_FILE2,
- wxID_FILE3,
- wxID_FILE4,
- wxID_FILE5,
- wxID_FILE6,
- wxID_FILE7,
- wxID_FILE8,
- wxID_FILE9,
-
- /* Standard button and menu IDs */
- wxID_OK = 5100,
- wxID_CANCEL,
- wxID_APPLY,
- wxID_YES,
- wxID_NO,
- wxID_STATIC,
- wxID_FORWARD,
- wxID_BACKWARD,
- wxID_DEFAULT,
- wxID_MORE,
- wxID_SETUP,
- wxID_RESET,
- wxID_CONTEXT_HELP,
- wxID_YESTOALL,
- wxID_NOTOALL,
- wxID_ABORT,
- wxID_RETRY,
- wxID_IGNORE,
- wxID_ADD,
- wxID_REMOVE,
-
- wxID_UP,
- wxID_DOWN,
- wxID_HOME,
- wxID_REFRESH,
- wxID_STOP,
- wxID_INDEX,
-
- wxID_BOLD,
- wxID_ITALIC,
- wxID_JUSTIFY_CENTER,
- wxID_JUSTIFY_FILL,
- wxID_JUSTIFY_RIGHT,
- wxID_JUSTIFY_LEFT,
- wxID_UNDERLINE,
- wxID_INDENT,
- wxID_UNINDENT,
- wxID_ZOOM_100,
- wxID_ZOOM_FIT,
- wxID_ZOOM_IN,
- wxID_ZOOM_OUT,
- wxID_UNDELETE,
- wxID_REVERT_TO_SAVED,
-
- /* System menu IDs (used by wxUniv): */
- wxID_SYSTEM_MENU = 5200,
- wxID_CLOSE_FRAME,
- wxID_MOVE_FRAME,
- wxID_RESIZE_FRAME,
- wxID_MAXIMIZE_FRAME,
- wxID_ICONIZE_FRAME,
- wxID_RESTORE_FRAME,
-
- /* IDs used by generic file dialog (13 consecutive starting from this value) */
- wxID_FILEDLGG = 5900,
-
- wxID_HIGHEST = 5999
-};
-
-/* ---------------------------------------------------------------------------- */
-/* other constants */
-/* ---------------------------------------------------------------------------- */
-
-/* menu and toolbar item kinds */
-enum wxItemKind
-{
- wxITEM_SEPARATOR = -1,
- wxITEM_NORMAL,
- wxITEM_CHECK,
- wxITEM_RADIO,
- wxITEM_MAX
-};
-
-/* hit test results */
-enum wxHitTest
-{
- wxHT_NOWHERE,
-
- /* scrollbar */
- wxHT_SCROLLBAR_FIRST = wxHT_NOWHERE,
- wxHT_SCROLLBAR_ARROW_LINE_1, /* left or upper arrow to scroll by line */
- wxHT_SCROLLBAR_ARROW_LINE_2, /* right or down */
- wxHT_SCROLLBAR_ARROW_PAGE_1, /* left or upper arrow to scroll by page */
- wxHT_SCROLLBAR_ARROW_PAGE_2, /* right or down */
- wxHT_SCROLLBAR_THUMB, /* on the thumb */
- wxHT_SCROLLBAR_BAR_1, /* bar to the left/above the thumb */
- wxHT_SCROLLBAR_BAR_2, /* bar to the right/below the thumb */
- wxHT_SCROLLBAR_LAST,
-
- /* window */
- wxHT_WINDOW_OUTSIDE, /* not in this window at all */
- wxHT_WINDOW_INSIDE, /* in the client area */
- wxHT_WINDOW_VERT_SCROLLBAR, /* on the vertical scrollbar */
- wxHT_WINDOW_HORZ_SCROLLBAR, /* on the horizontal scrollbar */
- wxHT_WINDOW_CORNER, /* on the corner between 2 scrollbars */
-
- wxHT_MAX
-};
-
-/* ---------------------------------------------------------------------------- */
-/* Possible SetSize flags */
-/* ---------------------------------------------------------------------------- */
-
-/* Use internally-calculated width if -1 */
-#define wxSIZE_AUTO_WIDTH 0x0001
-/* Use internally-calculated height if -1 */
-#define wxSIZE_AUTO_HEIGHT 0x0002
-/* Use internally-calculated width and height if each is -1 */
-#define wxSIZE_AUTO (wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT)
-/* Ignore missing (-1) dimensions (use existing). */
-/* For readability only: test for wxSIZE_AUTO_WIDTH/HEIGHT in code. */
-#define wxSIZE_USE_EXISTING 0x0000
-/* Allow -1 as a valid position */
-#define wxSIZE_ALLOW_MINUS_ONE 0x0004
-/* Don't do parent client adjustments (for implementation only) */
-#define wxSIZE_NO_ADJUSTMENTS 0x0008
-/* Change the window position even if it seems to be already correct */
-#define wxSIZE_FORCE 0x0010
-
-/* ---------------------------------------------------------------------------- */
-/* GDI descriptions */
-/* ---------------------------------------------------------------------------- */
-
-enum
-{
- /* Text font families */
- wxDEFAULT = 70,
- wxDECORATIVE,
- wxROMAN,
- wxSCRIPT,
- wxSWISS,
- wxMODERN,
- wxTELETYPE, /* @@@@ */
-
- /* Proportional or Fixed width fonts (not yet used) */
- wxVARIABLE = 80,
- wxFIXED,
-
- wxNORMAL = 90,
- wxLIGHT,
- wxBOLD,
- /* Also wxNORMAL for normal (non-italic text) */
- wxITALIC,
- wxSLANT,
-
- /* Pen styles */
- wxSOLID = 100,
- wxDOT,
- wxLONG_DASH,
- wxSHORT_DASH,
- wxDOT_DASH,
- wxUSER_DASH,
-
- wxTRANSPARENT,
-
- /* Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */
- /* Note also that stippling a Pen IS meaningfull, because a Line is */
- wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */
- wxSTIPPLE_MASK, /* mask is used for masking areas in the stipple bitmap (TO DO) */
- /* drawn with a Pen, and without any Brush -- and it can be stippled. */
- wxSTIPPLE = 110,
-
- wxBDIAGONAL_HATCH, /* In wxWidgets < 2.6 use WX_HATCH macro */
- wxCROSSDIAG_HATCH, /* to verify these wx*_HATCH are in style */
- wxFDIAGONAL_HATCH, /* of wxBrush. In wxWidgets >= 2.6 use */
- wxCROSS_HATCH, /* wxBrush::IsHatch() instead. */
- wxHORIZONTAL_HATCH,
- wxVERTICAL_HATCH,
- wxFIRST_HATCH = wxBDIAGONAL_HATCH,
- wxLAST_HATCH = wxVERTICAL_HATCH,
-
- wxJOIN_BEVEL = 120,
- wxJOIN_MITER,
- wxJOIN_ROUND,
-
- wxCAP_ROUND = 130,
- wxCAP_PROJECTING,
- wxCAP_BUTT
-};
-
-#if WXWIN_COMPATIBILITY_2_4
- #define IS_HATCH(s) ((s)>=wxFIRST_HATCH && (s)<=wxLAST_HATCH)
-#else
- /* use wxBrush::IsHatch() instead thought wxMotif still uses it in src/motif/dcclient.cpp */
-#endif
-
-/* Logical ops */
-typedef enum
-{
- wxCLEAR, wxROP_BLACK = wxCLEAR, wxBLIT_BLACKNESS = wxCLEAR, /* 0 */
- wxXOR, wxROP_XORPEN = wxXOR, wxBLIT_SRCINVERT = wxXOR, /* src XOR dst */
- wxINVERT, wxROP_NOT = wxINVERT, wxBLIT_DSTINVERT = wxINVERT, /* NOT dst */
- wxOR_REVERSE, wxROP_MERGEPENNOT = wxOR_REVERSE, wxBLIT_00DD0228 = wxOR_REVERSE, /* src OR (NOT dst) */
- wxAND_REVERSE, wxROP_MASKPENNOT = wxAND_REVERSE, wxBLIT_SRCERASE = wxAND_REVERSE, /* src AND (NOT dst) */
- wxCOPY, wxROP_COPYPEN = wxCOPY, wxBLIT_SRCCOPY = wxCOPY, /* src */
- wxAND, wxROP_MASKPEN = wxAND, wxBLIT_SRCAND = wxAND, /* src AND dst */
- wxAND_INVERT, wxROP_MASKNOTPEN = wxAND_INVERT, wxBLIT_00220326 = wxAND_INVERT, /* (NOT src) AND dst */
- wxNO_OP, wxROP_NOP = wxNO_OP, wxBLIT_00AA0029 = wxNO_OP, /* dst */
- wxNOR, wxROP_NOTMERGEPEN = wxNOR, wxBLIT_NOTSRCERASE = wxNOR, /* (NOT src) AND (NOT dst) */
- wxEQUIV, wxROP_NOTXORPEN = wxEQUIV, wxBLIT_00990066 = wxEQUIV, /* (NOT src) XOR dst */
- wxSRC_INVERT, wxROP_NOTCOPYPEN = wxSRC_INVERT, wxBLIT_NOTSCRCOPY = wxSRC_INVERT, /* (NOT src) */
- wxOR_INVERT, wxROP_MERGENOTPEN = wxOR_INVERT, wxBLIT_MERGEPAINT = wxOR_INVERT, /* (NOT src) OR dst */
- wxNAND, wxROP_NOTMASKPEN = wxNAND, wxBLIT_007700E6 = wxNAND, /* (NOT src) OR (NOT dst) */
- wxOR, wxROP_MERGEPEN = wxOR, wxBLIT_SRCPAINT = wxOR, /* src OR dst */
- wxSET, wxROP_WHITE = wxSET, wxBLIT_WHITENESS = wxSET /* 1 */
-} form_ops_t;
-
-/* Flood styles */
-enum
-{
- wxFLOOD_SURFACE = 1,
- wxFLOOD_BORDER
-};
-
-/* Polygon filling mode */
-enum
-{
- wxODDEVEN_RULE = 1,
- wxWINDING_RULE
-};
-
-/* ToolPanel in wxFrame (VZ: unused?) */
-enum
-{
- wxTOOL_TOP = 1,
- wxTOOL_BOTTOM,
- wxTOOL_LEFT,
- wxTOOL_RIGHT
-};
-
-/* the values of the format constants should be the same as corresponding */
-/* CF_XXX constants in Windows API */
-enum wxDataFormatId
-{
- wxDF_INVALID = 0,
- wxDF_TEXT = 1, /* CF_TEXT */
- wxDF_BITMAP = 2, /* CF_BITMAP */
- wxDF_METAFILE = 3, /* CF_METAFILEPICT */
- wxDF_SYLK = 4,
- wxDF_DIF = 5,
- wxDF_TIFF = 6,
- wxDF_OEMTEXT = 7, /* CF_OEMTEXT */
- wxDF_DIB = 8, /* CF_DIB */
- wxDF_PALETTE = 9,
- wxDF_PENDATA = 10,
- wxDF_RIFF = 11,
- wxDF_WAVE = 12,
- wxDF_UNICODETEXT = 13,
- wxDF_ENHMETAFILE = 14,
- wxDF_FILENAME = 15, /* CF_HDROP */
- wxDF_LOCALE = 16,
- wxDF_PRIVATE = 20,
- wxDF_HTML = 30, /* Note: does not correspond to CF_ constant */
- wxDF_MAX
-};
-
-/* Virtual keycodes */
-enum wxKeyCode
-{
- WXK_BACK = 8,
- WXK_TAB = 9,
- WXK_RETURN = 13,
- WXK_ESCAPE = 27,
- WXK_SPACE = 32,
- WXK_DELETE = 127,
-
- /* These are, by design, not compatible with unicode characters.
- If you want to get a unicode character from a key event, use
- wxKeyEvent::GetUnicodeKey instead. */
- WXK_START = 300,
- WXK_LBUTTON,
- WXK_RBUTTON,
- WXK_CANCEL,
- WXK_MBUTTON,
- WXK_CLEAR,
- WXK_SHIFT,
- WXK_ALT,
- WXK_CONTROL,
- WXK_MENU,
- WXK_PAUSE,
- WXK_CAPITAL,
- WXK_END,
- WXK_HOME,
- WXK_LEFT,
- WXK_UP,
- WXK_RIGHT,
- WXK_DOWN,
- WXK_SELECT,
- WXK_PRINT,
- WXK_EXECUTE,
- WXK_SNAPSHOT,
- WXK_INSERT,
- WXK_HELP,
- WXK_NUMPAD0,
- WXK_NUMPAD1,
- WXK_NUMPAD2,
- WXK_NUMPAD3,
- WXK_NUMPAD4,
- WXK_NUMPAD5,
- WXK_NUMPAD6,
- WXK_NUMPAD7,
- WXK_NUMPAD8,
- WXK_NUMPAD9,
- WXK_MULTIPLY,
- WXK_ADD,
- WXK_SEPARATOR,
- WXK_SUBTRACT,
- WXK_DECIMAL,
- WXK_DIVIDE,
- WXK_F1,
- WXK_F2,
- WXK_F3,
- WXK_F4,
- WXK_F5,
- WXK_F6,
- WXK_F7,
- WXK_F8,
- WXK_F9,
- WXK_F10,
- WXK_F11,
- WXK_F12,
- WXK_F13,
- WXK_F14,
- WXK_F15,
- WXK_F16,
- WXK_F17,
- WXK_F18,
- WXK_F19,
- WXK_F20,
- WXK_F21,
- WXK_F22,
- WXK_F23,
- WXK_F24,
- WXK_NUMLOCK,
- WXK_SCROLL,
- WXK_PAGEUP,
- WXK_PAGEDOWN,
-#if WXWIN_COMPATIBILITY_2_6
- WXK_PRIOR = WXK_PAGEUP,
- WXK_NEXT = WXK_PAGEDOWN,
-#endif
-
- WXK_NUMPAD_SPACE,
- WXK_NUMPAD_TAB,
- WXK_NUMPAD_ENTER,
- WXK_NUMPAD_F1,
- WXK_NUMPAD_F2,
- WXK_NUMPAD_F3,
- WXK_NUMPAD_F4,
- WXK_NUMPAD_HOME,
- WXK_NUMPAD_LEFT,
- WXK_NUMPAD_UP,
- WXK_NUMPAD_RIGHT,
- WXK_NUMPAD_DOWN,
- WXK_NUMPAD_PAGEUP,
- WXK_NUMPAD_PAGEDOWN,
-#if WXWIN_COMPATIBILITY_2_6
- WXK_NUMPAD_PRIOR = WXK_NUMPAD_PAGEUP,
- WXK_NUMPAD_NEXT = WXK_NUMPAD_PAGEDOWN,
-#endif
- WXK_NUMPAD_END,
- WXK_NUMPAD_BEGIN,
- WXK_NUMPAD_INSERT,
- WXK_NUMPAD_DELETE,
- WXK_NUMPAD_EQUAL,
- WXK_NUMPAD_MULTIPLY,
- WXK_NUMPAD_ADD,
- WXK_NUMPAD_SEPARATOR,
- WXK_NUMPAD_SUBTRACT,
- WXK_NUMPAD_DECIMAL,
- WXK_NUMPAD_DIVIDE,
-
- WXK_WINDOWS_LEFT,
- WXK_WINDOWS_RIGHT,
- WXK_WINDOWS_MENU ,
- WXK_COMMAND,
-
- /* Hardware-specific buttons */
- WXK_SPECIAL1 = 193,
- WXK_SPECIAL2,
- WXK_SPECIAL3,
- WXK_SPECIAL4,
- WXK_SPECIAL5,
- WXK_SPECIAL6,
- WXK_SPECIAL7,
- WXK_SPECIAL8,
- WXK_SPECIAL9,
- WXK_SPECIAL10,
- WXK_SPECIAL11,
- WXK_SPECIAL12,
- WXK_SPECIAL13,
- WXK_SPECIAL14,
- WXK_SPECIAL15,
- WXK_SPECIAL16,
- WXK_SPECIAL17,
- WXK_SPECIAL18,
- WXK_SPECIAL19,
- WXK_SPECIAL20
-};
-
-/* This enum contains bit mask constants used in wxKeyEvent */
-enum wxKeyModifier
-{
- wxMOD_NONE = 0x0000,
- wxMOD_ALT = 0x0001,
- wxMOD_CONTROL = 0x0002,
- wxMOD_ALTGR = wxMOD_ALT | wxMOD_CONTROL,
- wxMOD_SHIFT = 0x0004,
- wxMOD_META = 0x0008,
- wxMOD_WIN = wxMOD_META,
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- wxMOD_CMD = wxMOD_META,
-#else
- wxMOD_CMD = wxMOD_CONTROL,
-#endif
- wxMOD_ALL = 0xffff
-};
-
-/* Mapping modes (same values as used by Windows, don't change) */
-enum
-{
- wxMM_TEXT = 1,
- wxMM_LOMETRIC,
- wxMM_HIMETRIC,
- wxMM_LOENGLISH,
- wxMM_HIENGLISH,
- wxMM_TWIPS,
- wxMM_ISOTROPIC,
- wxMM_ANISOTROPIC,
- wxMM_POINTS,
- wxMM_METRIC
-};
-
-/* Shortcut for easier dialog-unit-to-pixel conversion */
-#define wxDLG_UNIT(parent, pt) parent->ConvertDialogToPixels(pt)
-
-/* Paper types */
-typedef enum
-{
- wxPAPER_NONE, /* Use specific dimensions */
- wxPAPER_LETTER, /* Letter, 8 1/2 by 11 inches */
- wxPAPER_LEGAL, /* Legal, 8 1/2 by 14 inches */
- wxPAPER_A4, /* A4 Sheet, 210 by 297 millimeters */
- wxPAPER_CSHEET, /* C Sheet, 17 by 22 inches */
- wxPAPER_DSHEET, /* D Sheet, 22 by 34 inches */
- wxPAPER_ESHEET, /* E Sheet, 34 by 44 inches */
- wxPAPER_LETTERSMALL, /* Letter Small, 8 1/2 by 11 inches */
- wxPAPER_TABLOID, /* Tabloid, 11 by 17 inches */
- wxPAPER_LEDGER, /* Ledger, 17 by 11 inches */
- wxPAPER_STATEMENT, /* Statement, 5 1/2 by 8 1/2 inches */
- wxPAPER_EXECUTIVE, /* Executive, 7 1/4 by 10 1/2 inches */
- wxPAPER_A3, /* A3 sheet, 297 by 420 millimeters */
- wxPAPER_A4SMALL, /* A4 small sheet, 210 by 297 millimeters */
- wxPAPER_A5, /* A5 sheet, 148 by 210 millimeters */
- wxPAPER_B4, /* B4 sheet, 250 by 354 millimeters */
- wxPAPER_B5, /* B5 sheet, 182-by-257-millimeter paper */
- wxPAPER_FOLIO, /* Folio, 8-1/2-by-13-inch paper */
- wxPAPER_QUARTO, /* Quarto, 215-by-275-millimeter paper */
- wxPAPER_10X14, /* 10-by-14-inch sheet */
- wxPAPER_11X17, /* 11-by-17-inch sheet */
- wxPAPER_NOTE, /* Note, 8 1/2 by 11 inches */
- wxPAPER_ENV_9, /* #9 Envelope, 3 7/8 by 8 7/8 inches */
- wxPAPER_ENV_10, /* #10 Envelope, 4 1/8 by 9 1/2 inches */
- wxPAPER_ENV_11, /* #11 Envelope, 4 1/2 by 10 3/8 inches */
- wxPAPER_ENV_12, /* #12 Envelope, 4 3/4 by 11 inches */
- wxPAPER_ENV_14, /* #14 Envelope, 5 by 11 1/2 inches */
- wxPAPER_ENV_DL, /* DL Envelope, 110 by 220 millimeters */
- wxPAPER_ENV_C5, /* C5 Envelope, 162 by 229 millimeters */
- wxPAPER_ENV_C3, /* C3 Envelope, 324 by 458 millimeters */
- wxPAPER_ENV_C4, /* C4 Envelope, 229 by 324 millimeters */
- wxPAPER_ENV_C6, /* C6 Envelope, 114 by 162 millimeters */
- wxPAPER_ENV_C65, /* C65 Envelope, 114 by 229 millimeters */
- wxPAPER_ENV_B4, /* B4 Envelope, 250 by 353 millimeters */
- wxPAPER_ENV_B5, /* B5 Envelope, 176 by 250 millimeters */
- wxPAPER_ENV_B6, /* B6 Envelope, 176 by 125 millimeters */
- wxPAPER_ENV_ITALY, /* Italy Envelope, 110 by 230 millimeters */
- wxPAPER_ENV_MONARCH, /* Monarch Envelope, 3 7/8 by 7 1/2 inches */
- wxPAPER_ENV_PERSONAL, /* 6 3/4 Envelope, 3 5/8 by 6 1/2 inches */
- wxPAPER_FANFOLD_US, /* US Std Fanfold, 14 7/8 by 11 inches */
- wxPAPER_FANFOLD_STD_GERMAN, /* German Std Fanfold, 8 1/2 by 12 inches */
- wxPAPER_FANFOLD_LGL_GERMAN, /* German Legal Fanfold, 8 1/2 by 13 inches */
-
- wxPAPER_ISO_B4, /* B4 (ISO) 250 x 353 mm */
- wxPAPER_JAPANESE_POSTCARD, /* Japanese Postcard 100 x 148 mm */
- wxPAPER_9X11, /* 9 x 11 in */
- wxPAPER_10X11, /* 10 x 11 in */
- wxPAPER_15X11, /* 15 x 11 in */
- wxPAPER_ENV_INVITE, /* Envelope Invite 220 x 220 mm */
- wxPAPER_LETTER_EXTRA, /* Letter Extra 9 \275 x 12 in */
- wxPAPER_LEGAL_EXTRA, /* Legal Extra 9 \275 x 15 in */
- wxPAPER_TABLOID_EXTRA, /* Tabloid Extra 11.69 x 18 in */
- wxPAPER_A4_EXTRA, /* A4 Extra 9.27 x 12.69 in */
- wxPAPER_LETTER_TRANSVERSE, /* Letter Transverse 8 \275 x 11 in */
- wxPAPER_A4_TRANSVERSE, /* A4 Transverse 210 x 297 mm */
- wxPAPER_LETTER_EXTRA_TRANSVERSE, /* Letter Extra Transverse 9\275 x 12 in */
- wxPAPER_A_PLUS, /* SuperA/SuperA/A4 227 x 356 mm */
- wxPAPER_B_PLUS, /* SuperB/SuperB/A3 305 x 487 mm */
- wxPAPER_LETTER_PLUS, /* Letter Plus 8.5 x 12.69 in */
- wxPAPER_A4_PLUS, /* A4 Plus 210 x 330 mm */
- wxPAPER_A5_TRANSVERSE, /* A5 Transverse 148 x 210 mm */
- wxPAPER_B5_TRANSVERSE, /* B5 (JIS) Transverse 182 x 257 mm */
- wxPAPER_A3_EXTRA, /* A3 Extra 322 x 445 mm */
- wxPAPER_A5_EXTRA, /* A5 Extra 174 x 235 mm */
- wxPAPER_B5_EXTRA, /* B5 (ISO) Extra 201 x 276 mm */
- wxPAPER_A2, /* A2 420 x 594 mm */
- wxPAPER_A3_TRANSVERSE, /* A3 Transverse 297 x 420 mm */
- wxPAPER_A3_EXTRA_TRANSVERSE, /* A3 Extra Transverse 322 x 445 mm */
-
- wxPAPER_DBL_JAPANESE_POSTCARD,/* Japanese Double Postcard 200 x 148 mm */
- wxPAPER_A6, /* A6 105 x 148 mm */
- wxPAPER_JENV_KAKU2, /* Japanese Envelope Kaku #2 */
- wxPAPER_JENV_KAKU3, /* Japanese Envelope Kaku #3 */
- wxPAPER_JENV_CHOU3, /* Japanese Envelope Chou #3 */
- wxPAPER_JENV_CHOU4, /* Japanese Envelope Chou #4 */
- wxPAPER_LETTER_ROTATED, /* Letter Rotated 11 x 8 1/2 in */
- wxPAPER_A3_ROTATED, /* A3 Rotated 420 x 297 mm */
- wxPAPER_A4_ROTATED, /* A4 Rotated 297 x 210 mm */
- wxPAPER_A5_ROTATED, /* A5 Rotated 210 x 148 mm */
- wxPAPER_B4_JIS_ROTATED, /* B4 (JIS) Rotated 364 x 257 mm */
- wxPAPER_B5_JIS_ROTATED, /* B5 (JIS) Rotated 257 x 182 mm */
- wxPAPER_JAPANESE_POSTCARD_ROTATED,/* Japanese Postcard Rotated 148 x 100 mm */
- wxPAPER_DBL_JAPANESE_POSTCARD_ROTATED,/* Double Japanese Postcard Rotated 148 x 200 mm */
- wxPAPER_A6_ROTATED, /* A6 Rotated 148 x 105 mm */
- wxPAPER_JENV_KAKU2_ROTATED, /* Japanese Envelope Kaku #2 Rotated */
- wxPAPER_JENV_KAKU3_ROTATED, /* Japanese Envelope Kaku #3 Rotated */
- wxPAPER_JENV_CHOU3_ROTATED, /* Japanese Envelope Chou #3 Rotated */
- wxPAPER_JENV_CHOU4_ROTATED, /* Japanese Envelope Chou #4 Rotated */
- wxPAPER_B6_JIS, /* B6 (JIS) 128 x 182 mm */
- wxPAPER_B6_JIS_ROTATED, /* B6 (JIS) Rotated 182 x 128 mm */
- wxPAPER_12X11, /* 12 x 11 in */
- wxPAPER_JENV_YOU4, /* Japanese Envelope You #4 */
- wxPAPER_JENV_YOU4_ROTATED, /* Japanese Envelope You #4 Rotated */
- wxPAPER_P16K, /* PRC 16K 146 x 215 mm */
- wxPAPER_P32K, /* PRC 32K 97 x 151 mm */
- wxPAPER_P32KBIG, /* PRC 32K(Big) 97 x 151 mm */
- wxPAPER_PENV_1, /* PRC Envelope #1 102 x 165 mm */
- wxPAPER_PENV_2, /* PRC Envelope #2 102 x 176 mm */
- wxPAPER_PENV_3, /* PRC Envelope #3 125 x 176 mm */
- wxPAPER_PENV_4, /* PRC Envelope #4 110 x 208 mm */
- wxPAPER_PENV_5, /* PRC Envelope #5 110 x 220 mm */
- wxPAPER_PENV_6, /* PRC Envelope #6 120 x 230 mm */
- wxPAPER_PENV_7, /* PRC Envelope #7 160 x 230 mm */
- wxPAPER_PENV_8, /* PRC Envelope #8 120 x 309 mm */
- wxPAPER_PENV_9, /* PRC Envelope #9 229 x 324 mm */
- wxPAPER_PENV_10, /* PRC Envelope #10 324 x 458 mm */
- wxPAPER_P16K_ROTATED, /* PRC 16K Rotated */
- wxPAPER_P32K_ROTATED, /* PRC 32K Rotated */
- wxPAPER_P32KBIG_ROTATED, /* PRC 32K(Big) Rotated */
- wxPAPER_PENV_1_ROTATED, /* PRC Envelope #1 Rotated 165 x 102 mm */
- wxPAPER_PENV_2_ROTATED, /* PRC Envelope #2 Rotated 176 x 102 mm */
- wxPAPER_PENV_3_ROTATED, /* PRC Envelope #3 Rotated 176 x 125 mm */
- wxPAPER_PENV_4_ROTATED, /* PRC Envelope #4 Rotated 208 x 110 mm */
- wxPAPER_PENV_5_ROTATED, /* PRC Envelope #5 Rotated 220 x 110 mm */
- wxPAPER_PENV_6_ROTATED, /* PRC Envelope #6 Rotated 230 x 120 mm */
- wxPAPER_PENV_7_ROTATED, /* PRC Envelope #7 Rotated 230 x 160 mm */
- wxPAPER_PENV_8_ROTATED, /* PRC Envelope #8 Rotated 309 x 120 mm */
- wxPAPER_PENV_9_ROTATED, /* PRC Envelope #9 Rotated 324 x 229 mm */
- wxPAPER_PENV_10_ROTATED /* PRC Envelope #10 Rotated 458 x 324 m */
-} wxPaperSize;
-
-/* Printing orientation */
-#ifndef wxPORTRAIT
-#define wxPORTRAIT 1
-#define wxLANDSCAPE 2
-#endif
-
-/* Duplex printing modes
- */
-
-enum wxDuplexMode
-{
- wxDUPLEX_SIMPLEX, /* Non-duplex */
- wxDUPLEX_HORIZONTAL,
- wxDUPLEX_VERTICAL
-};
-
-/* Print quality.
- */
-
-#define wxPRINT_QUALITY_HIGH -1
-#define wxPRINT_QUALITY_MEDIUM -2
-#define wxPRINT_QUALITY_LOW -3
-#define wxPRINT_QUALITY_DRAFT -4
-
-typedef int wxPrintQuality;
-
-/* Print mode (currently PostScript only)
- */
-
-enum wxPrintMode
-{
- wxPRINT_MODE_NONE = 0,
- wxPRINT_MODE_PREVIEW = 1, /* Preview in external application */
- wxPRINT_MODE_FILE = 2, /* Print to file */
- wxPRINT_MODE_PRINTER = 3, /* Send to printer */
- wxPRINT_MODE_STREAM = 4 /* Send postscript data into a stream */
-};
-
-/* ---------------------------------------------------------------------------- */
-/* UpdateWindowUI flags */
-/* ---------------------------------------------------------------------------- */
-
-enum wxUpdateUI
-{
- wxUPDATE_UI_NONE = 0x0000,
- wxUPDATE_UI_RECURSE = 0x0001,
- wxUPDATE_UI_FROMIDLE = 0x0002 /* Invoked from On(Internal)Idle */
-};
-
-/* ---------------------------------------------------------------------------- */
-/* Notification Event flags - used for dock icon bouncing, etc. */
-/* ---------------------------------------------------------------------------- */
-
-enum wxNotificationOptions
-{
- wxNOTIFY_NONE = 0x0000,
- wxNOTIFY_ONCE = 0x0001,
- wxNOTIFY_REPEAT = 0x0002
-};
-
-/* ---------------------------------------------------------------------------- */
-/* miscellaneous */
-/* ---------------------------------------------------------------------------- */
-
-/* define this macro if font handling is done using the X font names */
-#if (defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__X__)
- #define _WX_X_FONTLIKE
-#endif
-
-/* macro to specify "All Files" on different platforms */
-#if defined(__WXMSW__) || defined(__WXPM__)
-# define wxALL_FILES_PATTERN wxT("*.*")
-# define wxALL_FILES gettext_noop("All files (*.*)|*.*")
-#else
-# define wxALL_FILES_PATTERN wxT("*")
-# define wxALL_FILES gettext_noop("All files (*)|*")
-#endif
-
-#if defined(__CYGWIN__) && defined(__WXMSW__)
-# if wxUSE_STL || defined(wxUSE_STD_STRING)
- /*
- NASTY HACK because the gethostname in sys/unistd.h which the gnu
- stl includes and wx builds with by default clash with each other
- (windows version 2nd param is int, sys/unistd.h version is unsigned
- int).
- */
-# define gethostname gethostnameHACK
-# include
-# undef gethostname
-# endif
-#endif
-
-/* --------------------------------------------------------------------------- */
-/* macros that enable wxWidgets apps to be compiled in absence of the */
-/* sytem headers, although some platform specific types are used in the */
-/* platform specific (implementation) parts of the headers */
-/* --------------------------------------------------------------------------- */
-
-#ifdef __WXMAC__
-
-#define WX_OPAQUE_TYPE( name ) struct wxOpaque##name
-
-typedef unsigned char WXCOLORREF[6];
-typedef void* WXCGIMAGEREF;
-typedef void* WXHBITMAP;
-typedef void* WXHCURSOR;
-typedef void* WXHRGN;
-typedef void* WXRECTPTR;
-typedef void* WXPOINTPTR;
-typedef void* WXHWND;
-typedef void* WXEVENTREF;
-typedef void* WXEVENTHANDLERREF;
-typedef void* WXEVENTHANDLERCALLREF;
-typedef void* WXAPPLEEVENTREF;
-typedef void* WXHDC;
-typedef void* WXHMENU;
-typedef unsigned int WXUINT;
-typedef unsigned long WXDWORD;
-typedef unsigned short WXWORD;
-
-typedef WX_OPAQUE_TYPE(CIconHandle ) * WXHICON ;
-typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ;
-
-
-/* typedef void* WXWidget; */
-/* typedef void* WXWindow; */
-typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
-typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
-typedef void* WXDisplay;
-
-/* typedef WindowPtr WXHWND; */
-/* typedef Handle WXHANDLE; */
-/* typedef CIconHandle WXHICON; */
-/* typedef unsigned long WXHFONT; */
-/* typedef MenuHandle WXHMENU; */
-/* typedef unsigned long WXHPEN; */
-/* typedef unsigned long WXHBRUSH; */
-/* typedef unsigned long WXHPALETTE; */
-/* typedef CursHandle WXHCURSOR; */
-/* typedef RgnHandle WXHRGN; */
-/* typedef unsigned long WXHACCEL; */
-/* typedef unsigned long WXHINSTANCE; */
-/* typedef unsigned long WXHIMAGELIST; */
-/* typedef unsigned long WXHGLOBAL; */
-/* typedef GrafPtr WXHDC; */
-/* typedef unsigned int WXWPARAM; */
-/* typedef long WXLPARAM; */
-/* typedef void * WXRGNDATA; */
-/* typedef void * WXMSG; */
-/* typedef unsigned long WXHCONV; */
-/* typedef unsigned long WXHKEY; */
-/* typedef void * WXDRAWITEMSTRUCT; */
-/* typedef void * WXMEASUREITEMSTRUCT; */
-/* typedef void * WXLPCREATESTRUCT; */
-/* typedef int (*WXFARPROC)(); */
-
-/* typedef WindowPtr WXWindow; */
-/* typedef ControlHandle WXWidget; */
-
-#endif
-
-#if defined( __WXCOCOA__ ) || ( defined(__WXMAC__) && defined(__DARWIN__) )
-
-/* Definitions of 32-bit/64-bit types
- * These are typedef'd exactly the same way in newer OS X headers so
- * redefinition when real headers are included should not be a problem. If
- * it is, the types are being defined wrongly here.
- * The purpose of these types is so they can be used from public wx headers.
- * and also because the older (pre-Leopard) headers don't define them.
- */
-
-/* NOTE: We don't pollute namespace with CGFLOAT_MIN/MAX/IS_DOUBLE macros
- * since they are unlikely to be needed in a public header.
- */
-#if defined(__LP64__) && __LP64__
- typedef double CGFloat;
-#else
- typedef float CGFloat;
-#endif
-
-#if (defined(__LP64__) && __LP64__) || (defined(NS_BUILD_32_LIKE_64) && NS_BUILD_32_LIKE_64)
-typedef long NSInteger;
-typedef unsigned long NSUInteger;
-#else
-typedef int NSInteger;
-typedef unsigned int NSUInteger;
-#endif
-
-/* Objective-C type declarations.
- * These are to be used in public headers in lieu of NSSomething* because
- * Objective-C class names are not available in C/C++ code.
- */
-
-/* NOTE: This ought to work with other compilers too, but I'm being cautious */
-#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__)
-/* It's desirable to have type safety for Objective-C(++) code as it does
-at least catch typos of method names among other things. However, it
-is not possible to declare an Objective-C class from plain old C or C++
-code. Furthermore, because of C++ name mangling, the type name must
-be the same for both C++ and Objective-C++ code. Therefore, we define
-what should be a pointer to an Objective-C class as a pointer to a plain
-old C struct with the same name. Unfortunately, because the compiler
-does not see a struct as an Objective-C class we cannot declare it
-as a struct in Objective-C(++) mode.
-*/
-#if defined(__OBJC__)
-#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \
-@class klass; \
-typedef klass *WX_##klass
-#else /* not defined(__OBJC__) */
-#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \
-typedef struct klass *WX_##klass
-#endif /* defined(__OBJC__) */
-
-#else /* not Apple's GNU or CodeWarrior */
-#warning "Objective-C types will not be checked by the compiler."
-/* NOTE: typedef struct objc_object *id; */
-/* IOW, we're declaring these using the id type without using that name, */
-/* since "id" is used extensively not only within wxWidgets itself, but */
-/* also in wxWidgets application code. The following works fine when */
-/* compiling C(++) code, and works without typesafety for Obj-C(++) code */
-#define DECLARE_WXCOCOA_OBJC_CLASS(klass) \
-typedef struct objc_object *WX_##klass
-
-#endif /* (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__) */
-
-DECLARE_WXCOCOA_OBJC_CLASS(NSApplication);
-DECLARE_WXCOCOA_OBJC_CLASS(NSBitmapImageRep);
-DECLARE_WXCOCOA_OBJC_CLASS(NSBox);
-DECLARE_WXCOCOA_OBJC_CLASS(NSButton);
-DECLARE_WXCOCOA_OBJC_CLASS(NSColor);
-DECLARE_WXCOCOA_OBJC_CLASS(NSColorPanel);
-DECLARE_WXCOCOA_OBJC_CLASS(NSControl);
-DECLARE_WXCOCOA_OBJC_CLASS(NSCursor);
-DECLARE_WXCOCOA_OBJC_CLASS(NSEvent);
-DECLARE_WXCOCOA_OBJC_CLASS(NSFontPanel);
-DECLARE_WXCOCOA_OBJC_CLASS(NSImage);
-DECLARE_WXCOCOA_OBJC_CLASS(NSLayoutManager);
-DECLARE_WXCOCOA_OBJC_CLASS(NSMenu);
-DECLARE_WXCOCOA_OBJC_CLASS(NSMenuExtra);
-DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
-DECLARE_WXCOCOA_OBJC_CLASS(NSMutableArray);
-DECLARE_WXCOCOA_OBJC_CLASS(NSNotification);
-DECLARE_WXCOCOA_OBJC_CLASS(NSObject);
-DECLARE_WXCOCOA_OBJC_CLASS(NSPanel);
-DECLARE_WXCOCOA_OBJC_CLASS(NSScrollView);
-DECLARE_WXCOCOA_OBJC_CLASS(NSSound);
-DECLARE_WXCOCOA_OBJC_CLASS(NSStatusItem);
-DECLARE_WXCOCOA_OBJC_CLASS(NSTableColumn);
-DECLARE_WXCOCOA_OBJC_CLASS(NSTableView);
-DECLARE_WXCOCOA_OBJC_CLASS(NSTextContainer);
-DECLARE_WXCOCOA_OBJC_CLASS(NSTextField);
-DECLARE_WXCOCOA_OBJC_CLASS(NSTextStorage);
-DECLARE_WXCOCOA_OBJC_CLASS(NSThread);
-DECLARE_WXCOCOA_OBJC_CLASS(NSWindow);
-DECLARE_WXCOCOA_OBJC_CLASS(NSView);
-#ifdef __WXMAC__
-// things added for __WXMAC__
-DECLARE_WXCOCOA_OBJC_CLASS(NSString);
-#else
-// things only for __WXCOCOA__
-typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
-#endif
-#endif /* __WXCOCOA__ || ( __WXMAC__ &__DARWIN__)*/
-
-#if defined(__WXPALMOS__)
-
-typedef void * WXHWND;
-typedef void * WXHANDLE;
-typedef void * WXHICON;
-typedef void * WXHFONT;
-typedef void * WXHMENU;
-typedef void * WXHPEN;
-typedef void * WXHBRUSH;
-typedef void * WXHPALETTE;
-typedef void * WXHCURSOR;
-typedef void * WXHRGN;
-typedef void * WXHACCEL;
-typedef void * WXHINSTANCE;
-typedef void * WXHBITMAP;
-typedef void * WXHIMAGELIST;
-typedef void * WXHGLOBAL;
-typedef void * WXHDC;
-typedef unsigned int WXUINT;
-typedef unsigned long WXDWORD;
-typedef unsigned short WXWORD;
-
-typedef unsigned long WXCOLORREF;
-typedef struct tagMSG WXMSG;
-
-typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */
-typedef WXWINHANDLE WXWidget;
-
-typedef void * WXFORMPTR;
-typedef void * WXEVENTPTR;
-typedef void * WXRECTANGLEPTR;
-
-#endif /* __WXPALMOS__ */
-
-
-/* ABX: check __WIN32__ instead of __WXMSW__ for the same MSWBase in any Win32 port */
-#if defined(__WIN32__)
-
-/* the keywords needed for WinMain() declaration */
-#ifndef WXFAR
-# define WXFAR
-#endif
-
-/* Stand-ins for Windows types to avoid #including all of windows.h */
-typedef void * WXHWND;
-typedef void * WXHANDLE;
-typedef void * WXHICON;
-typedef void * WXHFONT;
-typedef void * WXHMENU;
-typedef void * WXHPEN;
-typedef void * WXHBRUSH;
-typedef void * WXHPALETTE;
-typedef void * WXHCURSOR;
-typedef void * WXHRGN;
-typedef void * WXRECTPTR;
-typedef void * WXHACCEL;
-typedef void WXFAR * WXHINSTANCE;
-typedef void * WXHBITMAP;
-typedef void * WXHIMAGELIST;
-typedef void * WXHGLOBAL;
-typedef void * WXHDC;
-typedef unsigned int WXUINT;
-typedef unsigned long WXDWORD;
-typedef unsigned short WXWORD;
-
-typedef unsigned long WXCOLORREF;
-typedef void * WXRGNDATA;
-typedef struct tagMSG WXMSG;
-typedef void * WXHCONV;
-typedef void * WXHKEY;
-typedef void * WXHTREEITEM;
-
-typedef void * WXDRAWITEMSTRUCT;
-typedef void * WXMEASUREITEMSTRUCT;
-typedef void * WXLPCREATESTRUCT;
-
-typedef WXHWND WXWidget;
-
-#ifdef __WIN64__
-typedef unsigned __int64 WXWPARAM;
-typedef __int64 WXLPARAM;
-typedef __int64 WXLRESULT;
-#else
-typedef unsigned int WXWPARAM;
-typedef long WXLPARAM;
-typedef long WXLRESULT;
-#endif
-
-#if defined(__GNUWIN32__) || defined(__WXMICROWIN__)
-typedef int (*WXFARPROC)();
-#else
-typedef int (__stdcall *WXFARPROC)();
-#endif
-#endif /* __WIN32__ */
-
-
-#if defined(__OS2__)
-typedef unsigned long DWORD;
-typedef unsigned short WORD;
-#endif
-
-#if defined(__WXPM__) || defined(__EMX__)
-#ifdef __WXPM__
-/* Stand-ins for OS/2 types, to avoid #including all of os2.h */
-typedef unsigned long WXHWND;
-typedef unsigned long WXHANDLE;
-typedef unsigned long WXHICON;
-typedef unsigned long WXHFONT;
-typedef unsigned long WXHMENU;
-typedef unsigned long WXHPEN;
-typedef unsigned long WXHBRUSH;
-typedef unsigned long WXHPALETTE;
-typedef unsigned long WXHCURSOR;
-typedef unsigned long WXHRGN;
-typedef unsigned long WXHACCEL;
-typedef unsigned long WXHBITMAP;
-typedef unsigned long WXHDC;
-typedef unsigned int WXUINT;
-typedef unsigned long WXDWORD;
-typedef unsigned short WXWORD;
-
-typedef unsigned long WXCOLORREF;
-typedef void * WXMSG;
-typedef unsigned long WXHTREEITEM;
-
-typedef void * WXDRAWITEMSTRUCT;
-typedef void * WXMEASUREITEMSTRUCT;
-typedef void * WXLPCREATESTRUCT;
-
-typedef WXHWND WXWidget;
-#endif
-#ifdef __EMX__
-/* Need a well-known type for WXFARPROC
- below. MPARAM is typedef'ed too late. */
-#define WXWPARAM void *
-#define WXLPARAM void *
-#else
-#define WXWPARAM MPARAM
-#define WXLPARAM MPARAM
-#endif
-#define RECT RECTL
-#define LOGFONT FATTRS
-#define LOWORD SHORT1FROMMP
-#define HIWORD SHORT2FROMMP
-
-typedef unsigned long WXMPARAM;
-typedef unsigned long WXMSGID;
-typedef void* WXRESULT;
-/* typedef int (*WXFARPROC)(); */
-/* some windows handles not defined by PM */
-typedef unsigned long HANDLE;
-typedef unsigned long HICON;
-typedef unsigned long HFONT;
-typedef unsigned long HMENU;
-typedef unsigned long HPEN;
-typedef unsigned long HBRUSH;
-typedef unsigned long HPALETTE;
-typedef unsigned long HCURSOR;
-typedef unsigned long HINSTANCE;
-typedef unsigned long HIMAGELIST;
-typedef unsigned long HGLOBAL;
-#endif /* WXPM || EMX */
-
-#if defined (__WXPM__)
-/* WIN32 graphics types for OS/2 GPI */
-
-/* RGB under OS2 is more like a PALETTEENTRY struct under Windows so we need a real RGB def */
-#define OS2RGB(r,g,b) ((DWORD)((unsigned char)(b) | ((unsigned char)(g) << 8)) | ((unsigned char)(r) << 16))
-
-typedef unsigned long COLORREF;
-#define GetRValue(rgb) ((unsigned char)((rgb) >> 16))
-#define GetGValue(rgb) ((unsigned char)(((unsigned short)(rgb)) >> 8))
-#define GetBValue(rgb) ((unsigned char)(rgb))
-#define PALETTEINDEX(i) ((COLORREF)(0x01000000 | (DWORD)(WORD)(i)))
-#define PALETTERGB(r,g,b) (0x02000000 | OS2RGB(r,g,b))
-/* OS2's RGB/RGB2 is backwards from this */
-typedef struct tagPALETTEENTRY
-{
- char bRed;
- char bGreen;
- char bBlue;
- char bFlags;
-} PALETTEENTRY;
-typedef struct tagLOGPALETTE
-{
- WORD palVersion;
- WORD palNumentries;
- WORD PALETTEENTRY[1];
-} LOGPALETTE;
-
-#if (defined(__VISAGECPP__) && (__IBMCPP__ < 400)) || defined (__WATCOMC__)
- /* VA 3.0 for some reason needs base data types when typedefing a proc proto??? */
-typedef void* (_System *WXFARPROC)(unsigned long, unsigned long, void*, void*);
-#else
-#if defined(__EMX__) && !defined(_System)
-#define _System
-#endif
-typedef WXRESULT (_System *WXFARPROC)(WXHWND, WXMSGID, WXWPARAM, WXLPARAM);
-#endif
-
-#endif /* __WXPM__ */
-
-
-#if defined(__WXMOTIF__) || defined(__WXX11__)
-/* Stand-ins for X/Xt/Motif types */
-typedef void* WXWindow;
-typedef void* WXWidget;
-typedef void* WXAppContext;
-typedef void* WXColormap;
-typedef void* WXColor;
-typedef void WXDisplay;
-typedef void WXEvent;
-typedef void* WXCursor;
-typedef void* WXPixmap;
-typedef void* WXFontStructPtr;
-typedef void* WXGC;
-typedef void* WXRegion;
-typedef void* WXFont;
-typedef void* WXImage;
-typedef void* WXFontList;
-typedef void* WXFontSet;
-typedef void* WXRendition;
-typedef void* WXRenderTable;
-typedef void* WXFontType; /* either a XmFontList or XmRenderTable */
-typedef void* WXString;
-
-typedef unsigned long Atom; /* this might fail on a few architectures */
-typedef long WXPixel; /* safety catch in src/motif/colour.cpp */
-
-#endif /* Motif */
-
-#ifdef __WXGTK__
-
-/* Stand-ins for GLIB types */
-typedef char gchar;
-typedef signed char gint8;
-typedef int gint;
-typedef unsigned guint;
-typedef unsigned long gulong;
-typedef void* gpointer;
-typedef struct _GSList GSList;
-
-/* Stand-ins for GDK types */
-typedef struct _GdkColor GdkColor;
-typedef struct _GdkColormap GdkColormap;
-typedef struct _GdkFont GdkFont;
-typedef struct _GdkGC GdkGC;
-typedef struct _GdkVisual GdkVisual;
-
-#ifdef __WXGTK20__
-typedef struct _GdkAtom *GdkAtom;
-typedef struct _GdkDrawable GdkWindow;
-typedef struct _GdkDrawable GdkBitmap;
-typedef struct _GdkDrawable GdkPixmap;
-#else /* GTK+ 1.2 */
-typedef gulong GdkAtom;
-typedef struct _GdkWindow GdkWindow;
-typedef struct _GdkWindow GdkBitmap;
-typedef struct _GdkWindow GdkPixmap;
-#endif /* GTK+ 1.2/2.0 */
-
-typedef struct _GdkCursor GdkCursor;
-typedef struct _GdkRegion GdkRegion;
-typedef struct _GdkDragContext GdkDragContext;
-
-#ifdef HAVE_XIM
-typedef struct _GdkIC GdkIC;
-typedef struct _GdkICAttr GdkICAttr;
-#endif
-
-/* Stand-ins for GTK types */
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkRcStyle GtkRcStyle;
-typedef struct _GtkAdjustment GtkAdjustment;
-typedef struct _GtkList GtkList;
-typedef struct _GtkToolbar GtkToolbar;
-typedef struct _GtkTooltips GtkTooltips;
-typedef struct _GtkNotebook GtkNotebook;
-typedef struct _GtkNotebookPage GtkNotebookPage;
-typedef struct _GtkAccelGroup GtkAccelGroup;
-typedef struct _GtkItemFactory GtkItemFactory;
-typedef struct _GtkSelectionData GtkSelectionData;
-typedef struct _GtkTextBuffer GtkTextBuffer;
-typedef struct _GtkRange GtkRange;
-
-typedef GtkWidget *WXWidget;
-
-#ifndef __WXGTK20__
-#define GTK_OBJECT_GET_CLASS(object) (GTK_OBJECT(object)->klass)
-#define GTK_CLASS_TYPE(klass) ((klass)->type)
-#endif
-
-#endif /* __WXGTK__ */
-
-#if defined(__WXGTK20__) || (defined(__WXX11__) && wxUSE_UNICODE)
-#define wxUSE_PANGO 1
-#else
-#define wxUSE_PANGO 0
-#endif
-
-#if wxUSE_PANGO
-/* Stand-ins for Pango types */
-typedef struct _PangoContext PangoContext;
-typedef struct _PangoLayout PangoLayout;
-typedef struct _PangoFontDescription PangoFontDescription;
-#endif
-
-#ifdef __WXMGL__
-typedef struct window_t *WXWidget;
-#endif /* MGL */
-
-#ifdef __WXDFB__
-/* DirectFB doesn't have the concept of non-TLW window, so use
- something arbitrary */
-typedef const void* WXWidget;
-#endif /* DFB */
-
-/* This is required because of clashing macros in windows.h, which may be */
-/* included before or after wxWidgets classes, and therefore must be */
-/* disabled here before any significant wxWidgets headers are included. */
-#ifdef __WXMSW__
-#include "wx/msw/winundef.h"
-#endif /* __WXMSW__ */
-
-/* --------------------------------------------------------------------------- */
-/* macro to define a class without copy ctor nor assignment operator */
-/* --------------------------------------------------------------------------- */
-
-#define DECLARE_NO_COPY_CLASS(classname) \
- private: \
- classname(const classname&); \
- classname& operator=(const classname&);
-
-#define DECLARE_NO_ASSIGN_CLASS(classname) \
- private: \
- classname& operator=(const classname&);
-
-/* --------------------------------------------------------------------------- */
-/* If a manifest is being automatically generated, add common controls 6 to it */
-/* --------------------------------------------------------------------------- */
-
-#if (!defined wxUSE_NO_MANIFEST || wxUSE_NO_MANIFEST == 0 ) && \
- ( defined _MSC_FULL_VER && _MSC_FULL_VER >= 140040130 )
-
-#define WX_CC_MANIFEST(cpu) \
- "/manifestdependency:\"type='win32' \
- name='Microsoft.Windows.Common-Controls' \
- version='6.0.0.0' \
- processorArchitecture='"cpu"' \
- publicKeyToken='6595b64144ccf1df' \
- language='*'\""
-
-#if defined _M_IX86
- #pragma comment(linker, WX_CC_MANIFEST("x86"))
-#elif defined _M_X64
- #pragma comment(linker, WX_CC_MANIFEST("amd64"))
-#elif defined _M_IA64
- #pragma comment(linker, WX_CC_MANIFEST("ia64"))
-#else
- #pragma comment(linker, WX_CC_MANIFEST("*"))
-#endif
-
-#endif /* !wxUSE_NO_MANIFEST && _MSC_FULL_VER >= 140040130 */
-
-#endif
- /* _WX_DEFS_H_ */
diff --git a/desmume/src/windows/wx/include/wx/dialog.h b/desmume/src/windows/wx/include/wx/dialog.h
deleted file mode 100644
index ffb69db18..000000000
--- a/desmume/src/windows/wx/include/wx/dialog.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dialog.h
-// Purpose: wxDialogBase class
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 29.06.99
-// RCS-ID: $Id: dialog.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DIALOG_H_BASE_
-#define _WX_DIALOG_H_BASE_
-
-#include "wx/defs.h"
-#include "wx/containr.h"
-#include "wx/toplevel.h"
-
-class WXDLLIMPEXP_FWD_CORE wxSizer;
-class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer;
-
-#define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
-
-#ifdef __WXWINCE__
-#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER)
-#else
-#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxSYSTEM_MENU | wxCLOSE_BOX)
-#endif
-
-extern WXDLLEXPORT_DATA(const wxChar) wxDialogNameStr[];
-
-class WXDLLEXPORT wxDialogBase : public wxTopLevelWindow
-{
-public:
- enum
- {
- // all flags allowed in wxDialogBase::CreateButtonSizer()
- ButtonSizerFlags = wxOK|wxCANCEL|wxYES|wxNO|wxHELP|wxNO_DEFAULT
- };
-
- wxDialogBase() { Init(); }
- virtual ~wxDialogBase() { }
-
- // define public wxDialog methods to be implemented by the derived classes
- virtual int ShowModal() = 0;
- virtual void EndModal(int retCode) = 0;
- virtual bool IsModal() const = 0;
-
-
- // Modal dialogs have a return code - usually the id of the last
- // pressed button
- void SetReturnCode(int returnCode) { m_returnCode = returnCode; }
- int GetReturnCode() const { return m_returnCode; }
-
- // Set the identifier for the affirmative button: this button will close
- // the dialog after validating data and calling TransferDataFromWindow()
- void SetAffirmativeId(int affirmativeId);
- int GetAffirmativeId() const { return m_affirmativeId; }
-
- // Set identifier for Esc key translation: the button with this id will
- // close the dialog without doing anything else; special value wxID_NONE
- // means to not handle Esc at all while wxID_ANY means to map Esc to
- // wxID_CANCEL if present and GetAffirmativeId() otherwise
- void SetEscapeId(int escapeId);
- int GetEscapeId() const { return m_escapeId; }
-
-#if wxUSE_STATTEXT // && wxUSE_TEXTCTRL
- // splits text up at newlines and places the
- // lines into a vertical wxBoxSizer
- wxSizer *CreateTextSizer( const wxString &message );
-#endif // wxUSE_STATTEXT // && wxUSE_TEXTCTRL
-
- // returns a horizontal wxBoxSizer containing the given buttons
- //
- // notice that the returned sizer can be NULL if no buttons are put in the
- // sizer (this mostly happens under smart phones and other atypical
- // platforms which have hardware buttons replacing OK/Cancel and such)
- wxSizer *CreateButtonSizer(long flags);
-
- // returns the sizer containing CreateButtonSizer() below a separating
- // static line for the platforms which use static lines for items
- // separation (i.e. not Mac)
- wxSizer *CreateSeparatedButtonSizer(long flags);
-
-#if wxUSE_BUTTON
- wxStdDialogButtonSizer *CreateStdDialogButtonSizer( long flags );
-#endif // wxUSE_BUTTON
-
-protected:
- // emulate click of a button with the given id if it's present in the dialog
- //
- // return true if button was "clicked" or false if we don't have it
- bool EmulateButtonClickIfPresent(int id);
-
- // this function is used by OnCharHook() to decide whether the given key
- // should close the dialog
- //
- // for most platforms the default implementation (which just checks for
- // Esc) is sufficient, but Mac port also adds Cmd-. here and other ports
- // could do something different if needed
- virtual bool IsEscapeKey(const wxKeyEvent& event);
-
- // end either modal or modeless dialog, for the modal dialog rc is used as
- // the dialog return code
- void EndDialog(int rc);
-
- // call Validate() and TransferDataFromWindow() and close dialog with
- // wxID_OK return code
- void AcceptAndClose();
-
-
- // The return code from modal dialog
- int m_returnCode;
-
- // The identifier for the affirmative button (usually wxID_OK)
- int m_affirmativeId;
-
- // The identifier for cancel button (usually wxID_CANCEL)
- int m_escapeId;
-
-private:
- // common part of all ctors
- void Init();
-
- // handle Esc key presses
- void OnCharHook(wxKeyEvent& event);
-
- // handle closing the dialog window
- void OnCloseWindow(wxCloseEvent& event);
-
- // handle the standard buttons
- void OnButton(wxCommandEvent& event);
-
- // update the background colour
- void OnSysColourChanged(wxSysColourChangedEvent& event);
-
-
- DECLARE_NO_COPY_CLASS(wxDialogBase)
- DECLARE_EVENT_TABLE()
- WX_DECLARE_CONTROL_CONTAINER();
-};
-
-
-#if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
- #include "wx/univ/dialog.h"
-#else
- #if defined(__WXPALMOS__)
- #include "wx/palmos/dialog.h"
- #elif defined(__WXMSW__)
- #include "wx/msw/dialog.h"
- #elif defined(__WXMOTIF__)
- #include "wx/motif/dialog.h"
- #elif defined(__WXGTK20__)
- #include "wx/gtk/dialog.h"
- #elif defined(__WXGTK__)
- #include "wx/gtk1/dialog.h"
- #elif defined(__WXMAC__)
- #include "wx/mac/dialog.h"
- #elif defined(__WXCOCOA__)
- #include "wx/cocoa/dialog.h"
- #elif defined(__WXPM__)
- #include "wx/os2/dialog.h"
- #endif
-#endif
-
-#endif
- // _WX_DIALOG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dialup.h b/desmume/src/windows/wx/include/wx/dialup.h
deleted file mode 100644
index c2dd296de..000000000
--- a/desmume/src/windows/wx/include/wx/dialup.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dialup.h
-// Purpose: Network related wxWidgets classes and functions
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 07.07.99
-// RCS-ID: $Id: dialup.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DIALUP_H
-#define _WX_DIALUP_H
-
-#if wxUSE_DIALUP_MANAGER
-
-#include "wx/event.h"
-
-// ----------------------------------------------------------------------------
-// misc
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_BASE wxArrayString;
-
-#define WXDIALUP_MANAGER_DEFAULT_BEACONHOST wxT("www.yahoo.com")
-
-// ----------------------------------------------------------------------------
-// A class which groups functions dealing with connecting to the network from a
-// workstation using dial-up access to the net. There is at most one instance
-// of this class in the program accessed via GetDialUpManager().
-// ----------------------------------------------------------------------------
-
-/* TODO
- *
- * 1. more configurability for Unix: i.e. how to initiate the connection, how
- * to check for online status, &c.
- * 2. a function to enumerate all connections (ISPs) and show a dialog in
- * Dial() allowing to choose between them if no ISP given
- * 3. add an async version of dialing functions which notify the caller about
- * the progress (or may be even start another thread to monitor it)
- * 4. the static creation/accessor functions are not MT-safe - but is this
- * really crucial? I think we may suppose they're always called from the
- * main thread?
- */
-
-class WXDLLEXPORT wxDialUpManager
-{
-public:
- // this function should create and return the object of the
- // platform-specific class derived from wxDialUpManager. It's implemented
- // in the platform-specific source files.
- static wxDialUpManager *Create();
-
- // could the dialup manager be initialized correctly? If this function
- // returns false, no other functions will work neither, so it's a good idea
- // to call this function and check its result before calling any other
- // wxDialUpManager methods
- virtual bool IsOk() const = 0;
-
- // virtual dtor for any base class
- virtual ~wxDialUpManager() { }
-
- // operations
- // ----------
-
- // fills the array with the names of all possible values for the first
- // parameter to Dial() on this machine and returns their number (may be 0)
- virtual size_t GetISPNames(wxArrayString& names) const = 0;
-
- // dial the given ISP, use username and password to authentificate
- //
- // if no nameOfISP is given, the function will select the default one
- //
- // if no username/password are given, the function will try to do without
- // them, but will ask the user if really needed
- //
- // if async parameter is false, the function waits until the end of dialing
- // and returns true upon successful completion.
- // if async is true, the function only initiates the connection and returns
- // immediately - the result is reported via events (an event is sent
- // anyhow, but if dialing failed it will be a DISCONNECTED one)
- virtual bool Dial(const wxString& nameOfISP = wxEmptyString,
- const wxString& username = wxEmptyString,
- const wxString& password = wxEmptyString,
- bool async = true) = 0;
-
- // returns true if (async) dialing is in progress
- virtual bool IsDialing() const = 0;
-
- // cancel dialing the number initiated with Dial(async = true)
- // NB: this won't result in DISCONNECTED event being sent
- virtual bool CancelDialing() = 0;
-
- // hang up the currently active dial up connection
- virtual bool HangUp() = 0;
-
- // online status
- // -------------
-
- // returns true if the computer has a permanent network connection (i.e. is
- // on a LAN) and so there is no need to use Dial() function to go online
- //
- // NB: this functions tries to guess the result and it is not always
- // guaranteed to be correct, so it's better to ask user for
- // confirmation or give him a possibility to override it
- virtual bool IsAlwaysOnline() const = 0;
-
- // returns true if the computer is connected to the network: under Windows,
- // this just means that a RAS connection exists, under Unix we check that
- // the "well-known host" (as specified by SetWellKnownHost) is reachable
- virtual bool IsOnline() const = 0;
-
- // sometimes the built-in logic for determining the online status may fail,
- // so, in general, the user should be allowed to override it. This function
- // allows to forcefully set the online status - whatever our internal
- // algorithm may think about it.
- virtual void SetOnlineStatus(bool isOnline = true) = 0;
-
- // set misc wxDialUpManager options
- // --------------------------------
-
- // enable automatical checks for the connection status and sending of
- // wxEVT_DIALUP_CONNECTED/wxEVT_DIALUP_DISCONNECTED events. The interval
- // parameter is only for Unix where we do the check manually: under
- // Windows, the notification about the change of connection status is
- // instantenous.
- //
- // Returns false if couldn't set up automatic check for online status.
- virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds = 60) = 0;
-
- // disable automatic check for connection status change - notice that the
- // wxEVT_DIALUP_XXX events won't be sent any more neither.
- virtual void DisableAutoCheckOnlineStatus() = 0;
-
- // additional Unix-only configuration
- // ----------------------------------
-
- // under Unix, the value of well-known host is used to check whether we're
- // connected to the internet. It's unused under Windows, but this function
- // is always safe to call. The default value is www.yahoo.com.
- virtual void SetWellKnownHost(const wxString& hostname,
- int portno = 80) = 0;
-
- // Sets the commands to start up the network and to hang up again. Used by
- // the Unix implementations only.
- virtual void
- SetConnectCommand(const wxString& commandDial = wxT("/usr/bin/pon"),
- const wxString& commandHangup = wxT("/usr/bin/poff")) = 0;
-};
-
-// ----------------------------------------------------------------------------
-// wxDialUpManager events
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EVENT_TYPE(wxEVT_DIALUP_CONNECTED, 450)
- DECLARE_EVENT_TYPE(wxEVT_DIALUP_DISCONNECTED, 451)
-END_DECLARE_EVENT_TYPES()
-
-// the event class for the dialup events
-class WXDLLEXPORT wxDialUpEvent : public wxEvent
-{
-public:
- wxDialUpEvent(bool isConnected, bool isOwnEvent) : wxEvent(isOwnEvent)
- {
- SetEventType(isConnected ? wxEVT_DIALUP_CONNECTED
- : wxEVT_DIALUP_DISCONNECTED);
- }
-
- // is this a CONNECTED or DISCONNECTED event?
- bool IsConnectedEvent() const
- { return GetEventType() == wxEVT_DIALUP_CONNECTED; }
-
- // does this event come from wxDialUpManager::Dial() or from some extrenal
- // process (i.e. does it result from our own attempt to establish the
- // connection)?
- bool IsOwnEvent() const { return m_id != 0; }
-
- // implement the base class pure virtual
- virtual wxEvent *Clone() const { return new wxDialUpEvent(*this); }
-
-private:
- DECLARE_NO_ASSIGN_CLASS(wxDialUpEvent)
-};
-
-// the type of dialup event handler function
-typedef void (wxEvtHandler::*wxDialUpEventFunction)(wxDialUpEvent&);
-
-#define wxDialUpEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDialUpEventFunction, &func)
-
-// macros to catch dialup events
-#define EVT_DIALUP_CONNECTED(func) \
- wx__DECLARE_EVT0(wxEVT_DIALUP_CONNECTED, wxDialUpEventHandler(func))
-#define EVT_DIALUP_DISCONNECTED(func) \
- wx__DECLARE_EVT0(wxEVT_DIALUP_DISCONNECTED, wxDialUpEventHandler(func))
-
-
-#endif // wxUSE_DIALUP_MANAGER
-
-#endif // _WX_DIALUP_H
diff --git a/desmume/src/windows/wx/include/wx/dir.h b/desmume/src/windows/wx/include/wx/dir.h
deleted file mode 100644
index 0a5b2cffe..000000000
--- a/desmume/src/windows/wx/include/wx/dir.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dir.h
-// Purpose: wxDir is a class for enumerating the files in a directory
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 08.12.99
-// RCS-ID: $Id: dir.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) 1999 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DIR_H_
-#define _WX_DIR_H_
-
-#include "wx/longlong.h"
-#include "wx/string.h"
-
-class WXDLLIMPEXP_FWD_BASE wxArrayString;
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// these flags define what kind of filenames is included in the list of files
-// enumerated by GetFirst/GetNext
-enum
-{
- wxDIR_FILES = 0x0001, // include files
- wxDIR_DIRS = 0x0002, // include directories
- wxDIR_HIDDEN = 0x0004, // include hidden files
- wxDIR_DOTDOT = 0x0008, // include '.' and '..'
-
- // by default, enumerate everything except '.' and '..'
- wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN
-};
-
-// these constants are possible return value of wxDirTraverser::OnDir()
-enum wxDirTraverseResult
-{
- wxDIR_IGNORE = -1, // ignore this directory but continue with others
- wxDIR_STOP, // stop traversing
- wxDIR_CONTINUE // continue into this directory
-};
-
-// ----------------------------------------------------------------------------
-// wxDirTraverser: helper class for wxDir::Traverse()
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxDirTraverser
-{
-public:
- /// a virtual dtor has been provided since this class has virtual members
- virtual ~wxDirTraverser() { }
- // called for each file found by wxDir::Traverse()
- //
- // return wxDIR_STOP or wxDIR_CONTINUE from here (wxDIR_IGNORE doesn't
- // make sense)
- virtual wxDirTraverseResult OnFile(const wxString& filename) = 0;
-
- // called for each directory found by wxDir::Traverse()
- //
- // return one of the enum elements defined above
- virtual wxDirTraverseResult OnDir(const wxString& dirname) = 0;
-
- // called for each directory which we couldn't open during our traversal
- // of the directory tyree
- //
- // this method can also return either wxDIR_STOP, wxDIR_IGNORE or
- // wxDIR_CONTINUE but the latter is treated specially: it means to retry
- // opening the directory and so may lead to infinite loop if it is
- // returned unconditionally, be careful with this!
- //
- // the base class version always returns wxDIR_IGNORE
- virtual wxDirTraverseResult OnOpenError(const wxString& dirname);
-};
-
-// ----------------------------------------------------------------------------
-// wxDir: portable equivalent of {open/read/close}dir functions
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_BASE wxDirData;
-
-class WXDLLIMPEXP_BASE wxDir
-{
-public:
- // test for existence of a directory with the given name
- static bool Exists(const wxString& dir);
-
- // ctors
- // -----
-
- // default, use Open()
- wxDir() { m_data = NULL; }
-
- // opens the directory for enumeration, use IsOpened() to test success
- wxDir(const wxString& dir);
-
- // dtor cleans up the associated ressources
- ~wxDir();
-
- // open the directory for enumerating
- bool Open(const wxString& dir);
-
- // returns true if the directory was successfully opened
- bool IsOpened() const;
-
- // get the full name of the directory (without '/' at the end)
- wxString GetName() const;
-
- // file enumeration routines
- // -------------------------
-
- // start enumerating all files matching filespec (or all files if it is
- // empty) and flags, return true on success
- bool GetFirst(wxString *filename,
- const wxString& filespec = wxEmptyString,
- int flags = wxDIR_DEFAULT) const;
-
- // get next file in the enumeration started with GetFirst()
- bool GetNext(wxString *filename) const;
-
- // return true if this directory has any files in it
- bool HasFiles(const wxString& spec = wxEmptyString);
-
- // return true if this directory has any subdirectories
- bool HasSubDirs(const wxString& spec = wxEmptyString);
-
- // enumerate all files in this directory and its subdirectories
- //
- // return the number of files found
- size_t Traverse(wxDirTraverser& sink,
- const wxString& filespec = wxEmptyString,
- int flags = wxDIR_DEFAULT) const;
-
- // simplest version of Traverse(): get the names of all files under this
- // directory into filenames array, return the number of files
- static size_t GetAllFiles(const wxString& dirname,
- wxArrayString *files,
- const wxString& filespec = wxEmptyString,
- int flags = wxDIR_DEFAULT);
-
- // check if there any files matching the given filespec under the given
- // directory (i.e. searches recursively), return the file path if found or
- // empty string otherwise
- static wxString FindFirst(const wxString& dirname,
- const wxString& filespec,
- int flags = wxDIR_DEFAULT);
-
- // returns the size of all directories recursively found in given path
- static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL);
-
-private:
- friend class wxDirData;
-
- wxDirData *m_data;
-
- DECLARE_NO_COPY_CLASS(wxDir)
-};
-
-#endif // _WX_DIR_H_
-
diff --git a/desmume/src/windows/wx/include/wx/dirctrl.h b/desmume/src/windows/wx/include/wx/dirctrl.h
deleted file mode 100644
index 704f8bb76..000000000
--- a/desmume/src/windows/wx/include/wx/dirctrl.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dirctrl.h
-// Purpose: Directory control base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dirctrl.h 33948 2005-05-04 18:57:50Z JS $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DIRCTRL_H_BASE_
-#define _WX_DIRCTRL_H_BASE_
-
-#include "wx/generic/dirctrlg.h"
-
-#endif
- // _WX_DIRCTRL_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dirdlg.h b/desmume/src/windows/wx/include/wx/dirdlg.h
deleted file mode 100644
index 22ae35471..000000000
--- a/desmume/src/windows/wx/include/wx/dirdlg.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dirdlg.h
-// Purpose: wxDirDialog base class
-// Author: Robert Roebling
-// Modified by:
-// Created:
-// Copyright: (c) Robert Roebling
-// RCS-ID: $Id: dirdlg.h 44027 2006-12-21 19:26:48Z VZ $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DIRDLG_H_BASE_
-#define _WX_DIRDLG_H_BASE_
-
-#if wxUSE_DIRDLG
-
-#include "wx/dialog.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxDirDialogDefaultFolderStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
-
-#define wxDD_CHANGE_DIR 0x0100
-#define wxDD_DIR_MUST_EXIST 0x0200
-
-// deprecated, on by default now, use wxDD_DIR_MUST_EXIST to disable it
-#define wxDD_NEW_DIR_BUTTON 0
-
-#ifdef __WXWINCE__
- #define wxDD_DEFAULT_STYLE wxDEFAULT_DIALOG_STYLE
-#else
- #define wxDD_DEFAULT_STYLE (wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
-#endif
-
-//-------------------------------------------------------------------------
-// wxDirDialogBase
-//-------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDirDialogBase : public wxDialog
-{
-public:
- wxDirDialogBase() {}
- wxDirDialogBase(wxWindow *parent,
- const wxString& title = wxDirSelectorPromptStr,
- const wxString& defaultPath = wxEmptyString,
- long style = wxDD_DEFAULT_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize,
- const wxString& name = wxDirDialogNameStr)
- {
- Create(parent, title, defaultPath, style, pos, sz, name);
- }
-
- virtual ~wxDirDialogBase() {}
-
-
- bool Create(wxWindow *parent,
- const wxString& title = wxDirSelectorPromptStr,
- const wxString& defaultPath = wxEmptyString,
- long style = wxDD_DEFAULT_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize,
- const wxString& name = wxDirDialogNameStr)
- {
- if (!wxDialog::Create(parent, wxID_ANY, title, pos, sz, style, name))
- return false;
- m_path = defaultPath;
- m_message = title;
- return true;
- }
-
-#if WXWIN_COMPATIBILITY_2_6
-
- wxDEPRECATED( long GetStyle() const );
- wxDEPRECATED( void SetStyle(long style) );
-
-#endif // WXWIN_COMPATIBILITY_2_6
-
- virtual void SetMessage(const wxString& message) { m_message = message; }
- virtual void SetPath(const wxString& path) { m_path = path; }
-
- virtual wxString GetMessage() const { return m_message; }
- virtual wxString GetPath() const { return m_path; }
-
-protected:
- wxString m_message;
- wxString m_path;
-};
-
-
-// Universal and non-port related switches with need for generic implementation
-#if defined(__WXUNIVERSAL__)
- #include "wx/generic/dirdlgg.h"
- #define wxDirDialog wxGenericDirDialog
-#elif defined(__WXMSW__) && (defined(__SALFORDC__) || \
- !wxUSE_OLE || \
- (defined (__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS))
- #include "wx/generic/dirdlgg.h"
- #define wxDirDialog wxGenericDirDialog
-#elif defined(__WXMSW__) && defined(__WXWINCE__) && !defined(__HANDHELDPC__)
- #include "wx/generic/dirdlgg.h" // MS PocketPC or MS Smartphone
- #define wxDirDialog wxGenericDirDialog
-#elif defined(__WXMSW__)
- #include "wx/msw/dirdlg.h" // Native MSW
-#elif defined(__WXGTK24__)
- #include "wx/gtk/dirdlg.h" // Native GTK for gtk2.4
-#elif defined(__WXGTK__)
- #include "wx/generic/dirdlgg.h"
- #define wxDirDialog wxGenericDirDialog
-#elif defined(__WXMAC__)
- #include "wx/mac/dirdlg.h" // Native Mac
-#elif defined(__WXCOCOA__)
- #include "wx/cocoa/dirdlg.h" // Native Cocoa
-#elif defined(__WXMOTIF__) || \
- defined(__WXX11__) || \
- defined(__WXMGL__) || \
- defined(__WXCOCOA__) || \
- defined(__WXPM__)
- #include "wx/generic/dirdlgg.h" // Other ports use generic implementation
- #define wxDirDialog wxGenericDirDialog
-#endif
-
-// ----------------------------------------------------------------------------
-// common ::wxDirSelector() function
-// ----------------------------------------------------------------------------
-
-WXDLLEXPORT wxString
-wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
- const wxString& defaultPath = wxEmptyString,
- long style = wxDD_DEFAULT_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- wxWindow *parent = NULL);
-
-#endif // wxUSE_DIRDLG
-
-#endif
- // _WX_DIRDLG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/display.h b/desmume/src/windows/wx/include/wx/display.h
deleted file mode 100644
index 81f812c60..000000000
--- a/desmume/src/windows/wx/include/wx/display.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/display.h
-// Purpose: wxDisplay class
-// Author: Royce Mitchell III, Vadim Zeitlin
-// Created: 06/21/02
-// RCS-ID: $Id: display.h 49804 2007-11-10 01:09:42Z VZ $
-// Copyright: (c) 2002-2006 wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DISPLAY_H_BASE_
-#define _WX_DISPLAY_H_BASE_
-
-// NB: no #if wxUSE_DISPLAY here, the display geometry part of this class (but
-// not the video mode stuff) is always available but if wxUSE_DISPLAY == 0
-// it becomes just a trivial wrapper around the old wxDisplayXXX() functions
-
-#if wxUSE_DISPLAY
- #include "wx/dynarray.h"
- #include "wx/vidmode.h"
-
- WX_DECLARE_EXPORTED_OBJARRAY(wxVideoMode, wxArrayVideoModes);
-
- // default, uninitialized, video mode object
- extern WXDLLEXPORT_DATA(const wxVideoMode) wxDefaultVideoMode;
-#endif // wxUSE_DISPLAY
-
-class WXDLLIMPEXP_FWD_CORE wxWindow;
-class WXDLLIMPEXP_FWD_CORE wxPoint;
-class WXDLLIMPEXP_FWD_CORE wxRect;
-class WXDLLIMPEXP_FWD_BASE wxString;
-
-class WXDLLIMPEXP_FWD_CORE wxDisplayFactory;
-class WXDLLIMPEXP_FWD_CORE wxDisplayImpl;
-
-// ----------------------------------------------------------------------------
-// wxDisplay: represents a display/monitor attached to the system
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDisplay
-{
-public:
- // initialize the object containing all information about the given
- // display
- //
- // the displays are numbered from 0 to GetCount() - 1, 0 is always the
- // primary display and the only one which is always supported
- wxDisplay(unsigned n = 0);
-
- // dtor is not virtual as this is a concrete class not meant to be derived
- // from
- ~wxDisplay();
-
-
- // return the number of available displays, valid parameters to
- // wxDisplay ctor are from 0 up to this number
- static unsigned GetCount();
-
- // find the display where the given point lies, return wxNOT_FOUND if
- // it doesn't belong to any display
- static int GetFromPoint(const wxPoint& pt);
-
- // find the display where the given window lies, return wxNOT_FOUND if it
- // is not shown at all
- static int GetFromWindow(wxWindow *window);
-
-
- // return true if the object was initialized successfully
- bool IsOk() const { return m_impl != NULL; }
-
- // get the full display size
- wxRect GetGeometry() const;
-
- // get the client area of the display, i.e. without taskbars and such
- wxRect GetClientArea() const;
-
- // name may be empty
- wxString GetName() const;
-
- // display 0 is usually the primary display
- bool IsPrimary() const;
-
-
-#if wxUSE_DISPLAY
- // enumerate all video modes supported by this display matching the given
- // one (in the sense of wxVideoMode::Match())
- //
- // as any mode matches the default value of the argument and there is
- // always at least one video mode supported by display, the returned array
- // is only empty for the default value of the argument if this function is
- // not supported at all on this platform
- wxArrayVideoModes
- GetModes(const wxVideoMode& mode = wxDefaultVideoMode) const;
-
- // get current video mode
- wxVideoMode GetCurrentMode() const;
-
- // change current mode, return true if succeeded, false otherwise
- //
- // for the default value of the argument restores the video mode to default
- bool ChangeMode(const wxVideoMode& mode = wxDefaultVideoMode);
-
- // restore the default video mode (just a more readable synonym)
- void ResetMode() { (void)ChangeMode(); }
-#endif // wxUSE_DISPLAY
-
-private:
- // returns the factory used to implement our static methods and create new
- // displays
- static wxDisplayFactory& Factory();
-
- // creates the factory object, called by Factory() when it is called for
- // the first time and should return a pointer allocated with new (the
- // caller will delete it)
- //
- // this method must be implemented in platform-specific code if
- // wxUSE_DISPLAY == 1 (if it is 0 we provide the stub in common code)
- static wxDisplayFactory *CreateFactory();
-
-
- // the real implementation
- wxDisplayImpl *m_impl;
-
-
- DECLARE_NO_COPY_CLASS(wxDisplay)
-};
-
-#endif // _WX_DISPLAY_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/display_impl.h b/desmume/src/windows/wx/include/wx/display_impl.h
deleted file mode 100644
index f79766e03..000000000
--- a/desmume/src/windows/wx/include/wx/display_impl.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/display_impl.h
-// Purpose: wxDisplayImpl class declaration
-// Author: Vadim Zeitlin
-// Created: 2006-03-15
-// RCS-ID: $Id: display_impl.h 41548 2006-10-02 05:38:05Z PC $
-// Copyright: (c) 2002-2006 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DISPLAY_IMPL_H_BASE_
-#define _WX_DISPLAY_IMPL_H_BASE_
-
-#include "wx/gdicmn.h" // for wxRect
-
-// ----------------------------------------------------------------------------
-// wxDisplayFactory: allows to create wxDisplay objects
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDisplayFactory
-{
-public:
- wxDisplayFactory() { }
- virtual ~wxDisplayFactory() { }
-
- // create a new display object
- //
- // it can return a NULL pointer if the display creation failed
- virtual wxDisplayImpl *CreateDisplay(unsigned n) = 0;
-
- // get the total number of displays
- virtual unsigned GetCount() = 0;
-
- // return the display for the given point or wxNOT_FOUND
- virtual int GetFromPoint(const wxPoint& pt) = 0;
-
- // return the display for the given window or wxNOT_FOUND
- //
- // the window pointer must not be NULL (i.e. caller should check it)
- virtual int GetFromWindow(wxWindow *window);
-};
-
-// ----------------------------------------------------------------------------
-// wxDisplayImpl: base class for all wxDisplay implementations
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDisplayImpl
-{
-public:
- // virtual dtor for this base class
- virtual ~wxDisplayImpl() { }
-
-
- // return the full area of this display
- virtual wxRect GetGeometry() const = 0;
-
- // return the area of the display available for normal windows
- virtual wxRect GetClientArea() const { return GetGeometry(); }
-
- // return the name (may be empty)
- virtual wxString GetName() const = 0;
-
- // return the index of this display
- unsigned GetIndex() const { return m_index; }
-
- // return true if this is the primary monitor (usually one with index 0)
- virtual bool IsPrimary() const { return GetIndex() == 0; }
-
-
-#if wxUSE_DISPLAY
- // implements wxDisplay::GetModes()
- virtual wxArrayVideoModes GetModes(const wxVideoMode& mode) const = 0;
-
- // get current video mode
- virtual wxVideoMode GetCurrentMode() const = 0;
-
- // change current mode, return true if succeeded, false otherwise
- virtual bool ChangeMode(const wxVideoMode& mode) = 0;
-#endif // wxUSE_DISPLAY
-
-protected:
- // create the object providing access to the display with the given index
- wxDisplayImpl(unsigned n) : m_index(n) { }
-
-
- // the index of this display (0 is always the primary one)
- const unsigned m_index;
-
-
- friend class wxDisplayFactory;
-
- DECLARE_NO_COPY_CLASS(wxDisplayImpl)
-};
-
-// ----------------------------------------------------------------------------
-// wxDisplayFactorySingle
-// ----------------------------------------------------------------------------
-
-// this is a stub implementation using single/main display only, it is
-// available even if wxUSE_DISPLAY == 0
-class WXDLLEXPORT wxDisplayFactorySingle : public wxDisplayFactory
-{
-public:
- virtual wxDisplayImpl *CreateDisplay(unsigned n);
- virtual unsigned GetCount() { return 1; }
- virtual int GetFromPoint(const wxPoint& pt);
-};
-
-#endif // _WX_DISPLAY_IMPL_H_BASE_
-
diff --git a/desmume/src/windows/wx/include/wx/dlimpexp.h b/desmume/src/windows/wx/include/wx/dlimpexp.h
deleted file mode 100644
index c6fc095ce..000000000
--- a/desmume/src/windows/wx/include/wx/dlimpexp.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Name: wx/dlimpexp.h
- * Purpose: Macros for declaring DLL-imported/exported functions
- * Author: Vadim Zeitlin
- * Modified by:
- * Created: 16.10.2003 (extracted from wx/defs.h)
- * RCS-ID: $Id: dlimpexp.h 49563 2007-10-31 20:46:21Z VZ $
- * Copyright: (c) 2003 Vadim Zeitlin
- * Licence: wxWindows licence
- */
-
-/*
- This is a C file, not C++ one, do not use C++ comments here!
- */
-
-#ifndef _WX_DLIMPEXP_H_
-#define _WX_DLIMPEXP_H_
-
-#if defined(__WXMSW__)
- /*
- __declspec works in BC++ 5 and later, Watcom C++ 11.0 and later as well
- as VC++ and gcc
- */
-# if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNUC__) || defined(__WATCOMC__)
-# define WXEXPORT __declspec(dllexport)
-# define WXIMPORT __declspec(dllimport)
-# else /* compiler doesn't support __declspec() */
-# define WXEXPORT
-# define WXIMPORT
-# endif
-#elif defined(__WXPM__)
-# if defined (__WATCOMC__)
-# define WXEXPORT __declspec(dllexport)
- /*
- __declspec(dllimport) prepends __imp to imported symbols. We do NOT
- want that!
- */
-# define WXIMPORT
-# elif defined(__EMX__)
-# define WXEXPORT
-# define WXIMPORT
-# elif (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
-# define WXEXPORT _Export
-# define WXIMPORT _Export
-# endif
-#elif defined(__WXMAC__) || defined(__WXCOCOA__)
-# ifdef __MWERKS__
-# define WXEXPORT __declspec(export)
-# define WXIMPORT __declspec(import)
-# endif
-#elif defined(__CYGWIN__)
-# define WXEXPORT __declspec(dllexport)
-# define WXIMPORT __declspec(dllimport)
-#endif
-
-/* for other platforms/compilers we don't anything */
-#ifndef WXEXPORT
-# define WXEXPORT
-# define WXIMPORT
-#endif
-
-/*
- We support building wxWidgets as a set of several libraries but we don't
- support arbitrary combinations of libs/DLLs: either we build all of them as
- DLLs (in which case WXMAKINGDLL is defined) or none (it isn't).
-
- However we have a problem because we need separate WXDLLEXPORT versions for
- different libraries as, for example, wxString class should be dllexported
- when compiled in wxBase and dllimported otherwise, so we do define separate
- WXMAKING/USINGDLL_XYZ constants for each component XYZ.
- */
-#ifdef WXMAKINGDLL
-# if wxUSE_BASE
-# define WXMAKINGDLL_BASE
-# endif
-
-# define WXMAKINGDLL_NET
-# define WXMAKINGDLL_CORE
-# define WXMAKINGDLL_ADV
-# define WXMAKINGDLL_QA
-# define WXMAKINGDLL_ODBC
-# define WXMAKINGDLL_DBGRID
-# define WXMAKINGDLL_HTML
-# define WXMAKINGDLL_GL
-# define WXMAKINGDLL_XML
-# define WXMAKINGDLL_XRC
-# define WXMAKINGDLL_AUI
-# define WXMAKINGDLL_RICHTEXT
-# define WXMAKINGDLL_MEDIA
-#endif /* WXMAKINGDLL */
-
-/*
- WXDLLEXPORT maps to export declaration when building the DLL, to import
- declaration if using it or to nothing at all if we don't use wxWin as DLL
- */
-#ifdef WXMAKINGDLL_BASE
-# define WXDLLIMPEXP_BASE WXEXPORT
-# define WXDLLIMPEXP_DATA_BASE(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_BASE WXIMPORT
-# define WXDLLIMPEXP_DATA_BASE(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_BASE
-# define WXDLLIMPEXP_DATA_BASE(type) type
-#endif
-
-#ifdef WXMAKINGDLL_NET
-# define WXDLLIMPEXP_NET WXEXPORT
-# define WXDLLIMPEXP_DATA_NET(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_NET WXIMPORT
-# define WXDLLIMPEXP_DATA_NET(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_NET
-# define WXDLLIMPEXP_DATA_NET(type) type
-#endif
-
-#ifdef WXMAKINGDLL_CORE
-# define WXDLLIMPEXP_CORE WXEXPORT
-# define WXDLLIMPEXP_DATA_CORE(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_CORE WXIMPORT
-# define WXDLLIMPEXP_DATA_CORE(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_CORE
-# define WXDLLIMPEXP_DATA_CORE(type) type
-#endif
-
-#ifdef WXMAKINGDLL_ADV
-# define WXDLLIMPEXP_ADV WXEXPORT
-# define WXDLLIMPEXP_DATA_ADV(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_ADV WXIMPORT
-# define WXDLLIMPEXP_DATA_ADV(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_ADV
-# define WXDLLIMPEXP_DATA_ADV(type) type
-#endif
-
-#ifdef WXMAKINGDLL_ODBC
-# define WXDLLIMPEXP_ODBC WXEXPORT
-# define WXDLLIMPEXP_DATA_ODBC(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_ODBC WXIMPORT
-# define WXDLLIMPEXP_DATA_ODBC(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_ODBC
-# define WXDLLIMPEXP_DATA_ODBC(type) type
-#endif
-
-#ifdef WXMAKINGDLL_QA
-# define WXDLLIMPEXP_QA WXEXPORT
-# define WXDLLIMPEXP_DATA_QA(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_QA WXIMPORT
-# define WXDLLIMPEXP_DATA_QA(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_QA
-# define WXDLLIMPEXP_DATA_QA(type) type
-#endif
-
-#ifdef WXMAKINGDLL_DBGRID
-# define WXDLLIMPEXP_DBGRID WXEXPORT
-# define WXDLLIMPEXP_DATA_DBGRID(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_DBGRID WXIMPORT
-# define WXDLLIMPEXP_DATA_DBGRID(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_DBGRID
-# define WXDLLIMPEXP_DATA_DBGRID(type) type
-#endif
-
-#ifdef WXMAKINGDLL_HTML
-# define WXDLLIMPEXP_HTML WXEXPORT
-# define WXDLLIMPEXP_DATA_HTML(type) WXEXPORT type
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_HTML WXIMPORT
-# define WXDLLIMPEXP_DATA_HTML(type) WXIMPORT type
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_HTML
-# define WXDLLIMPEXP_DATA_HTML(type) type
-#endif
-
-#ifdef WXMAKINGDLL_GL
-# define WXDLLIMPEXP_GL WXEXPORT
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_GL WXIMPORT
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_GL
-#endif
-
-#ifdef WXMAKINGDLL_XML
-# define WXDLLIMPEXP_XML WXEXPORT
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_XML WXIMPORT
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_XML
-#endif
-
-#ifdef WXMAKINGDLL_XRC
-# define WXDLLIMPEXP_XRC WXEXPORT
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_XRC WXIMPORT
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_XRC
-#endif
-
-#ifdef WXMAKINGDLL_AUI
-# define WXDLLIMPEXP_AUI WXEXPORT
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_AUI WXIMPORT
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_AUI
-#endif
-
-#ifdef WXMAKINGDLL_RICHTEXT
-# define WXDLLIMPEXP_RICHTEXT WXEXPORT
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_RICHTEXT WXIMPORT
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_RICHTEXT
-#endif
-
-#ifdef WXMAKINGDLL_MEDIA
-# define WXDLLIMPEXP_MEDIA WXEXPORT
-#elif defined(WXUSINGDLL)
-# define WXDLLIMPEXP_MEDIA WXIMPORT
-#else /* not making nor using DLL */
-# define WXDLLIMPEXP_MEDIA
-#endif
-
-/* for backwards compatibility, define suffix-less versions too */
-#define WXDLLEXPORT WXDLLIMPEXP_CORE
-#define WXDLLEXPORT_DATA WXDLLIMPEXP_DATA_CORE
-
-/* wx-2.9 introduces new macros for forward declarations, include them
- * here for forward compatibility:
-
- GCC warns about using __attribute__ (and also __declspec in mingw32 case) on
- forward declarations while MSVC complains about forward declarations without
- __declspec for the classes later declared with it, so we need a separate set
- of macros for forward declarations to hide this difference:
- */
-#if defined(__WINDOWS__) && defined(__GNUC__)
- #define WXDLLIMPEXP_FWD_BASE
- #define WXDLLIMPEXP_FWD_NET
- #define WXDLLIMPEXP_FWD_CORE
- #define WXDLLIMPEXP_FWD_ADV
- #define WXDLLIMPEXP_FWD_QA
- #define WXDLLIMPEXP_FWD_HTML
- #define WXDLLIMPEXP_FWD_GL
- #define WXDLLIMPEXP_FWD_XML
- #define WXDLLIMPEXP_FWD_XRC
- #define WXDLLIMPEXP_FWD_AUI
- #define WXDLLIMPEXP_FWD_RICHTEXT
- #define WXDLLIMPEXP_FWD_MEDIA
- #define WXDLLIMPEXP_FWD_STC
-#else
- #define WXDLLIMPEXP_FWD_BASE WXDLLIMPEXP_BASE
- #define WXDLLIMPEXP_FWD_NET WXDLLIMPEXP_NET
- #define WXDLLIMPEXP_FWD_CORE WXDLLIMPEXP_CORE
- #define WXDLLIMPEXP_FWD_ADV WXDLLIMPEXP_ADV
- #define WXDLLIMPEXP_FWD_QA WXDLLIMPEXP_QA
- #define WXDLLIMPEXP_FWD_HTML WXDLLIMPEXP_HTML
- #define WXDLLIMPEXP_FWD_GL WXDLLIMPEXP_GL
- #define WXDLLIMPEXP_FWD_XML WXDLLIMPEXP_XML
- #define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC
- #define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI
- #define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT
- #define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA
- #define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC
-#endif
-
-#endif /* _WX_DLIMPEXP_H_ */
-
diff --git a/desmume/src/windows/wx/include/wx/dnd.h b/desmume/src/windows/wx/include/wx/dnd.h
deleted file mode 100644
index 2eab71e65..000000000
--- a/desmume/src/windows/wx/include/wx/dnd.h
+++ /dev/null
@@ -1,267 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/dnd.h
-// Purpose: Drag and drop classes declarations
-// Author: Vadim Zeitlin, Robert Roebling
-// Modified by:
-// Created: 26.05.99
-// RCS-ID: $Id: dnd.h 43636 2006-11-25 14:08:27Z VZ $
-// Copyright: (c) wxWidgets Team
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DND_H_BASE_
-#define _WX_DND_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_DRAG_AND_DROP
-
-#include "wx/dataobj.h"
-#include "wx/cursor.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// flags for wxDropSource::DoDragDrop()
-//
-// NB: wxDrag_CopyOnly must be 0 (== FALSE) and wxDrag_AllowMove must be 1
-// (== TRUE) for compatibility with the old DoDragDrop(bool) method!
-enum
-{
- wxDrag_CopyOnly = 0, // allow only copying
- wxDrag_AllowMove = 1, // allow moving (copying is always allowed)
- wxDrag_DefaultMove = 3 // the default operation is move, not copy
-};
-
-// result of wxDropSource::DoDragDrop() call
-enum wxDragResult
-{
- wxDragError, // error prevented the d&d operation from completing
- wxDragNone, // drag target didn't accept the data
- wxDragCopy, // the data was successfully copied
- wxDragMove, // the data was successfully moved (MSW only)
- wxDragLink, // operation is a drag-link
- wxDragCancel // the operation was cancelled by user (not an error)
-};
-
-// return true if res indicates that something was done during a dnd operation,
-// i.e. is neither error nor none nor cancel
-WXDLLEXPORT bool wxIsDragResultOk(wxDragResult res);
-
-// ----------------------------------------------------------------------------
-// wxDropSource is the object you need to create (and call DoDragDrop on it)
-// to initiate a drag-and-drop operation
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDropSourceBase
-{
-public:
- wxDropSourceBase(const wxCursor &cursorCopy = wxNullCursor,
- const wxCursor &cursorMove = wxNullCursor,
- const wxCursor &cursorStop = wxNullCursor)
- : m_cursorCopy(cursorCopy),
- m_cursorMove(cursorMove),
- m_cursorStop(cursorStop)
- { m_data = (wxDataObject *)NULL; }
- virtual ~wxDropSourceBase() { }
-
- // set the data which is transfered by drag and drop
- void SetData(wxDataObject& data)
- { m_data = &data; }
-
- wxDataObject *GetDataObject()
- { return m_data; }
-
- // set the icon corresponding to given drag result
- void SetCursor(wxDragResult res, const wxCursor& cursor)
- {
- if ( res == wxDragCopy )
- m_cursorCopy = cursor;
- else if ( res == wxDragMove )
- m_cursorMove = cursor;
- else
- m_cursorStop = cursor;
- }
-
- // start drag action, see enum wxDragResult for return value description
- //
- // if flags contains wxDrag_AllowMove, moving (and only copying) data is
- // allowed, if it contains wxDrag_DefaultMove (which includes the previous
- // flag), it is even the default operation
- virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly) = 0;
-
- // override to give feedback depending on the current operation result
- // "effect" and return true if you did something, false to let the library
- // give the default feedback
- virtual bool GiveFeedback(wxDragResult WXUNUSED(effect)) { return false; }
-
-protected:
- const wxCursor& GetCursor(wxDragResult res) const
- {
- if ( res == wxDragCopy )
- return m_cursorCopy;
- else if ( res == wxDragMove )
- return m_cursorMove;
- else
- return m_cursorStop;
- }
-
- // the data we're dragging
- wxDataObject *m_data;
-
- // the cursors to use for feedback
- wxCursor m_cursorCopy,
- m_cursorMove,
- m_cursorStop;
-
- DECLARE_NO_COPY_CLASS(wxDropSourceBase)
-};
-
-// ----------------------------------------------------------------------------
-// wxDropTarget should be associated with a window if it wants to be able to
-// receive data via drag and drop.
-//
-// To use this class, you should derive from wxDropTarget and implement
-// OnData() pure virtual method. You may also wish to override OnDrop() if you
-// want to accept the data only inside some region of the window (this may
-// avoid having to copy the data to this application which happens only when
-// OnData() is called)
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDropTargetBase
-{
-public:
- // ctor takes a pointer to heap-allocated wxDataObject which will be owned
- // by wxDropTarget and deleted by it automatically. If you don't give it
- // here, you can use SetDataObject() later.
- wxDropTargetBase(wxDataObject *dataObject = (wxDataObject*)NULL)
- { m_dataObject = dataObject; m_defaultAction = wxDragNone; }
- // dtor deletes our data object
- virtual ~wxDropTargetBase()
- { delete m_dataObject; }
-
- // get/set the associated wxDataObject
- wxDataObject *GetDataObject() const
- { return m_dataObject; }
- void SetDataObject(wxDataObject *dataObject)
- { if (m_dataObject) delete m_dataObject;
- m_dataObject = dataObject; }
-
- // these functions are called when data is moved over position (x, y) and
- // may return either wxDragCopy, wxDragMove or wxDragNone depending on
- // what would happen if the data were dropped here.
- //
- // the last parameter is what would happen by default and is determined by
- // the platform-specific logic (for example, under Windows it's wxDragCopy
- // if Ctrl key is pressed and wxDragMove otherwise) except that it will
- // always be wxDragNone if the carried data is in an unsupported format.
-
- // called when the mouse enters the window (only once until OnLeave())
- virtual wxDragResult OnEnter(wxCoord x, wxCoord y, wxDragResult def)
- { return OnDragOver(x, y, def); }
-
- // called when the mouse moves in the window - shouldn't take long to
- // execute or otherwise mouse movement would be too slow
- virtual wxDragResult OnDragOver(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
- wxDragResult def)
- { return def; }
-
- // called when mouse leaves the window: might be used to remove the
- // feedback which was given in OnEnter()
- virtual void OnLeave() { }
-
- // this function is called when data is dropped at position (x, y) - if it
- // returns true, OnData() will be called immediately afterwards which will
- // allow to retrieve the data dropped.
- virtual bool OnDrop(wxCoord x, wxCoord y) = 0;
-
- // called after OnDrop() returns TRUE: you will usually just call
- // GetData() from here and, probably, also refresh something to update the
- // new data and, finally, return the code indicating how did the operation
- // complete (returning default value in case of success and wxDragError on
- // failure is usually ok)
- virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def) = 0;
-
- // may be called *only* from inside OnData() and will fill m_dataObject
- // with the data from the drop source if it returns true
- virtual bool GetData() = 0;
-
- // sets the default action for drag and drop:
- // use wxDragMove or wxDragCopy to set deafult action to move or copy
- // and use wxDragNone (default) to set default action specified by
- // initialization of draging (see wxDropSourceBase::DoDragDrop())
- void SetDefaultAction(wxDragResult action)
- { m_defaultAction = action; }
-
- // returns default action for drag and drop or
- // wxDragNone if this not specified
- wxDragResult GetDefaultAction()
- { return m_defaultAction; }
-
-protected:
- wxDataObject *m_dataObject;
- wxDragResult m_defaultAction;
-
- DECLARE_NO_COPY_CLASS(wxDropTargetBase)
-};
-
-// ----------------------------------------------------------------------------
-// include platform dependent class declarations
-// ----------------------------------------------------------------------------
-
-#if defined(__WXMSW__)
- #include "wx/msw/ole/dropsrc.h"
- #include "wx/msw/ole/droptgt.h"
-#elif defined(__WXMOTIF__)
- #include "wx/motif/dnd.h"
-#elif defined(__WXX11__)
- #include "wx/x11/dnd.h"
-#elif defined(__WXGTK20__)
- #include "wx/gtk/dnd.h"
-#elif defined(__WXGTK__)
- #include "wx/gtk1/dnd.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/dnd.h"
-#elif defined(__WXPM__)
- #include "wx/os2/dnd.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// standard wxDropTarget implementations (implemented in common/dobjcmn.cpp)
-// ----------------------------------------------------------------------------
-
-// A simple wxDropTarget derived class for text data: you only need to
-// override OnDropText() to get something working
-class WXDLLEXPORT wxTextDropTarget : public wxDropTarget
-{
-public:
- wxTextDropTarget();
-
- virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& text) = 0;
-
- virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
-
-private:
- DECLARE_NO_COPY_CLASS(wxTextDropTarget)
-};
-
-// A drop target which accepts files (dragged from File Manager or Explorer)
-class WXDLLEXPORT wxFileDropTarget : public wxDropTarget
-{
-public:
- wxFileDropTarget();
-
- // parameters are the number of files and the array of file names
- virtual bool OnDropFiles(wxCoord x, wxCoord y,
- const wxArrayString& filenames) = 0;
-
- virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def);
-
-private:
- DECLARE_NO_COPY_CLASS(wxFileDropTarget)
-};
-
-#endif // wxUSE_DRAG_AND_DROP
-
-#endif // _WX_DND_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/docmdi.h b/desmume/src/windows/wx/include/wx/docmdi.h
deleted file mode 100644
index c8ab803c1..000000000
--- a/desmume/src/windows/wx/include/wx/docmdi.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: docmdi.h
-// Purpose: Frame classes for MDI document/view applications
-// Author: Julian Smart
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: docmdi.h 41020 2006-09-05 20:47:48Z VZ $
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DOCMDI_H_
-#define _WX_DOCMDI_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_MDI_ARCHITECTURE
-
-#include "wx/docview.h"
-#include "wx/mdi.h"
-
-/*
- * Use this instead of wxMDIParentFrame
- */
-
-class WXDLLEXPORT wxDocMDIParentFrame: public wxMDIParentFrame
-{
-public:
- wxDocMDIParentFrame();
- wxDocMDIParentFrame(wxDocManager *manager, wxFrame *parent, wxWindowID id,
- const wxString& title, const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
-
- bool Create(wxDocManager *manager, wxFrame *parent, wxWindowID id,
- const wxString& title, const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
-
- // Extend event processing to search the document manager's event table
- virtual bool ProcessEvent(wxEvent& event);
-
- wxDocManager *GetDocumentManager(void) const { return m_docManager; }
-
- void OnExit(wxCommandEvent& event);
- void OnMRUFile(wxCommandEvent& event);
- void OnCloseWindow(wxCloseEvent& event);
-
-protected:
- void Init();
- wxDocManager *m_docManager;
-
-private:
- DECLARE_CLASS(wxDocMDIParentFrame)
- DECLARE_EVENT_TABLE()
- DECLARE_NO_COPY_CLASS(wxDocMDIParentFrame)
-};
-
-/*
- * Use this instead of wxMDIChildFrame
- */
-
-class WXDLLEXPORT wxDocMDIChildFrame: public wxMDIChildFrame
-{
-public:
- wxDocMDIChildFrame();
- wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParentFrame *frame, wxWindowID id,
- const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
- long type = wxDEFAULT_FRAME_STYLE, const wxString& name = wxT("frame"));
- virtual ~wxDocMDIChildFrame();
-
- bool Create(wxDocument *doc,
- wxView *view,
- wxMDIParentFrame *frame,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long type = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
-
- // Extend event processing to search the view's event table
- virtual bool ProcessEvent(wxEvent& event);
-
- void OnActivate(wxActivateEvent& event);
- void OnCloseWindow(wxCloseEvent& event);
-
- inline wxDocument *GetDocument() const { return m_childDocument; }
- inline wxView *GetView(void) const { return m_childView; }
- inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
- inline void SetView(wxView *view) { m_childView = view; }
- bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
-
-protected:
- void Init();
- wxDocument* m_childDocument;
- wxView* m_childView;
-
-private:
- DECLARE_EVENT_TABLE()
- DECLARE_CLASS(wxDocMDIChildFrame)
- DECLARE_NO_COPY_CLASS(wxDocMDIChildFrame)
-};
-
-#endif
- // wxUSE_MDI_ARCHITECTURE
-
-#endif
- // _WX_DOCMDI_H_
diff --git a/desmume/src/windows/wx/include/wx/docview.h b/desmume/src/windows/wx/include/wx/docview.h
deleted file mode 100644
index 60ed15907..000000000
--- a/desmume/src/windows/wx/include/wx/docview.h
+++ /dev/null
@@ -1,675 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/docview.h
-// Purpose: Doc/View classes
-// Author: Julian Smart
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: docview.h 53546 2008-05-10 21:02:36Z VZ $
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DOCH__
-#define _WX_DOCH__
-
-#include "wx/defs.h"
-
-#if wxUSE_DOC_VIEW_ARCHITECTURE
-
-#include "wx/list.h"
-#include "wx/string.h"
-#include "wx/frame.h"
-
-#if wxUSE_PRINTING_ARCHITECTURE
- #include "wx/print.h"
-#endif
-
-class WXDLLIMPEXP_FWD_CORE wxWindow;
-class WXDLLIMPEXP_FWD_CORE wxDocument;
-class WXDLLIMPEXP_FWD_CORE wxView;
-class WXDLLIMPEXP_FWD_CORE wxDocTemplate;
-class WXDLLIMPEXP_FWD_CORE wxDocManager;
-class WXDLLIMPEXP_FWD_CORE wxPrintInfo;
-class WXDLLIMPEXP_FWD_CORE wxCommandProcessor;
-class WXDLLIMPEXP_FWD_CORE wxFileHistory;
-class WXDLLIMPEXP_FWD_BASE wxConfigBase;
-
-#if wxUSE_STD_IOSTREAM
- #include "wx/iosfwrap.h"
-#else
- #include "wx/stream.h"
-#endif
-
-// Document manager flags
-enum
-{
- wxDOC_SDI = 1,
- wxDOC_MDI,
- wxDOC_NEW,
- wxDOC_SILENT,
- wxDEFAULT_DOCMAN_FLAGS = wxDOC_SDI
-};
-
-// Document template flags
-enum
-{
- wxTEMPLATE_VISIBLE = 1,
- wxTEMPLATE_INVISIBLE,
- wxDEFAULT_TEMPLATE_FLAGS = wxTEMPLATE_VISIBLE
-};
-
-#define wxMAX_FILE_HISTORY 9
-
-class WXDLLEXPORT wxDocument : public wxEvtHandler
-{
-public:
- wxDocument(wxDocument *parent = (wxDocument *) NULL);
- virtual ~wxDocument();
-
- // accessors
- void SetFilename(const wxString& filename, bool notifyViews = false);
- wxString GetFilename() const { return m_documentFile; }
-
- void SetTitle(const wxString& title) { m_documentTitle = title; }
- wxString GetTitle() const { return m_documentTitle; }
-
- void SetDocumentName(const wxString& name) { m_documentTypeName = name; }
- wxString GetDocumentName() const { return m_documentTypeName; }
-
- bool GetDocumentSaved() const { return m_savedYet; }
- void SetDocumentSaved(bool saved = true) { m_savedYet = saved; }
-
- virtual bool Close();
- virtual bool Save();
- virtual bool SaveAs();
- virtual bool Revert();
-
-#if wxUSE_STD_IOSTREAM
- virtual wxSTD ostream& SaveObject(wxSTD ostream& stream);
- virtual wxSTD istream& LoadObject(wxSTD istream& stream);
-#else
- virtual wxOutputStream& SaveObject(wxOutputStream& stream);
- virtual wxInputStream& LoadObject(wxInputStream& stream);
-#endif
-
- // Called by wxWidgets
- virtual bool OnSaveDocument(const wxString& filename);
- virtual bool OnOpenDocument(const wxString& filename);
- virtual bool OnNewDocument();
- virtual bool OnCloseDocument();
-
- // Prompts for saving if about to close a modified document. Returns true
- // if ok to close the document (may have saved in the meantime, or set
- // modified to false)
- virtual bool OnSaveModified();
-
- // Called by framework if created automatically by the default document
- // manager: gives document a chance to initialise and (usually) create a
- // view
- virtual bool OnCreate(const wxString& path, long flags);
-
- // By default, creates a base wxCommandProcessor.
- virtual wxCommandProcessor *OnCreateCommandProcessor();
- virtual wxCommandProcessor *GetCommandProcessor() const { return m_commandProcessor; }
- virtual void SetCommandProcessor(wxCommandProcessor *proc) { m_commandProcessor = proc; }
-
- // Called after a view is added or removed. The default implementation
- // deletes the document if this is there are no more views.
- virtual void OnChangedViewList();
-
- virtual bool DeleteContents();
-
- virtual bool Draw(wxDC&);
- virtual bool IsModified() const { return m_documentModified; }
- virtual void Modify(bool mod) { m_documentModified = mod; }
-
- virtual bool AddView(wxView *view);
- virtual bool RemoveView(wxView *view);
- wxList& GetViews() { return m_documentViews; }
- const wxList& GetViews() const { return m_documentViews; }
- wxView *GetFirstView() const;
-
- virtual void UpdateAllViews(wxView *sender = (wxView *) NULL, wxObject *hint = (wxObject *) NULL);
- virtual void NotifyClosing();
-
- // Remove all views (because we're closing the document)
- virtual bool DeleteAllViews();
-
- // Other stuff
- virtual wxDocManager *GetDocumentManager() const;
- virtual wxDocTemplate *GetDocumentTemplate() const { return m_documentTemplate; }
- virtual void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; }
-
- // Get title, or filename if no title, else [unnamed]
- //
- // NB: this method will be deprecated in wxWidgets 3.0, you still need to
- // override it if you need to modify the existing behaviour in this
- // version but use GetUserReadableName() below if you just need to call
- // it
- virtual bool GetPrintableName(wxString& buf) const;
-
-#if wxABI_VERSION >= 20805
- wxString GetUserReadableName() const
- {
- wxString s;
- GetPrintableName(s);
- return s;
- }
-#endif // wxABI 2.8.5+
-
- // Returns a window that can be used as a parent for document-related
- // dialogs. Override if necessary.
- virtual wxWindow *GetDocumentWindow() const;
-
-protected:
- wxList m_documentViews;
- wxString m_documentFile;
- wxString m_documentTitle;
- wxString m_documentTypeName;
- wxDocTemplate* m_documentTemplate;
- bool m_documentModified;
- wxDocument* m_documentParent;
- wxCommandProcessor* m_commandProcessor;
- bool m_savedYet;
-
- // Called by OnSaveDocument and OnOpenDocument to implement standard
- // Save/Load behavior. Re-implement in derived class for custom
- // behavior.
- virtual bool DoSaveDocument(const wxString& file);
- virtual bool DoOpenDocument(const wxString& file);
-
-private:
- DECLARE_ABSTRACT_CLASS(wxDocument)
- DECLARE_NO_COPY_CLASS(wxDocument)
-};
-
-class WXDLLEXPORT wxView: public wxEvtHandler
-{
-public:
- // wxView(wxDocument *doc = (wxDocument *) NULL);
- wxView();
- virtual ~wxView();
-
- wxDocument *GetDocument() const { return m_viewDocument; }
- virtual void SetDocument(wxDocument *doc);
-
- wxString GetViewName() const { return m_viewTypeName; }
- void SetViewName(const wxString& name) { m_viewTypeName = name; }
-
- wxWindow *GetFrame() const { return m_viewFrame ; }
- void SetFrame(wxWindow *frame) { m_viewFrame = frame; }
-
- virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView);
- virtual void OnDraw(wxDC *dc) = 0;
- virtual void OnPrint(wxDC *dc, wxObject *info);
- virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL);
- virtual void OnClosingDocument() {}
- virtual void OnChangeFilename();
-
- // Called by framework if created automatically by the default document
- // manager class: gives view a chance to initialise
- virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) { return true; }
-
- // Checks if the view is the last one for the document; if so, asks user
- // to confirm save data (if modified). If ok, deletes itself and returns
- // true.
- virtual bool Close(bool deleteWindow = true);
-
- // Override to do cleanup/veto close
- virtual bool OnClose(bool deleteWindow);
-
- // Extend event processing to search the document's event table
- virtual bool ProcessEvent(wxEvent& event);
-
- // A view's window can call this to notify the view it is (in)active.
- // The function then notifies the document manager.
- virtual void Activate(bool activate);
-
- wxDocManager *GetDocumentManager() const
- { return m_viewDocument->GetDocumentManager(); }
-
-#if wxUSE_PRINTING_ARCHITECTURE
- virtual wxPrintout *OnCreatePrintout();
-#endif
-
-protected:
- wxDocument* m_viewDocument;
- wxString m_viewTypeName;
- wxWindow* m_viewFrame;
-
-private:
- DECLARE_ABSTRACT_CLASS(wxView)
- DECLARE_NO_COPY_CLASS(wxView)
-};
-
-// Represents user interface (and other) properties of documents and views
-class WXDLLEXPORT wxDocTemplate: public wxObject
-{
-
-friend class WXDLLIMPEXP_FWD_CORE wxDocManager;
-
-public:
- // Associate document and view types. They're for identifying what view is
- // associated with what template/document type
- wxDocTemplate(wxDocManager *manager,
- const wxString& descr,
- const wxString& filter,
- const wxString& dir,
- const wxString& ext,
- const wxString& docTypeName,
- const wxString& viewTypeName,
- wxClassInfo *docClassInfo = (wxClassInfo *) NULL,
- wxClassInfo *viewClassInfo = (wxClassInfo *)NULL,
- long flags = wxDEFAULT_TEMPLATE_FLAGS);
-
- virtual ~wxDocTemplate();
-
- // By default, these two member functions dynamically creates document and
- // view using dynamic instance construction. Override these if you need a
- // different method of construction.
- virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
- virtual wxView *CreateView(wxDocument *doc, long flags = 0);
-
- // Helper method for CreateDocument; also allows you to do your own document
- // creation
- virtual bool InitDocument(wxDocument* doc, const wxString& path, long flags = 0);
-
- wxString GetDefaultExtension() const { return m_defaultExt; }
- wxString GetDescription() const { return m_description; }
- wxString GetDirectory() const { return m_directory; }
- wxDocManager *GetDocumentManager() const { return m_documentManager; }
- void SetDocumentManager(wxDocManager *manager) { m_documentManager = manager; }
- wxString GetFileFilter() const { return m_fileFilter; }
- long GetFlags() const { return m_flags; }
- virtual wxString GetViewName() const { return m_viewTypeName; }
- virtual wxString GetDocumentName() const { return m_docTypeName; }
-
- void SetFileFilter(const wxString& filter) { m_fileFilter = filter; }
- void SetDirectory(const wxString& dir) { m_directory = dir; }
- void SetDescription(const wxString& descr) { m_description = descr; }
- void SetDefaultExtension(const wxString& ext) { m_defaultExt = ext; }
- void SetFlags(long flags) { m_flags = flags; }
-
- bool IsVisible() const { return ((m_flags & wxTEMPLATE_VISIBLE) == wxTEMPLATE_VISIBLE); }
-
- wxClassInfo* GetDocClassInfo() const { return m_docClassInfo; }
- wxClassInfo* GetViewClassInfo() const { return m_viewClassInfo; }
-
- virtual bool FileMatchesTemplate(const wxString& path);
-
-protected:
- long m_flags;
- wxString m_fileFilter;
- wxString m_directory;
- wxString m_description;
- wxString m_defaultExt;
- wxString m_docTypeName;
- wxString m_viewTypeName;
- wxDocManager* m_documentManager;
-
- // For dynamic creation of appropriate instances.
- wxClassInfo* m_docClassInfo;
- wxClassInfo* m_viewClassInfo;
-
- // Called by CreateDocument and CreateView to create the actual document/view object.
- // By default uses the ClassInfo provided to the constructor. Override these functions
- // to provide a different method of creation.
- virtual wxDocument *DoCreateDocument();
- virtual wxView *DoCreateView();
-
-private:
- DECLARE_CLASS(wxDocTemplate)
- DECLARE_NO_COPY_CLASS(wxDocTemplate)
-};
-
-// One object of this class may be created in an application, to manage all
-// the templates and documents.
-class WXDLLEXPORT wxDocManager: public wxEvtHandler
-{
-public:
- wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true);
- virtual ~wxDocManager();
-
- virtual bool Initialize();
-
- // Handlers for common user commands
- void OnFileClose(wxCommandEvent& event);
- void OnFileCloseAll(wxCommandEvent& event);
- void OnFileNew(wxCommandEvent& event);
- void OnFileOpen(wxCommandEvent& event);
- void OnFileRevert(wxCommandEvent& event);
- void OnFileSave(wxCommandEvent& event);
- void OnFileSaveAs(wxCommandEvent& event);
- void OnPrint(wxCommandEvent& event);
- void OnPreview(wxCommandEvent& event);
- void OnUndo(wxCommandEvent& event);
- void OnRedo(wxCommandEvent& event);
-
- // Handlers for UI update commands
- void OnUpdateFileOpen(wxUpdateUIEvent& event);
- void OnUpdateFileClose(wxUpdateUIEvent& event);
- void OnUpdateFileRevert(wxUpdateUIEvent& event);
- void OnUpdateFileNew(wxUpdateUIEvent& event);
- void OnUpdateFileSave(wxUpdateUIEvent& event);
- void OnUpdateFileSaveAs(wxUpdateUIEvent& event);
- void OnUpdateUndo(wxUpdateUIEvent& event);
- void OnUpdateRedo(wxUpdateUIEvent& event);
-
- void OnUpdatePrint(wxUpdateUIEvent& event);
- void OnUpdatePreview(wxUpdateUIEvent& event);
-
- // Extend event processing to search the view's event table
- virtual bool ProcessEvent(wxEvent& event);
-
- // called when file format detection didn't work, can be overridden to do
- // something in this case
- virtual void OnOpenFileFailure() { }
-
- virtual wxDocument *CreateDocument(const wxString& path, long flags = 0);
- virtual wxView *CreateView(wxDocument *doc, long flags = 0);
- virtual void DeleteTemplate(wxDocTemplate *temp, long flags = 0);
- virtual bool FlushDoc(wxDocument *doc);
- virtual wxDocTemplate *MatchTemplate(const wxString& path);
- virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates,
- int noTemplates, wxString& path, long flags, bool save = false);
- virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates,
- int noTemplates, bool sort = false);
- virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates,
- int noTemplates, bool sort = false);
- virtual wxDocTemplate *FindTemplateForPath(const wxString& path);
-
- void AssociateTemplate(wxDocTemplate *temp);
- void DisassociateTemplate(wxDocTemplate *temp);
-
- wxDocument *GetCurrentDocument() const;
-
- void SetMaxDocsOpen(int n) { m_maxDocsOpen = n; }
- int GetMaxDocsOpen() const { return m_maxDocsOpen; }
-
- // Add and remove a document from the manager's list
- void AddDocument(wxDocument *doc);
- void RemoveDocument(wxDocument *doc);
-
- // closes all currently open documents
- bool CloseDocuments(bool force = true);
-
- // closes the specified document
- bool CloseDocument(wxDocument* doc, bool force = false);
-
- // Clear remaining documents and templates
- bool Clear(bool force = true);
-
- // Views or windows should inform the document manager
- // when a view is going in or out of focus
- virtual void ActivateView(wxView *view, bool activate = true);
- virtual wxView *GetCurrentView() const;
-
- wxList& GetDocuments() { return m_docs; }
- wxList& GetTemplates() { return m_templates; }
-
- // Make a default document name
- //
- // NB: this method is renamed to MakeNewDocumentName() in wx 3.0, you still
- // need to override it if your code needs to customize the default name
- // generation but if you just use it from your code, prefer the version
- // below which is forward-compatible with wx 3.0
- virtual bool MakeDefaultName(wxString& buf);
-
-#if wxABI_VERSION >= 20808
- wxString MakeNewDocumentName() const
- {
- wxString s;
- wx_const_cast(wxDocManager *, this)->MakeDefaultName(s);
- return s;
- }
-#endif // wx ABI >= 2.8.8
-
- // Make a frame title (override this to do something different)
- virtual wxString MakeFrameTitle(wxDocument* doc);
-
- virtual wxFileHistory *OnCreateFileHistory();
- virtual wxFileHistory *GetFileHistory() const { return m_fileHistory; }
-
- // File history management
- virtual void AddFileToHistory(const wxString& file);
- virtual void RemoveFileFromHistory(size_t i);
- virtual size_t GetHistoryFilesCount() const;
- virtual wxString GetHistoryFile(size_t i) const;
- virtual void FileHistoryUseMenu(wxMenu *menu);
- virtual void FileHistoryRemoveMenu(wxMenu *menu);
-#if wxUSE_CONFIG
- virtual void FileHistoryLoad(wxConfigBase& config);
- virtual void FileHistorySave(wxConfigBase& config);
-#endif // wxUSE_CONFIG
-
- virtual void FileHistoryAddFilesToMenu();
- virtual void FileHistoryAddFilesToMenu(wxMenu* menu);
-
- wxString GetLastDirectory() const { return m_lastDirectory; }
- void SetLastDirectory(const wxString& dir) { m_lastDirectory = dir; }
-
- // Get the current document manager
- static wxDocManager* GetDocumentManager() { return sm_docManager; }
-
-#if WXWIN_COMPATIBILITY_2_6
- // deprecated, use GetHistoryFilesCount() instead
- wxDEPRECATED( size_t GetNoHistoryFiles() const );
-#endif // WXWIN_COMPATIBILITY_2_6
-
-protected:
- long m_flags;
- int m_defaultDocumentNameCounter;
- int m_maxDocsOpen;
- wxList m_docs;
- wxList m_templates;
- wxView* m_currentView;
- wxFileHistory* m_fileHistory;
- wxString m_lastDirectory;
- static wxDocManager* sm_docManager;
-
- DECLARE_EVENT_TABLE()
- DECLARE_DYNAMIC_CLASS(wxDocManager)
- DECLARE_NO_COPY_CLASS(wxDocManager)
-};
-
-#if WXWIN_COMPATIBILITY_2_6
-inline size_t wxDocManager::GetNoHistoryFiles() const
-{
- return GetHistoryFilesCount();
-}
-#endif // WXWIN_COMPATIBILITY_2_6
-
-// ----------------------------------------------------------------------------
-// A default child frame
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDocChildFrame : public wxFrame
-{
-public:
- wxDocChildFrame(wxDocument *doc,
- wxView *view,
- wxFrame *frame,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long type = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxT("frame"));
- virtual ~wxDocChildFrame(){}
-
- // Extend event processing to search the view's event table
- virtual bool ProcessEvent(wxEvent& event);
-
- void OnActivate(wxActivateEvent& event);
- void OnCloseWindow(wxCloseEvent& event);
-
- wxDocument *GetDocument() const { return m_childDocument; }
- wxView *GetView() const { return m_childView; }
- void SetDocument(wxDocument *doc) { m_childDocument = doc; }
- void SetView(wxView *view) { m_childView = view; }
- bool Destroy() { m_childView = (wxView *)NULL; return wxFrame::Destroy(); }
-
-protected:
- wxDocument* m_childDocument;
- wxView* m_childView;
-
-private:
- DECLARE_CLASS(wxDocChildFrame)
- DECLARE_EVENT_TABLE()
- DECLARE_NO_COPY_CLASS(wxDocChildFrame)
-};
-
-// ----------------------------------------------------------------------------
-// A default parent frame
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxDocParentFrame : public wxFrame
-{
-public:
- wxDocParentFrame();
- wxDocParentFrame(wxDocManager *manager,
- wxFrame *frame,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
-
- bool Create(wxDocManager *manager,
- wxFrame *frame,
- wxWindowID id,
- const wxString& title,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDEFAULT_FRAME_STYLE,
- const wxString& name = wxFrameNameStr);
-
- // Extend event processing to search the document manager's event table
- virtual bool ProcessEvent(wxEvent& event);
-
- wxDocManager *GetDocumentManager() const { return m_docManager; }
-
- void OnExit(wxCommandEvent& event);
- void OnMRUFile(wxCommandEvent& event);
- void OnCloseWindow(wxCloseEvent& event);
-
-protected:
- wxDocManager *m_docManager;
-
-private:
- typedef wxFrame base_type;
- DECLARE_CLASS(wxDocParentFrame)
- DECLARE_EVENT_TABLE()
- DECLARE_NO_COPY_CLASS(wxDocParentFrame)
-};
-
-// ----------------------------------------------------------------------------
-// Provide simple default printing facilities
-// ----------------------------------------------------------------------------
-
-#if wxUSE_PRINTING_ARCHITECTURE
-class WXDLLEXPORT wxDocPrintout : public wxPrintout
-{
-public:
- wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = wxT("Printout"));
- bool OnPrintPage(int page);
- bool HasPage(int page);
- bool OnBeginDocument(int startPage, int endPage);
- void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
-
- virtual wxView *GetView() { return m_printoutView; }
-
-protected:
- wxView* m_printoutView;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxDocPrintout)
- DECLARE_NO_COPY_CLASS(wxDocPrintout)
-};
-#endif // wxUSE_PRINTING_ARCHITECTURE
-
-// ----------------------------------------------------------------------------
-// File history management
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFileHistory : public wxObject
-{
-public:
- wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
- virtual ~wxFileHistory();
-
- // Operations
- virtual void AddFileToHistory(const wxString& file);
- virtual void RemoveFileFromHistory(size_t i);
- virtual int GetMaxFiles() const { return (int)m_fileMaxFiles; }
- virtual void UseMenu(wxMenu *menu);
-
- // Remove menu from the list (MDI child may be closing)
- virtual void RemoveMenu(wxMenu *menu);
-
-#if wxUSE_CONFIG
- virtual void Load(wxConfigBase& config);
- virtual void Save(wxConfigBase& config);
-#endif // wxUSE_CONFIG
-
- virtual void AddFilesToMenu();
- virtual void AddFilesToMenu(wxMenu* menu); // Single menu
-
- // Accessors
- virtual wxString GetHistoryFile(size_t i) const;
- virtual size_t GetCount() const { return m_fileHistoryN; }
-
- const wxList& GetMenus() const { return m_fileMenus; }
-
-#if wxABI_VERSION >= 20802
- // Set/get base id
- void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
- wxWindowID GetBaseId() const { return m_idBase; }
-#endif // wxABI 2.8.2+
-
-#if WXWIN_COMPATIBILITY_2_6
- // deprecated, use GetCount() instead
- wxDEPRECATED( size_t GetNoHistoryFiles() const );
-#endif // WXWIN_COMPATIBILITY_2_6
-
-protected:
- // Last n files
- wxChar** m_fileHistory;
- // Number of files saved
- size_t m_fileHistoryN;
- // Menus to maintain (may need several for an MDI app)
- wxList m_fileMenus;
- // Max files to maintain
- size_t m_fileMaxFiles;
-
-private:
- // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
- wxWindowID m_idBase;
-
- DECLARE_DYNAMIC_CLASS(wxFileHistory)
- DECLARE_NO_COPY_CLASS(wxFileHistory)
-};
-
-#if WXWIN_COMPATIBILITY_2_6
-inline size_t wxFileHistory::GetNoHistoryFiles() const
-{
- return m_fileHistoryN;
-}
-#endif // WXWIN_COMPATIBILITY_2_6
-
-#if wxUSE_STD_IOSTREAM
-// For compatibility with existing file formats:
-// converts from/to a stream to/from a temporary file.
-bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxSTD ostream& stream);
-bool WXDLLEXPORT wxTransferStreamToFile(wxSTD istream& stream, const wxString& filename);
-#else
-// For compatibility with existing file formats:
-// converts from/to a stream to/from a temporary file.
-bool WXDLLEXPORT wxTransferFileToStream(const wxString& filename, wxOutputStream& stream);
-bool WXDLLEXPORT wxTransferStreamToFile(wxInputStream& stream, const wxString& filename);
-#endif // wxUSE_STD_IOSTREAM
-
-#endif // wxUSE_DOC_VIEW_ARCHITECTURE
-
-#endif // _WX_DOCH__
diff --git a/desmume/src/windows/wx/include/wx/dragimag.h b/desmume/src/windows/wx/include/wx/dragimag.h
deleted file mode 100644
index 279cd5683..000000000
--- a/desmume/src/windows/wx/include/wx/dragimag.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dragimag.h
-// Purpose: wxDragImage base header
-// Author: Julian Smart
-// Modified by:
-// Created:
-// Copyright: (c) Julian Smart
-// RCS-ID: $Id: dragimag.h 33948 2005-05-04 18:57:50Z JS $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DRAGIMAG_H_BASE_
-#define _WX_DRAGIMAG_H_BASE_
-
-#if wxUSE_DRAGIMAGE
-
-class WXDLLEXPORT wxRect;
-class WXDLLEXPORT wxMemoryDC;
-class WXDLLEXPORT wxDC;
-
-#if defined(__WXMSW__)
-# if defined(__WXUNIVERSAL__)
-# include "wx/generic/dragimgg.h"
-# define wxDragImage wxGenericDragImage
-# else
-# include "wx/msw/dragimag.h"
-# endif
-
-#elif defined(__WXMOTIF__)
-# include "wx/generic/dragimgg.h"
-# define wxDragImage wxGenericDragImage
-
-#elif defined(__WXGTK__)
-# include "wx/generic/dragimgg.h"
-# define wxDragImage wxGenericDragImage
-
-#elif defined(__WXX11__)
-# include "wx/generic/dragimgg.h"
-# define wxDragImage wxGenericDragImage
-
-#elif defined(__WXMAC__)
-# include "wx/generic/dragimgg.h"
-# define wxDragImage wxGenericDragImage
-
-#elif defined(__WXPM__)
-# include "wx/generic/dragimgg.h"
-# define wxDragImage wxGenericDragImage
-
-#endif
-
-#endif // wxUSE_DRAGIMAGE
-
-#endif
- // _WX_DRAGIMAG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/dynarray.h b/desmume/src/windows/wx/include/wx/dynarray.h
deleted file mode 100644
index 5dfb8bf26..000000000
--- a/desmume/src/windows/wx/include/wx/dynarray.h
+++ /dev/null
@@ -1,1044 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/dynarray.h
-// Purpose: auto-resizable (i.e. dynamic) array support
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 12.09.97
-// RCS-ID: $Id: dynarray.h 45498 2007-04-16 13:03:05Z VZ $
-// Copyright: (c) 1998 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _DYNARRAY_H
-#define _DYNARRAY_H
-
-#include "wx/defs.h"
-
-#if wxUSE_STL
- #include "wx/beforestd.h"
- #include
- #include
- #include "wx/afterstd.h"
-#endif
-
-/*
- This header defines the dynamic arrays and object arrays (i.e. arrays which
- own their elements). Dynamic means that the arrays grow automatically as
- needed.
-
- These macros are ugly (especially if you look in the sources ;-), but they
- allow us to define "template" classes without actually using templates and so
- this works with all compilers (and may be also much faster to compile even
- with a compiler which does support templates). The arrays defined with these
- macros are type-safe.
-
- Range checking is performed in debug build for both arrays and objarrays but
- not in release build - so using an invalid index will just lead to a crash
- then.
-
- Note about memory usage: arrays never shrink automatically (although you may
- use Shrink() function explicitly), they only grow, so loading 10 millions in
- an array only to delete them 2 lines below might be a bad idea if the array
- object is not going to be destroyed soon. However, as it does free memory
- when destroyed, it is ok if the array is a local variable.
- */
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-/*
- The initial size by which an array grows when an element is added default
- value avoids allocate one or two bytes when the array is created which is
- rather inefficient
-*/
-#define WX_ARRAY_DEFAULT_INITIAL_SIZE (16)
-
-// ----------------------------------------------------------------------------
-// types
-// ----------------------------------------------------------------------------
-
-/*
- Callback compare function for quick sort.
-
- It must return negative value, 0 or positive value if the first item is
- less than, equal to or greater than the second one.
- */
-extern "C"
-{
-typedef int (wxCMPFUNC_CONV *CMPFUNC)(const void* pItem1, const void* pItem2);
-}
-
-// ----------------------------------------------------------------------------
-// Base class managing data having size of type 'long' (not used directly)
-//
-// NB: for efficiency this often used class has no virtual functions (hence no
-// virtual table), even dtor is *not* virtual. If used as expected it
-// won't create any problems because ARRAYs from DEFINE_ARRAY have no dtor
-// at all, so it's not too important if it's not called (this happens when
-// you cast "SomeArray *" as "BaseArray *" and then delete it)
-// ----------------------------------------------------------------------------
-
-#if wxUSE_STL
-
-template
-class WXDLLIMPEXP_BASE wxArray_SortFunction
-{
-public:
- typedef int (wxCMPFUNC_CONV *CMPFUNC)(T* pItem1, T* pItem2);
-
- wxArray_SortFunction(CMPFUNC f) : m_f(f) { }
- bool operator()(const T& i1, const T& i2)
- { return m_f((T*)&i1, (T*)&i2) < 0; }
-private:
- CMPFUNC m_f;
-};
-
-template
-class WXDLLIMPEXP_BASE wxSortedArray_SortFunction
-{
-public:
- typedef F CMPFUNC;
-
- wxSortedArray_SortFunction(CMPFUNC f) : m_f(f) { }
- bool operator()(const T& i1, const T& i2)
- { return m_f(i1, i2) < 0; }
-private:
- CMPFUNC m_f;
-};
-
-#define _WX_DECLARE_BASEARRAY(T, name, classexp) \
- typedef int (wxCMPFUNC_CONV *CMPFUN##name)(T pItem1, T pItem2); \
- typedef wxSortedArray_SortFunction name##_Predicate; \
- _WX_DECLARE_BASEARRAY_2(T, name, name##_Predicate, classexp)
-
-#define _WX_DECLARE_BASEARRAY_2(T, name, predicate, classexp) \
-classexp name : public std::vector \
-{ \
- typedef predicate Predicate; \
- typedef predicate::CMPFUNC SCMPFUNC; \
-public: \
- typedef wxArray_SortFunction::CMPFUNC CMPFUNC; \
-public: \
- void Empty() { clear(); } \
- void Clear() { clear(); } \
- void Alloc(size_t uiSize) { reserve(uiSize); } \
- void Shrink(); \
- \
- size_t GetCount() const { return size(); } \
- void SetCount(size_t n, T v = T()) { resize(n, v); } \
- bool IsEmpty() const { return empty(); } \
- size_t Count() const { return size(); } \
- \
- typedef T base_type; \
- \
-protected: \
- T& Item(size_t uiIndex) const \
- { wxASSERT( uiIndex < size() ); return (T&)operator[](uiIndex); } \
- \
- int Index(T e, bool bFromEnd = false) const; \
- int Index(T lItem, CMPFUNC fnCompare) const; \
- size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \
- void Add(T lItem, size_t nInsert = 1) \
- { insert(end(), nInsert, lItem); } \
- size_t Add(T lItem, CMPFUNC fnCompare); \
- void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
- { insert(begin() + uiIndex, nInsert, lItem); } \
- void Remove(T lItem); \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
- { erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
- \
- void Sort(CMPFUNC fCmp) \
- { \
- wxArray_SortFunction p(fCmp); \
- std::sort(begin(), end(), p); \
- } \
-}
-
-#else // if !wxUSE_STL
-
-#define _WX_DECLARE_BASEARRAY(T, name, classexp) \
-classexp name \
-{ \
- typedef CMPFUNC SCMPFUNC; /* for compatibility wuth wxUSE_STL */ \
-public: \
- name(); \
- name(const name& array); \
- name& operator=(const name& src); \
- ~name(); \
- \
- void Empty() { m_nCount = 0; } \
- void Clear(); \
- void Alloc(size_t n) { if ( n > m_nSize ) Realloc(n); } \
- void Shrink(); \
- \
- size_t GetCount() const { return m_nCount; } \
- void SetCount(size_t n, T defval = T()); \
- bool IsEmpty() const { return m_nCount == 0; } \
- size_t Count() const { return m_nCount; } \
- \
- typedef T base_type; \
- \
-protected: \
- T& Item(size_t uiIndex) const \
- { wxASSERT( uiIndex < m_nCount ); return m_pItems[uiIndex]; } \
- T& operator[](size_t uiIndex) const { return Item(uiIndex); } \
- \
- int Index(T lItem, bool bFromEnd = false) const; \
- int Index(T lItem, CMPFUNC fnCompare) const; \
- size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \
- void Add(T lItem, size_t nInsert = 1); \
- size_t Add(T lItem, CMPFUNC fnCompare); \
- void Insert(T lItem, size_t uiIndex, size_t nInsert = 1); \
- void Remove(T lItem); \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1); \
- \
- void Sort(CMPFUNC fnCompare); \
- \
- /* *minimal* STL-ish interface, for derived classes */ \
- typedef T value_type; \
- typedef value_type* iterator; \
- typedef const value_type* const_iterator; \
- typedef value_type& reference; \
- typedef const value_type& const_reference; \
- typedef int difference_type; \
- typedef size_t size_type; \
- \
- void assign(const_iterator first, const_iterator last); \
- void assign(size_type n, const_reference v); \
- size_type capacity() const { return m_nSize; } \
- iterator erase(iterator first, iterator last) \
- { \
- size_type idx = first - begin(); \
- RemoveAt(idx, last - first); \
- return begin() + idx; \
- } \
- iterator erase(iterator it) { return erase(it, it + 1); } \
- void insert(iterator it, size_type n, const value_type& v) \
- { Insert(v, it - begin(), n); } \
- iterator insert(iterator it, const value_type& v = value_type()) \
- { \
- size_type idx = it - begin(); \
- Insert(v, idx); \
- return begin() + idx; \
- } \
- void insert(iterator it, const_iterator first, const_iterator last);\
- void pop_back() { RemoveAt(size() - 1); } \
- void push_back(const value_type& v) { Add(v); } \
- void reserve(size_type n) { Alloc(n); } \
- void resize(size_type n, value_type v = value_type()) \
- { SetCount(n, v); } \
- \
- iterator begin() { return m_pItems; } \
- iterator end() { return m_pItems + m_nCount; } \
- const_iterator begin() const { return m_pItems; } \
- const_iterator end() const { return m_pItems + m_nCount; } \
- \
- /* the following functions may be made directly public because */ \
- /* they don't use the type of the elements at all */ \
-public: \
- void clear() { Clear(); } \
- bool empty() const { return IsEmpty(); } \
- size_type max_size() const { return INT_MAX; } \
- size_type size() const { return GetCount(); } \
- \
-private: \
- void Grow(size_t nIncrement = 0); \
- bool Realloc(size_t nSize); \
- \
- size_t m_nSize, \
- m_nCount; \
- \
- T *m_pItems; \
-}
-
-#endif // !wxUSE_STL
-
-// ============================================================================
-// The private helper macros containing the core of the array classes
-// ============================================================================
-
-// Implementation notes:
-//
-// JACS: Salford C++ doesn't like 'var->operator=' syntax, as in:
-// { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src);
-// so using a temporary variable instead.
-//
-// The classes need a (even trivial) ~name() to link under Mac X
-//
-// _WX_ERROR_REMOVE is needed to resolve the name conflict between the wxT()
-// macro and T typedef: we can't use wxT() inside WX_DEFINE_ARRAY!
-
-#define _WX_ERROR_REMOVE wxT("removing inexisting element in wxArray::Remove")
-
-// ----------------------------------------------------------------------------
-// _WX_DEFINE_TYPEARRAY: array for simple types
-// ----------------------------------------------------------------------------
-
-#if wxUSE_STL
-
-#define _WX_DEFINE_TYPEARRAY(T, name, base, classexp) \
-typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
-classexp name : public base \
-{ \
-public: \
- T& operator[](size_t uiIndex) const \
- { return (T&)(base::operator[](uiIndex)); } \
- T& Item(size_t uiIndex) const \
- { return (T&)/*const cast*/base::operator[](uiIndex); } \
- T& Last() const \
- { return Item(Count() - 1); } \
- \
- int Index(T e, bool bFromEnd = false) const \
- { return base::Index(e, bFromEnd); } \
- \
- void Add(T lItem, size_t nInsert = 1) \
- { insert(end(), nInsert, lItem); } \
- void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
- { insert(begin() + uiIndex, nInsert, lItem); } \
- \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
- { base::RemoveAt(uiIndex, nRemove); } \
- void Remove(T lItem) \
- { int iIndex = Index(lItem); \
- wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
- _WX_ERROR_REMOVE); \
- RemoveAt((size_t)iIndex); } \
- \
- void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \
-}
-
-#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
- _WX_DEFINE_TYPEARRAY(T, name, base, classexp)
-
-#else // if !wxUSE_STL
-
-// common declaration used by both _WX_DEFINE_TYPEARRAY and
-// _WX_DEFINE_TYPEARRAY_PTR
-#define _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, ptrop) \
-wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type), \
- TypeTooBigToBeStoredIn##base, \
- name); \
-typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \
-classexp name : public base \
-{ \
-public: \
- name() { } \
- ~name() { } \
- \
- name& operator=(const name& src) \
- { base* temp = (base*) this; \
- (*temp) = ((const base&)src); \
- return *this; } \
- \
- T& operator[](size_t uiIndex) const \
- { return (T&)(base::operator[](uiIndex)); } \
- T& Item(size_t uiIndex) const \
- { return (T&)(base::operator[](uiIndex)); } \
- T& Last() const \
- { return (T&)(base::operator[](Count() - 1)); } \
- \
- int Index(T lItem, bool bFromEnd = false) const \
- { return base::Index((base_type)lItem, bFromEnd); } \
- \
- void Add(T lItem, size_t nInsert = 1) \
- { base::Add((base_type)lItem, nInsert); } \
- void Insert(T lItem, size_t uiIndex, size_t nInsert = 1) \
- { base::Insert((base_type)lItem, uiIndex, nInsert) ; } \
- \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
- { base::RemoveAt(uiIndex, nRemove); } \
- void Remove(T lItem) \
- { int iIndex = Index(lItem); \
- wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
- _WX_ERROR_REMOVE); \
- base::RemoveAt((size_t)iIndex); } \
- \
- void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC)fCmp); } \
- \
- /* STL-like interface */ \
-private: \
- typedef base::iterator biterator; \
- typedef base::const_iterator bconst_iterator; \
- typedef base::value_type bvalue_type; \
- typedef base::const_reference bconst_reference; \
-public: \
- typedef T value_type; \
- typedef value_type* pointer; \
- typedef const value_type* const_pointer; \
- typedef value_type* iterator; \
- typedef const value_type* const_iterator; \
- typedef value_type& reference; \
- typedef const value_type& const_reference; \
- typedef base::difference_type difference_type; \
- typedef base::size_type size_type; \
- \
- class reverse_iterator \
- { \
- typedef T value_type; \
- typedef value_type& reference; \
- typedef value_type* pointer; \
- typedef reverse_iterator itor; \
- friend inline itor operator+(int o, const itor& it) \
- { return it.m_ptr - o; } \
- friend inline itor operator+(const itor& it, int o) \
- { return it.m_ptr - o; } \
- friend inline itor operator-(const itor& it, int o) \
- { return it.m_ptr + o; } \
- friend inline difference_type operator-(const itor& i1, \
- const itor& i2) \
- { return i1.m_ptr - i2.m_ptr; } \
- \
- public: \
- pointer m_ptr; \
- reverse_iterator() : m_ptr(NULL) { } \
- reverse_iterator(pointer ptr) : m_ptr(ptr) { } \
- reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } \
- reference operator*() const { return *m_ptr; } \
- ptrop \
- itor& operator++() { --m_ptr; return *this; } \
- const itor operator++(int) \
- { reverse_iterator tmp = *this; --m_ptr; return tmp; } \
- itor& operator--() { ++m_ptr; return *this; } \
- const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
- bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
- bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
- }; \
- \
- class const_reverse_iterator \
- { \
- typedef T value_type; \
- typedef const value_type& reference; \
- typedef const value_type* pointer; \
- typedef const_reverse_iterator itor; \
- friend inline itor operator+(int o, const itor& it) \
- { return it.m_ptr - o; } \
- friend inline itor operator+(const itor& it, int o) \
- { return it.m_ptr - o; } \
- friend inline itor operator-(const itor& it, int o) \
- { return it.m_ptr + o; } \
- friend inline difference_type operator-(const itor& i1, \
- const itor& i2) \
- { return i1.m_ptr - i2.m_ptr; } \
- \
- public: \
- pointer m_ptr; \
- const_reverse_iterator() : m_ptr(NULL) { } \
- const_reverse_iterator(pointer ptr) : m_ptr(ptr) { } \
- const_reverse_iterator(const itor& it) : m_ptr(it.m_ptr) { } \
- const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { }\
- reference operator*() const { return *m_ptr; } \
- ptrop \
- itor& operator++() { --m_ptr; return *this; } \
- const itor operator++(int) \
- { itor tmp = *this; --m_ptr; return tmp; } \
- itor& operator--() { ++m_ptr; return *this; } \
- const itor operator--(int) { itor tmp = *this; ++m_ptr; return tmp; }\
- bool operator ==(const itor& it) const { return m_ptr == it.m_ptr; }\
- bool operator !=(const itor& it) const { return m_ptr != it.m_ptr; }\
- }; \
- \
- name(size_type n, const_reference v) { assign(n, v); } \
- name(const_iterator first, const_iterator last) \
- { assign(first, last); } \
- void assign(const_iterator first, const_iterator last) \
- { base::assign((bconst_iterator)first, (bconst_iterator)last); } \
- void assign(size_type n, const_reference v) \
- { base::assign(n, (bconst_reference)v); } \
- reference back() { return *(end() - 1); } \
- const_reference back() const { return *(end() - 1); } \
- iterator begin() { return (iterator)base::begin(); } \
- const_iterator begin() const { return (const_iterator)base::begin(); }\
- size_type capacity() const { return base::capacity(); } \
- iterator end() { return (iterator)base::end(); } \
- const_iterator end() const { return (const_iterator)base::end(); } \
- iterator erase(iterator first, iterator last) \
- { return (iterator)base::erase((biterator)first, (biterator)last); }\
- iterator erase(iterator it) \
- { return (iterator)base::erase((biterator)it); } \
- reference front() { return *begin(); } \
- const_reference front() const { return *begin(); } \
- void insert(iterator it, size_type n, const_reference v) \
- { base::insert((biterator)it, n, (bconst_reference)v); } \
- iterator insert(iterator it, const_reference v = value_type()) \
- { return (iterator)base::insert((biterator)it, (bconst_reference)v); }\
- void insert(iterator it, const_iterator first, const_iterator last) \
- { base::insert((biterator)it, (bconst_iterator)first, \
- (bconst_iterator)last); } \
- void pop_back() { base::pop_back(); } \
- void push_back(const_reference v) \
- { base::push_back((bconst_reference)v); } \
- reverse_iterator rbegin() { return reverse_iterator(end() - 1); } \
- const_reverse_iterator rbegin() const; \
- reverse_iterator rend() { return reverse_iterator(begin() - 1); } \
- const_reverse_iterator rend() const; \
- void reserve(size_type n) { base::reserve(n); } \
- void resize(size_type n, value_type v = value_type()) \
- { base::resize(n, v); } \
-}
-
-#define _WX_PTROP pointer operator->() const { return m_ptr; }
-#define _WX_PTROP_NONE
-
-#define _WX_DEFINE_TYPEARRAY(T, name, base, classexp) \
- _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP)
-#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
- _WX_DEFINE_TYPEARRAY_HELPER(T, name, base, classexp, _WX_PTROP_NONE)
-
-#endif // !wxUSE_STL
-
-// ----------------------------------------------------------------------------
-// _WX_DEFINE_SORTED_TYPEARRAY: sorted array for simple data types
-// cannot handle types with size greater than pointer because of sorting
-// ----------------------------------------------------------------------------
-
-#define _WX_DEFINE_SORTED_TYPEARRAY_2(T, name, base, defcomp, classexp, comptype)\
-wxCOMPILE_TIME_ASSERT2(sizeof(T) <= sizeof(base::base_type), \
- TypeTooBigToBeStoredInSorted##base, \
- name); \
-classexp name : public base \
-{ \
- typedef comptype SCMPFUNC; \
-public: \
- name(comptype fn defcomp) { m_fnCompare = fn; } \
- \
- name& operator=(const name& src) \
- { base* temp = (base*) this; \
- (*temp) = ((const base&)src); \
- m_fnCompare = src.m_fnCompare; \
- return *this; } \
- \
- T& operator[](size_t uiIndex) const \
- { return (T&)(base::operator[](uiIndex)); } \
- T& Item(size_t uiIndex) const \
- { return (T&)(base::operator[](uiIndex)); } \
- T& Last() const \
- { return (T&)(base::operator[](size() - 1)); } \
- \
- int Index(T lItem) const \
- { return base::Index(lItem, (CMPFUNC)m_fnCompare); } \
- \
- size_t IndexForInsert(T lItem) const \
- { return base::IndexForInsert(lItem, (CMPFUNC)m_fnCompare); } \
- \
- void AddAt(T item, size_t index) \
- { base::insert(begin() + index, item); } \
- \
- size_t Add(T lItem) \
- { return base::Add(lItem, (CMPFUNC)m_fnCompare); } \
- \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1) \
- { base::erase(begin() + uiIndex, begin() + uiIndex + nRemove); } \
- void Remove(T lItem) \
- { int iIndex = Index(lItem); \
- wxCHECK2_MSG( iIndex != wxNOT_FOUND, return, \
- _WX_ERROR_REMOVE ); \
- base::erase(begin() + iIndex); } \
- \
-private: \
- comptype m_fnCompare; \
-}
-
-
-// ----------------------------------------------------------------------------
-// _WX_DECLARE_OBJARRAY: an array for pointers to type T with owning semantics
-// ----------------------------------------------------------------------------
-
-#define _WX_DECLARE_OBJARRAY(T, name, base, classexp) \
-typedef int (CMPFUNC_CONV *CMPFUNC##T)(T **pItem1, T **pItem2); \
-classexp name : protected base \
-{ \
-typedef int (CMPFUNC_CONV *CMPFUNC##base)(void **pItem1, void **pItem2); \
-typedef base base_array; \
-public: \
- name() { } \
- name(const name& src); \
- name& operator=(const name& src); \
- \
- ~name(); \
- \
- void Alloc(size_t count) { reserve(count); } \
- size_t GetCount() const { return base_array::size(); } \
- size_t size() const { return base_array::size(); } \
- bool IsEmpty() const { return base_array::empty(); } \
- bool empty() const { return base_array::empty(); } \
- size_t Count() const { return base_array::size(); } \
- void Shrink() { base::Shrink(); } \
- \
- T& operator[](size_t uiIndex) const \
- { return *(T*)base::operator[](uiIndex); } \
- T& Item(size_t uiIndex) const \
- { return *(T*)base::operator[](uiIndex); } \
- T& Last() const \
- { return *(T*)(base::operator[](size() - 1)); } \
- \
- int Index(const T& lItem, bool bFromEnd = false) const; \
- \
- void Add(const T& lItem, size_t nInsert = 1); \
- void Add(const T* pItem) \
- { base::push_back((T*)pItem); } \
- void push_back(const T* pItem) \
- { base::push_back((T*)pItem); } \
- void push_back(const T& lItem) \
- { Add(lItem); } \
- \
- void Insert(const T& lItem, size_t uiIndex, size_t nInsert = 1); \
- void Insert(const T* pItem, size_t uiIndex) \
- { base::insert(begin() + uiIndex, (T*)pItem); } \
- \
- void Empty() { DoEmpty(); base::clear(); } \
- void Clear() { DoEmpty(); base::clear(); } \
- \
- T* Detach(size_t uiIndex) \
- { T* p = (T*)base::operator[](uiIndex); \
- base::erase(begin() + uiIndex); return p; } \
- void RemoveAt(size_t uiIndex, size_t nRemove = 1); \
- \
- void Sort(CMPFUNC##T fCmp) { base::Sort((CMPFUNC##base)fCmp); } \
- \
-private: \
- void DoEmpty(); \
- void DoCopy(const name& src); \
-}
-
-// ============================================================================
-// The public macros for declaration and definition of the dynamic arrays
-// ============================================================================
-
-// Please note that for each macro WX_FOO_ARRAY we also have
-// WX_FOO_EXPORTED_ARRAY and WX_FOO_USER_EXPORTED_ARRAY which are exactly the
-// same except that they use an additional __declspec(dllexport) or equivalent
-// under Windows if needed.
-//
-// The first (just EXPORTED) macros do it if wxWidgets was compiled as a DLL
-// and so must be used used inside the library. The second kind (USER_EXPORTED)
-// allow the user code to do it when it wants. This is needed if you have a dll
-// that wants to export a wxArray daubed with your own import/export goo.
-//
-// Finally, you can define the macro below as something special to modify the
-// arrays defined by a simple WX_FOO_ARRAY as well. By default is is empty.
-#define wxARRAY_DEFAULT_EXPORT
-
-// ----------------------------------------------------------------------------
-// WX_DECLARE_BASEARRAY(T, name) declare an array class named "name" containing
-// the elements of type T
-// ----------------------------------------------------------------------------
-
-#define WX_DECLARE_BASEARRAY(T, name) \
- WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, wxARRAY_DEFAULT_EXPORT)
-
-#define WX_DECLARE_EXPORTED_BASEARRAY(T, name) \
- WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, WXDLLEXPORT)
-
-#define WX_DECLARE_USER_EXPORTED_BASEARRAY(T, name, expmode) \
- typedef T _wxArray##name; \
- _WX_DECLARE_BASEARRAY(_wxArray##name, name, class expmode)
-
-// ----------------------------------------------------------------------------
-// WX_DEFINE_TYPEARRAY(T, name, base) define an array class named "name" deriving
-// from class "base" containing the elements of type T
-//
-// Note that the class defined has only inline function and doesn't take any
-// space at all so there is no size penalty for defining multiple array classes
-// ----------------------------------------------------------------------------
-
-#define WX_DEFINE_TYPEARRAY(T, name, base) \
- WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class wxARRAY_DEFAULT_EXPORT)
-
-#define WX_DEFINE_TYPEARRAY_PTR(T, name, base) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class wxARRAY_DEFAULT_EXPORT)
-
-#define WX_DEFINE_EXPORTED_TYPEARRAY(T, name, base) \
- WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class WXDLLEXPORT)
-
-#define WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, base) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class WXDLLEXPORT)
-
-#define WX_DEFINE_USER_EXPORTED_TYPEARRAY(T, name, base, expdecl) \
- WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, class expdecl)
-
-#define WX_DEFINE_USER_EXPORTED_TYPEARRAY_PTR(T, name, base, expdecl) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, class expdecl)
-
-#define WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, base, classdecl) \
- typedef T _wxArray##name; \
- _WX_DEFINE_TYPEARRAY(_wxArray##name, name, base, classdecl)
-
-#define WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, base, classdecl) \
- typedef T _wxArray##name; \
- _WX_DEFINE_TYPEARRAY_PTR(_wxArray##name, name, base, classdecl)
-
-// ----------------------------------------------------------------------------
-// WX_DEFINE_SORTED_TYPEARRAY: this is the same as the previous macro, but it
-// defines a sorted array.
-//
-// Differences:
-// 1) it must be given a COMPARE function in ctor which takes 2 items of type
-// T* and should return -1, 0 or +1 if the first one is less/greater
-// than/equal to the second one.
-// 2) the Add() method inserts the item in such was that the array is always
-// sorted (it uses the COMPARE function)
-// 3) it has no Sort() method because it's always sorted
-// 4) Index() method is much faster (the sorted arrays use binary search
-// instead of linear one), but Add() is slower.
-// 5) there is no Insert() method because you can't insert an item into the
-// given position in a sorted array but there is IndexForInsert()/AddAt()
-// pair which may be used to optimize a common operation of "insert only if
-// not found"
-//
-// Note that you have to specify the comparison function when creating the
-// objects of this array type. If, as in 99% of cases, the comparison function
-// is the same for all objects of a class, WX_DEFINE_SORTED_TYPEARRAY_CMP below
-// is more convenient.
-//
-// Summary: use this class when the speed of Index() function is important, use
-// the normal arrays otherwise.
-// ----------------------------------------------------------------------------
-
-// we need a macro which expands to nothing to pass correct number of
-// parameters to a nested macro invocation even when we don't have anything to
-// pass it
-#define wxARRAY_EMPTY
-
-#define WX_DEFINE_SORTED_TYPEARRAY(T, name, base) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, \
- wxARRAY_DEFAULT_EXPORT)
-
-#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, base) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, WXDLLEXPORT)
-
-#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, base, expmode) \
- typedef T _wxArray##name; \
- typedef int (CMPFUNC_CONV *SCMPFUNC##name)(T pItem1, T pItem2); \
- _WX_DEFINE_SORTED_TYPEARRAY_2(_wxArray##name, name, base, \
- wxARRAY_EMPTY, class expmode, SCMPFUNC##name)
-
-// ----------------------------------------------------------------------------
-// WX_DEFINE_SORTED_TYPEARRAY_CMP: exactly the same as above but the comparison
-// function is provided by this macro and the objects of this class have a
-// default constructor which just uses it.
-//
-// The arguments are: the element type, the comparison function and the array
-// name
-//
-// NB: this is, of course, how WX_DEFINE_SORTED_TYPEARRAY() should have worked
-// from the very beginning - unfortunately I didn't think about this earlier
-// ----------------------------------------------------------------------------
-
-#define WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
- wxARRAY_DEFAULT_EXPORT)
-
-#define WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
- WXDLLEXPORT)
-
-#define WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, base, \
- expmode) \
- typedef T _wxArray##name; \
- typedef int (CMPFUNC_CONV *SCMPFUNC##name)(T pItem1, T pItem2); \
- _WX_DEFINE_SORTED_TYPEARRAY_2(_wxArray##name, name, base, = cmpfunc, \
- class expmode, SCMPFUNC##name)
-
-// ----------------------------------------------------------------------------
-// WX_DECLARE_OBJARRAY(T, name): this macro generates a new array class
-// named "name" which owns the objects of type T it contains, i.e. it will
-// delete them when it is destroyed.
-//
-// An element is of type T*, but arguments of type T& are taken (see below!)
-// and T& is returned.
-//
-// Don't use this for simple types such as "int" or "long"!
-//
-// Note on Add/Insert functions:
-// 1) function(T*) gives the object to the array, i.e. it will delete the
-// object when it's removed or in the array's dtor
-// 2) function(T&) will create a copy of the object and work with it
-//
-// Also:
-// 1) Remove() will delete the object after removing it from the array
-// 2) Detach() just removes the object from the array (returning pointer to it)
-//
-// NB1: Base type T should have an accessible copy ctor if Add(T&) is used
-// NB2: Never ever cast a array to it's base type: as dtor is not virtual
-// and so you risk having at least the memory leaks and probably worse
-//
-// Some functions of this class are not inline, so it takes some space to
-// define new class from this template even if you don't use it - which is not
-// the case for the simple (non-object) array classes
-//
-// To use an objarray class you must
-// #include "dynarray.h"
-// WX_DECLARE_OBJARRAY(element_type, list_class_name)
-// #include "arrimpl.cpp"
-// WX_DEFINE_OBJARRAY(list_class_name) // name must be the same as above!
-//
-// This is necessary because at the moment of DEFINE_OBJARRAY class parsing the
-// element_type must be fully defined (i.e. forward declaration is not
-// enough), while WX_DECLARE_OBJARRAY may be done anywhere. The separation of
-// two allows to break cicrcular dependencies with classes which have member
-// variables of objarray type.
-// ----------------------------------------------------------------------------
-
-#define WX_DECLARE_OBJARRAY(T, name) \
- WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, wxARRAY_DEFAULT_EXPORT)
-
-#define WX_DECLARE_EXPORTED_OBJARRAY(T, name) \
- WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, WXDLLEXPORT)
-
-#define WX_DECLARE_OBJARRAY_WITH_DECL(T, name, decl) \
- typedef T _wxObjArray##name; \
- _WX_DECLARE_OBJARRAY(_wxObjArray##name, name, wxArrayPtrVoid, decl)
-
-#define WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, expmode) \
- WX_DECLARE_OBJARRAY_WITH_DECL(T, name, class expmode)
-
-// WX_DEFINE_OBJARRAY is going to be redefined when arrimpl.cpp is included,
-// try to provoke a human-understandable error if it used incorrectly.
-//
-// there is no real need for 3 different macros in the DEFINE case but do it
-// anyhow for consistency
-#define WX_DEFINE_OBJARRAY(name) DidYouIncludeArrimplCpp
-#define WX_DEFINE_EXPORTED_OBJARRAY(name) WX_DEFINE_OBJARRAY(name)
-#define WX_DEFINE_USER_EXPORTED_OBJARRAY(name) WX_DEFINE_OBJARRAY(name)
-
-// ----------------------------------------------------------------------------
-// Some commonly used predefined base arrays
-// ----------------------------------------------------------------------------
-
-WX_DECLARE_USER_EXPORTED_BASEARRAY(const void *, wxBaseArrayPtrVoid,
- WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_BASEARRAY(char, wxBaseArrayChar, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_BASEARRAY(short, wxBaseArrayShort, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_BASEARRAY(int, wxBaseArrayInt, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_BASEARRAY(long, wxBaseArrayLong, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_BASEARRAY(size_t, wxBaseArraySizeT, WXDLLIMPEXP_BASE);
-WX_DECLARE_USER_EXPORTED_BASEARRAY(double, wxBaseArrayDouble, WXDLLIMPEXP_BASE);
-
-// ----------------------------------------------------------------------------
-// Convenience macros to define arrays from base arrays
-// ----------------------------------------------------------------------------
-
-#define WX_DEFINE_ARRAY(T, name) \
- WX_DEFINE_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_ARRAY_PTR(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_EXPORTED_ARRAY(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_EXPORTED_ARRAY_PTR(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_ARRAY_WITH_DECL_PTR(T, name, decl) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayPtrVoid, decl)
-#define WX_DEFINE_USER_EXPORTED_ARRAY(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_PTR(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_ARRAY_CHAR(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayChar)
-#define WX_DEFINE_EXPORTED_ARRAY_CHAR(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayChar)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_CHAR(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayChar, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_ARRAY_SHORT(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayShort)
-#define WX_DEFINE_EXPORTED_ARRAY_SHORT(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayShort)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_SHORT(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayShort, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_ARRAY_INT(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayInt)
-#define WX_DEFINE_EXPORTED_ARRAY_INT(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayInt)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_INT(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayInt, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_ARRAY_LONG(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayLong)
-#define WX_DEFINE_EXPORTED_ARRAY_LONG(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayLong)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_LONG(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayLong, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_ARRAY_SIZE_T(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArraySizeT)
-#define WX_DEFINE_EXPORTED_ARRAY_SIZE_T(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArraySizeT)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_SIZE_T(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArraySizeT, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_ARRAY_DOUBLE(T, name) \
- WX_DEFINE_TYPEARRAY_PTR(T, name, wxBaseArrayDouble)
-#define WX_DEFINE_EXPORTED_ARRAY_DOUBLE(T, name) \
- WX_DEFINE_EXPORTED_TYPEARRAY_PTR(T, name, wxBaseArrayDouble)
-#define WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(T, name, expmode) \
- WX_DEFINE_TYPEARRAY_WITH_DECL_PTR(T, name, wxBaseArrayDouble, wxARRAY_EMPTY expmode)
-
-// ----------------------------------------------------------------------------
-// Convenience macros to define sorted arrays from base arrays
-// ----------------------------------------------------------------------------
-
-#define WX_DEFINE_SORTED_ARRAY(T, name) \
- WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY(T, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(T, name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayPtrVoid, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_CHAR(T, name) \
- WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayChar)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CHAR(T, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayChar)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CHAR(T, name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayChar, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_SHORT(T, name) \
- WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayShort)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_SHORT(T, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayShort)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SHORT(T, name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayShort, wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_INT(T, name) \
- WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayInt)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_INT(T, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayInt)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_INT(T, name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayInt, expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_LONG(T, name) \
- WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArrayLong)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_LONG(T, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArrayLong)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_LONG(T, name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArrayLong, expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_SIZE_T(T, name) \
- WX_DEFINE_SORTED_TYPEARRAY(T, name, wxBaseArraySizeT)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_SIZE_T(T, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY(T, name, wxBaseArraySizeT)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_SIZE_T(T, name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY(T, name, wxBaseArraySizeT, wxARRAY_EMPTY expmode)
-
-// ----------------------------------------------------------------------------
-// Convenience macros to define sorted arrays from base arrays
-// ----------------------------------------------------------------------------
-
-#define WX_DEFINE_SORTED_ARRAY_CMP(T, cmpfunc, name) \
- WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP(T, cmpfunc, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayPtrVoid)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP(T, cmpfunc, \
- name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
- wxBaseArrayPtrVoid, \
- wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_CMP_CHAR(T, cmpfunc, name) \
- WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayChar)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_CHAR(T, cmpfunc, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayChar)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_CHAR(T, cmpfunc, \
- name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
- wxBaseArrayChar, \
- wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_CMP_SHORT(T, cmpfunc, name) \
- WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayShort)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_SHORT(T, cmpfunc, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayShort)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_SHORT(T, cmpfunc, \
- name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
- wxBaseArrayShort, \
- wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_CMP_INT(T, cmpfunc, name) \
- WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayInt)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_INT(T, cmpfunc, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayInt)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_INT(T, cmpfunc, \
- name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
- wxBaseArrayInt, \
- wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_CMP_LONG(T, cmpfunc, name) \
- WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayLong)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_LONG(T, cmpfunc, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArrayLong)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_LONG(T, cmpfunc, \
- name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
- wxBaseArrayLong, \
- wxARRAY_EMPTY expmode)
-
-#define WX_DEFINE_SORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, name) \
- WX_DEFINE_SORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArraySizeT)
-#define WX_DEFINE_SORTED_EXPORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, name) \
- WX_DEFINE_SORTED_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, wxBaseArraySizeT)
-#define WX_DEFINE_SORTED_USER_EXPORTED_ARRAY_CMP_SIZE_T(T, cmpfunc, \
- name, expmode) \
- WX_DEFINE_SORTED_USER_EXPORTED_TYPEARRAY_CMP(T, cmpfunc, name, \
- wxBaseArraySizeT, \
- wxARRAY_EMPTY expmode)
-
-// ----------------------------------------------------------------------------
-// Some commonly used predefined arrays
-// ----------------------------------------------------------------------------
-
-WX_DEFINE_USER_EXPORTED_ARRAY_SHORT(short, wxArrayShort, class WXDLLIMPEXP_BASE);
-WX_DEFINE_USER_EXPORTED_ARRAY_INT(int, wxArrayInt, class WXDLLIMPEXP_BASE);
-WX_DEFINE_USER_EXPORTED_ARRAY_DOUBLE(double, wxArrayDouble, class WXDLLIMPEXP_BASE);
-WX_DEFINE_USER_EXPORTED_ARRAY_LONG(long, wxArrayLong, class WXDLLIMPEXP_BASE);
-WX_DEFINE_USER_EXPORTED_ARRAY_PTR(void *, wxArrayPtrVoid, class WXDLLIMPEXP_BASE);
-
-// -----------------------------------------------------------------------------
-// convenience macros
-// -----------------------------------------------------------------------------
-
-// prepend all element of one array to another one; e.g. if first array contains
-// elements X,Y,Z and the second contains A,B,C (in those orders), then the
-// first array will be result as A,B,C,X,Y,Z
-#define WX_PREPEND_ARRAY(array, other) \
- { \
- size_t wxAAcnt = (other).size(); \
- (array).Alloc(wxAAcnt); \
- for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
- { \
- (array).Insert((other)[wxAAn], wxAAn); \
- } \
- }
-
-// append all element of one array to another one
-#define WX_APPEND_ARRAY(array, other) \
- { \
- size_t wxAAcnt = (other).size(); \
- (array).Alloc(wxAAcnt); \
- for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
- { \
- (array).push_back((other)[wxAAn]); \
- } \
- }
-
-// delete all array elements
-//
-// NB: the class declaration of the array elements must be visible from the
-// place where you use this macro, otherwise the proper destructor may not
-// be called (a decent compiler should give a warning about it, but don't
-// count on it)!
-#define WX_CLEAR_ARRAY(array) \
- { \
- size_t wxAAcnt = (array).size(); \
- for ( size_t wxAAn = 0; wxAAn < wxAAcnt; wxAAn++ ) \
- { \
- delete (array)[wxAAn]; \
- } \
- \
- (array).clear(); \
- }
-
-#endif // _DYNARRAY_H
diff --git a/desmume/src/windows/wx/include/wx/dynlib.h b/desmume/src/windows/wx/include/wx/dynlib.h
deleted file mode 100644
index 3552bdcaa..000000000
--- a/desmume/src/windows/wx/include/wx/dynlib.h
+++ /dev/null
@@ -1,359 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/dynlib.h
-// Purpose: Dynamic library loading classes
-// Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik
-// Modified by:
-// Created: 20/07/98
-// RCS-ID: $Id: dynlib.h 58750 2009-02-08 10:01:03Z VZ $
-// Copyright: (c) 1998 Guilhem Lavaux
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DYNLIB_H__
-#define _WX_DYNLIB_H__
-
-#include "wx/defs.h"
-
-#if wxUSE_DYNLIB_CLASS
-
-#include "wx/string.h"
-#include "wx/dynarray.h"
-
-#if defined(__OS2__) || defined(__EMX__)
-#include "wx/os2/private.h"
-#endif
-
-#ifdef __WXMSW__
-#include "wx/msw/private.h"
-#endif
-
-// note that we have our own dlerror() implementation under Darwin
-#if (defined(HAVE_DLERROR) && !defined(__EMX__)) || defined(__DARWIN__)
- #define wxHAVE_DYNLIB_ERROR
-#endif
-
-class WXDLLIMPEXP_FWD_BASE wxDynamicLibraryDetailsCreator;
-
-// ----------------------------------------------------------------------------
-// conditional compilation
-// ----------------------------------------------------------------------------
-
-// Note: __OS2__/EMX has to be tested first, since we want to use
-// native version, even if configure detected presence of DLOPEN.
-#if defined(__OS2__) || defined(__EMX__) || defined(__WINDOWS__)
- typedef HMODULE wxDllType;
-#elif defined(__DARWIN__)
- // Don't include dlfcn.h on Darwin, we may be using our own replacements.
- typedef void *wxDllType;
-#elif defined(HAVE_DLOPEN)
- #include
- typedef void *wxDllType;
-#elif defined(HAVE_SHL_LOAD)
- #include
- typedef shl_t wxDllType;
-#elif defined(__WXMAC__)
- #include
- typedef CFragConnectionID wxDllType;
-#else
- #error "Dynamic Loading classes can't be compiled on this platform, sorry."
-#endif
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-enum wxDLFlags
-{
- wxDL_LAZY = 0x00000001, // resolve undefined symbols at first use
- // (only works on some Unix versions)
- wxDL_NOW = 0x00000002, // resolve undefined symbols on load
- // (default, always the case under Win32)
- wxDL_GLOBAL = 0x00000004, // export extern symbols to subsequently
- // loaded libs.
- wxDL_VERBATIM = 0x00000008, // attempt to load the supplied library
- // name without appending the usual dll
- // filename extension.
- wxDL_NOSHARE = 0x00000010, // load new DLL, don't reuse already loaded
- // (only for wxPluginManager)
-
- wxDL_QUIET = 0x00000020, // don't log an error if failed to load
-
-#if wxABI_VERSION >= 20810
- // this flag is dangerous, for internal use of wxMSW only, don't use at all
- // and especially don't use directly, use wxLoadedDLL instead if you really
- // do need it
- wxDL_GET_LOADED = 0x00000040, // Win32 only: return handle of already
- // loaded DLL or NULL otherwise; Unload()
- // should not be called so don't forget to
- // Detach() if you use this function
-#endif // wx 2.8.10+
-
- wxDL_DEFAULT = wxDL_NOW // default flags correspond to Win32
-};
-
-enum wxDynamicLibraryCategory
-{
- wxDL_LIBRARY, // standard library
- wxDL_MODULE // loadable module/plugin
-};
-
-enum wxPluginCategory
-{
- wxDL_PLUGIN_GUI, // plugin that uses GUI classes
- wxDL_PLUGIN_BASE // wxBase-only plugin
-};
-
-// ----------------------------------------------------------------------------
-// macros
-// ----------------------------------------------------------------------------
-
-// when loading a function from a DLL you always have to cast the returned
-// "void *" pointer to the correct type and, even more annoyingly, you have to
-// repeat this type twice if you want to declare and define a function pointer
-// all in one line
-//
-// this macro makes this slightly less painful by allowing you to specify the
-// type only once, as the first parameter, and creating a variable of this type
-// called "pfn" initialized with the "name" from the "dynlib"
-#define wxDYNLIB_FUNCTION(type, name, dynlib) \
- type pfn ## name = (type)(dynlib).GetSymbol(_T(#name))
-
-// ----------------------------------------------------------------------------
-// wxDynamicLibraryDetails: contains details about a loaded wxDynamicLibrary
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxDynamicLibraryDetails
-{
-public:
- // ctor, normally never used as these objects are only created by
- // wxDynamicLibrary::ListLoaded()
- wxDynamicLibraryDetails() { m_address = NULL; m_length = 0; }
-
- // get the (base) name
- wxString GetName() const { return m_name; }
-
- // get the full path of this object
- wxString GetPath() const { return m_path; }
-
- // get the load address and the extent, return true if this information is
- // available
- bool GetAddress(void **addr, size_t *len) const
- {
- if ( !m_address )
- return false;
-
- if ( addr )
- *addr = m_address;
- if ( len )
- *len = m_length;
-
- return true;
- }
-
- // return the version of the DLL (may be empty if no version info)
- wxString GetVersion() const
- {
- return m_version;
- }
-
-private:
- wxString m_name,
- m_path,
- m_version;
-
- void *m_address;
- size_t m_length;
-
- friend class wxDynamicLibraryDetailsCreator;
-};
-
-WX_DECLARE_USER_EXPORTED_OBJARRAY(wxDynamicLibraryDetails,
- wxDynamicLibraryDetailsArray,
- WXDLLIMPEXP_BASE);
-
-// ----------------------------------------------------------------------------
-// wxDynamicLibrary: represents a handle to a DLL/shared object
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxDynamicLibrary
-{
-public:
- // return a valid handle for the main program itself or NULL if back
- // linking is not supported by the current platform (e.g. Win32)
- static wxDllType GetProgramHandle();
-
- // return the platform standard DLL extension (with leading dot)
- static const wxChar *GetDllExt() { return ms_dllext; }
-
- wxDynamicLibrary() : m_handle(0) { }
- wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT)
- : m_handle(0)
- {
- Load(libname, flags);
- }
-
- // NOTE: this class is (deliberately) not virtual, do not attempt
- // to use it polymorphically.
- ~wxDynamicLibrary() { Unload(); }
-
- // return true if the library was loaded successfully
- bool IsLoaded() const { return m_handle != 0; }
-
- // load the library with the given name (full or not), return true if ok
- bool Load(const wxString& libname, int flags = wxDL_DEFAULT);
-
- // raw function for loading dynamic libs: always behaves as if
- // wxDL_VERBATIM were specified and doesn't log error message if the
- // library couldn't be loaded but simply returns NULL
- static wxDllType RawLoad(const wxString& libname, int flags = wxDL_DEFAULT);
-
- // detach the library object from its handle, i.e. prevent the object from
- // unloading the library in its dtor -- the caller is now responsible for
- // doing this
- wxDllType Detach() { wxDllType h = m_handle; m_handle = 0; return h; }
-
- // unload the given library handle (presumably returned by Detach() before)
- static void Unload(wxDllType handle);
-
- // unload the library, also done automatically in dtor
- void Unload() { if ( IsLoaded() ) { Unload(m_handle); m_handle = 0; } }
-
- // Return the raw handle from dlopen and friends.
- wxDllType GetLibHandle() const { return m_handle; }
-
- // check if the given symbol is present in the library, useful to verify if
- // a loadable module is our plugin, for example, without provoking error
- // messages from GetSymbol()
- bool HasSymbol(const wxString& name) const
- {
- bool ok;
- DoGetSymbol(name, &ok);
- return ok;
- }
-
- // resolve a symbol in a loaded DLL, such as a variable or function name.
- // 'name' is the (possibly mangled) name of the symbol. (use extern "C" to
- // export unmangled names)
- //
- // Since it is perfectly valid for the returned symbol to actually be NULL,
- // that is not always indication of an error. Pass and test the parameter
- // 'success' for a true indication of success or failure to load the
- // symbol.
- //
- // Returns a pointer to the symbol on success, or NULL if an error occurred
- // or the symbol wasn't found.
- void *GetSymbol(const wxString& name, bool *success = NULL) const;
-
- // low-level version of GetSymbol()
- static void *RawGetSymbol(wxDllType handle, const wxString& name);
- void *RawGetSymbol(const wxString& name) const
- {
-#if defined (__WXPM__) || defined(__EMX__)
- return GetSymbol(name);
-#else
- return RawGetSymbol(m_handle, name);
-#endif
- }
-
-#ifdef __WXMSW__
- // this function is useful for loading functions from the standard Windows
- // DLLs: such functions have an 'A' (in ANSI build) or 'W' (in Unicode, or
- // wide character build) suffix if they take string parameters
- static void *RawGetSymbolAorW(wxDllType handle, const wxString& name)
- {
- return RawGetSymbol
- (
- handle,
- name +
-#if wxUSE_UNICODE
- L'W'
-#else
- 'A'
-#endif
- );
- }
-
- void *GetSymbolAorW(const wxString& name) const
- {
- return RawGetSymbolAorW(m_handle, name);
- }
-#endif // __WXMSW__
-
- // return all modules/shared libraries in the address space of this process
- //
- // returns an empty array if not implemented or an error occurred
- static wxDynamicLibraryDetailsArray ListLoaded();
-
- // return platform-specific name of dynamic library with proper extension
- // and prefix (e.g. "foo.dll" on Windows or "libfoo.so" on Linux)
- static wxString CanonicalizeName(const wxString& name,
- wxDynamicLibraryCategory cat = wxDL_LIBRARY);
-
- // return name of wxWidgets plugin (adds compiler and version info
- // to the filename):
- static wxString
- CanonicalizePluginName(const wxString& name,
- wxPluginCategory cat = wxDL_PLUGIN_GUI);
-
- // return plugin directory on platforms where it makes sense and empty
- // string on others:
- static wxString GetPluginsDirectory();
-
-
-protected:
- // common part of GetSymbol() and HasSymbol()
- void *DoGetSymbol(const wxString& name, bool *success = 0) const;
-
-#ifdef wxHAVE_DYNLIB_ERROR
- // log the error after a dlxxx() function failure
- static void Error();
-#endif // wxHAVE_DYNLIB_ERROR
-
-
- // platform specific shared lib suffix.
- static const wxChar *ms_dllext;
-
- // the handle to DLL or NULL
- wxDllType m_handle;
-
- // no copy ctor/assignment operators (or we'd try to unload the library
- // twice)
- DECLARE_NO_COPY_CLASS(wxDynamicLibrary)
-};
-
-#if defined(__WXMSW__) && wxABI_VERSION >= 20810
-
-// ----------------------------------------------------------------------------
-// wxLoadedDLL is a MSW-only internal helper class allowing to dynamically bind
-// to a DLL already loaded into the project address space
-// ----------------------------------------------------------------------------
-
-class wxLoadedDLL : public wxDynamicLibrary
-{
-public:
- wxLoadedDLL(const wxString& dllname)
- : wxDynamicLibrary(dllname, wxDL_GET_LOADED | wxDL_VERBATIM | wxDL_QUIET)
- {
- }
-
- ~wxLoadedDLL()
- {
- Detach();
- }
-};
-
-#endif // __WXMSW__
-
-// ----------------------------------------------------------------------------
-// Interesting defines
-// ----------------------------------------------------------------------------
-
-#define WXDLL_ENTRY_FUNCTION() \
-extern "C" WXEXPORT const wxClassInfo *wxGetClassFirst(); \
-const wxClassInfo *wxGetClassFirst() { \
- return wxClassInfo::GetFirst(); \
-}
-
-#endif // wxUSE_DYNLIB_CLASS
-
-#endif // _WX_DYNLIB_H__
diff --git a/desmume/src/windows/wx/include/wx/dynload.h b/desmume/src/windows/wx/include/wx/dynload.h
deleted file mode 100644
index 68c63c1eb..000000000
--- a/desmume/src/windows/wx/include/wx/dynload.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: dynload.h
-// Purpose: Dynamic loading framework
-// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's
-// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux)
-// Modified by:
-// Created: 03/12/01
-// RCS-ID: $Id: dynload.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) 2001 Ron Lee
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_DYNAMICLOADER_H__
-#define _WX_DYNAMICLOADER_H__
-
-// ----------------------------------------------------------------------------
-// headers
-// ----------------------------------------------------------------------------
-
-#include "wx/defs.h"
-
-#if wxUSE_DYNAMIC_LOADER
-
-#include "wx/dynlib.h"
-#include "wx/hashmap.h"
-#include "wx/module.h"
-
-class WXDLLIMPEXP_FWD_BASE wxPluginLibrary;
-
-
-WX_DECLARE_STRING_HASH_MAP_WITH_DECL(wxPluginLibrary *, wxDLManifest,
- class WXDLLIMPEXP_BASE);
-typedef wxDLManifest wxDLImports;
-
-// ---------------------------------------------------------------------------
-// wxPluginLibrary
-// ---------------------------------------------------------------------------
-
-// NOTE: Do not attempt to use a base class pointer to this class.
-// wxDL is not virtual and we deliberately hide some of it's
-// methods here.
-//
-// Unless you know exacty why you need to, you probably shouldn't
-// instantiate this class directly anyway, use wxPluginManager
-// instead.
-
-class WXDLLIMPEXP_BASE wxPluginLibrary : public wxDynamicLibrary
-{
-public:
-
- static wxDLImports* ms_classes; // Static hash of all imported classes.
-
- wxPluginLibrary( const wxString &libname, int flags = wxDL_DEFAULT );
- ~wxPluginLibrary();
-
- wxPluginLibrary *RefLib();
- bool UnrefLib();
-
- // These two are called by the PluginSentinel on (PLUGGABLE) object
- // creation/destruction. There is usually no reason for the user to
- // call them directly. We have to separate this from the link count,
- // since the two are not interchangeable.
-
- // FIXME: for even better debugging PluginSentinel should register
- // the name of the class created too, then we can state
- // exactly which object was not destroyed which may be
- // difficult to find otherwise. Also this code should
- // probably only be active in DEBUG mode, but let's just
- // get it right first.
-
- void RefObj() { ++m_objcount; }
- void UnrefObj()
- {
- wxASSERT_MSG( m_objcount > 0, _T("Too many objects deleted??") );
- --m_objcount;
- }
-
- // Override/hide some base class methods
-
- bool IsLoaded() const { return m_linkcount > 0; }
- void Unload() { UnrefLib(); }
-
-private:
-
- wxClassInfo *m_before; // sm_first before loading this lib
- wxClassInfo *m_after; // ..and after.
-
- size_t m_linkcount; // Ref count of library link calls
- size_t m_objcount; // ..and (pluggable) object instantiations.
- wxModuleList m_wxmodules; // any wxModules that we initialised.
-
- void UpdateClasses(); // Update ms_classes
- void RestoreClasses(); // Removes this library from ms_classes
- void RegisterModules(); // Init any wxModules in the lib.
- void UnregisterModules(); // Cleanup any wxModules we installed.
-
- DECLARE_NO_COPY_CLASS(wxPluginLibrary)
-};
-
-
-class WXDLLIMPEXP_BASE wxPluginManager
-{
-public:
-
- // Static accessors.
-
- static wxPluginLibrary *LoadLibrary( const wxString &libname,
- int flags = wxDL_DEFAULT );
- static bool UnloadLibrary(const wxString &libname);
-
- // Instance methods.
-
- wxPluginManager() : m_entry(NULL) {}
- wxPluginManager(const wxString &libname, int flags = wxDL_DEFAULT)
- {
- Load(libname, flags);
- }
- ~wxPluginManager() { if ( IsLoaded() ) Unload(); }
-
- bool Load(const wxString &libname, int flags = wxDL_DEFAULT);
- void Unload();
-
- bool IsLoaded() const { return m_entry && m_entry->IsLoaded(); }
- void *GetSymbol(const wxString &symbol, bool *success = 0)
- {
- return m_entry->GetSymbol( symbol, success );
- }
-
- static void CreateManifest() { ms_manifest = new wxDLManifest(wxKEY_STRING); }
- static void ClearManifest() { delete ms_manifest; ms_manifest = NULL; }
-
-private:
- // return the pointer to the entry for the library with given name in
- // ms_manifest or NULL if none
- static wxPluginLibrary *FindByName(const wxString& name)
- {
- const wxDLManifest::iterator i = ms_manifest->find(name);
-
- return i == ms_manifest->end() ? NULL : i->second;
- }
-
- static wxDLManifest* ms_manifest; // Static hash of loaded libs.
- wxPluginLibrary* m_entry; // Cache our entry in the manifest.
-
- // We could allow this class to be copied if we really
- // wanted to, but not without modification.
- DECLARE_NO_COPY_CLASS(wxPluginManager)
-};
-
-
-#endif // wxUSE_DYNAMIC_LOADER
-#endif // _WX_DYNAMICLOADER_H__
-
diff --git a/desmume/src/windows/wx/include/wx/effects.h b/desmume/src/windows/wx/include/wx/effects.h
deleted file mode 100644
index b04a3ba63..000000000
--- a/desmume/src/windows/wx/include/wx/effects.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/effects.h
-// Purpose: wxEffects class
-// Draws 3D effects.
-// Author: Julian Smart et al
-// Modified by:
-// Created: 25/4/2000
-// RCS-ID: $Id: effects.h 39109 2006-05-08 11:31:03Z ABX $
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_EFFECTS_H_
-#define _WX_EFFECTS_H_
-
-/*
- * wxEffects: various 3D effects
- */
-
-#include "wx/object.h"
-#include "wx/colour.h"
-#include "wx/gdicmn.h"
-#include "wx/dc.h"
-
-class WXDLLEXPORT wxEffects: public wxObject
-{
-DECLARE_CLASS(wxEffects)
-
-public:
- // Assume system colours
- wxEffects() ;
- // Going from lightest to darkest
- wxEffects(const wxColour& highlightColour, const wxColour& lightShadow,
- const wxColour& faceColour, const wxColour& mediumShadow,
- const wxColour& darkShadow) ;
-
- // Accessors
- wxColour GetHighlightColour() const { return m_highlightColour; }
- wxColour GetLightShadow() const { return m_lightShadow; }
- wxColour GetFaceColour() const { return m_faceColour; }
- wxColour GetMediumShadow() const { return m_mediumShadow; }
- wxColour GetDarkShadow() const { return m_darkShadow; }
-
- void SetHighlightColour(const wxColour& c) { m_highlightColour = c; }
- void SetLightShadow(const wxColour& c) { m_lightShadow = c; }
- void SetFaceColour(const wxColour& c) { m_faceColour = c; }
- void SetMediumShadow(const wxColour& c) { m_mediumShadow = c; }
- void SetDarkShadow(const wxColour& c) { m_darkShadow = c; }
-
- void Set(const wxColour& highlightColour, const wxColour& lightShadow,
- const wxColour& faceColour, const wxColour& mediumShadow,
- const wxColour& darkShadow)
- {
- SetHighlightColour(highlightColour);
- SetLightShadow(lightShadow);
- SetFaceColour(faceColour);
- SetMediumShadow(mediumShadow);
- SetDarkShadow(darkShadow);
- }
-
- // Draw a sunken edge
- void DrawSunkenEdge(wxDC& dc, const wxRect& rect, int borderSize = 1);
-
- // Tile a bitmap
- bool TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap);
-
-protected:
- wxColour m_highlightColour; // Usually white
- wxColour m_lightShadow; // Usually light grey
- wxColour m_faceColour; // Usually grey
- wxColour m_mediumShadow; // Usually dark grey
- wxColour m_darkShadow; // Usually black
-};
-
-#endif
diff --git a/desmume/src/windows/wx/include/wx/encconv.h b/desmume/src/windows/wx/include/wx/encconv.h
deleted file mode 100644
index 6a54439ee..000000000
--- a/desmume/src/windows/wx/include/wx/encconv.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/encconv.h
-// Purpose: wxEncodingConverter class for converting between different
-// font encodings
-// Author: Vaclav Slavik
-// Copyright: (c) 1999 Vaclav Slavik
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ENCCONV_H_
-#define _WX_ENCCONV_H_
-
-#include "wx/defs.h"
-
-#include "wx/object.h"
-#include "wx/fontenc.h"
-#include "wx/dynarray.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-enum
-{
- wxCONVERT_STRICT,
- wxCONVERT_SUBSTITUTE
-};
-
-
-enum
-{
- wxPLATFORM_CURRENT = -1,
-
- wxPLATFORM_UNIX = 0,
- wxPLATFORM_WINDOWS,
- wxPLATFORM_OS2,
- wxPLATFORM_MAC
-};
-
-// ----------------------------------------------------------------------------
-// types
-// ----------------------------------------------------------------------------
-
-WX_DEFINE_ARRAY_INT(wxFontEncoding, wxFontEncodingArray);
-
-//--------------------------------------------------------------------------------
-// wxEncodingConverter
-// This class is capable of converting strings between any two
-// 8bit encodings/charsets. It can also convert from/to Unicode
-//--------------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject
-{
- public:
-
- wxEncodingConverter();
- virtual ~wxEncodingConverter() { if (m_Table) delete[] m_Table; }
-
- // Initialize conversion. Both output or input encoding may
- // be wxFONTENCODING_UNICODE, but only if wxUSE_WCHAR_T is set to 1.
- //
- // All subsequent calls to Convert() will interpret it's argument
- // as a string in input_enc encoding and will output string in
- // output_enc encoding.
- //
- // You must call this method before calling Convert. You may call
- // it more than once in order to switch to another conversion
- //
- // Method affects behaviour of Convert() in case input character
- // cannot be converted because it does not exist in output encoding:
- // wxCONVERT_STRICT --
- // follow behaviour of GNU Recode - just copy unconvertable
- // characters to output and don't change them (it's integer
- // value will stay the same)
- // wxCONVERT_SUBSTITUTE --
- // try some (lossy) substitutions - e.g. replace
- // unconvertable latin capitals with acute by ordinary
- // capitals, replace en-dash or em-dash by '-' etc.
- // both modes gurantee that output string will have same length
- // as input string
- //
- // Returns false if given conversion is impossible, true otherwise
- // (conversion may be impossible either if you try to convert
- // to Unicode with non-Unicode build of wxWidgets or if input
- // or output encoding is not supported.)
- bool Init(wxFontEncoding input_enc, wxFontEncoding output_enc, int method = wxCONVERT_STRICT);
-
- // Convert input string according to settings passed to Init.
- // Note that you must call Init before using Convert!
- bool Convert(const char* input, char* output) const;
- bool Convert(char* str) const { return Convert(str, str); }
- wxString Convert(const wxString& input) const;
-
-#if wxUSE_WCHAR_T
- bool Convert(const char* input, wchar_t* output) const;
- bool Convert(const wchar_t* input, char* output) const;
- bool Convert(const wchar_t* input, wchar_t* output) const;
- bool Convert(wchar_t* str) const { return Convert(str, str); }
-#endif
- // Return equivalent(s) for given font that are used
- // under given platform. wxPLATFORM_CURRENT means the plaform
- // this binary was compiled for
- //
- // Examples:
- // current platform enc returned value
- // -----------------------------------------------------
- // unix CP1250 {ISO8859_2}
- // unix ISO8859_2 {}
- // windows ISO8859_2 {CP1250}
- //
- // Equivalence is defined in terms of convertibility:
- // 2 encodings are equivalent if you can convert text between
- // then without loosing information (it may - and will - happen
- // that you loose special chars like quotation marks or em-dashes
- // but you shouldn't loose any diacritics and language-specific
- // characters when converting between equivalent encodings).
- //
- // Convert() method is not limited to converting between
- // equivalent encodings, it can convert between arbitrary
- // two encodings!
- //
- // Remember that this function does _NOT_ check for presence of
- // fonts in system. It only tells you what are most suitable
- // encodings. (It usually returns only one encoding)
- //
- // Note that argument enc itself may be present in returned array!
- // (so that you can -- as a side effect -- detect whether the
- // encoding is native for this platform or not)
- static wxFontEncodingArray GetPlatformEquivalents(wxFontEncoding enc, int platform = wxPLATFORM_CURRENT);
-
- // Similar to GetPlatformEquivalent, but this one will return ALL
- // equivalent encodings, regardless the platform, including itself.
- static wxFontEncodingArray GetAllEquivalents(wxFontEncoding enc);
-
- // Return true if [any text in] one multibyte encoding can be
- // converted to another one losslessly.
- //
- // Do not call this with wxFONTENCODING_UNICODE, it doesn't make
- // sense (always works in one sense and always depends on the text
- // to convert in the other)
- static bool CanConvert(wxFontEncoding encIn, wxFontEncoding encOut)
- {
- return GetAllEquivalents(encIn).Index(encOut) != wxNOT_FOUND;
- }
-
- private:
-
-#if wxUSE_WCHAR_T
- wchar_t *m_Table;
-#else
- char *m_Table;
-#endif
- bool m_UnicodeInput, m_UnicodeOutput;
- bool m_JustCopy;
-
- DECLARE_NO_COPY_CLASS(wxEncodingConverter)
-};
-
-#endif // _WX_ENCCONV_H_
diff --git a/desmume/src/windows/wx/include/wx/encinfo.h b/desmume/src/windows/wx/include/wx/encinfo.h
deleted file mode 100644
index 99dbddb81..000000000
--- a/desmume/src/windows/wx/include/wx/encinfo.h
+++ /dev/null
@@ -1,74 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/encinfo.h
-// Purpose: declares wxNativeEncodingInfo struct
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 19.09.2003 (extracted from wx/fontenc.h)
-// RCS-ID: $Id: encinfo.h 40865 2006-08-27 09:42:42Z VS $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_ENCINFO_H_
-#define _WX_ENCINFO_H_
-
-#include "wx/string.h"
-
-// ----------------------------------------------------------------------------
-// wxNativeEncodingInfo contains all encoding parameters for this platform
-// ----------------------------------------------------------------------------
-
-// This private structure specifies all the parameters needed to create a font
-// with the given encoding on this platform.
-//
-// Under X, it contains the last 2 elements of the font specifications
-// (registry and encoding).
-//
-// Under Windows, it contains a number which is one of predefined CHARSET_XXX
-// values.
-//
-// Under all platforms it also contains a facename string which should be
-// used, if not empty, to create fonts in this encoding (this is the only way
-// to create a font of non-standard encoding (like KOI8) under Windows - the
-// facename specifies the encoding then)
-
-struct WXDLLEXPORT wxNativeEncodingInfo
-{
- wxString facename; // may be empty meaning "any"
-#ifndef __WXPALMOS__
- wxFontEncoding encoding; // so that we know what this struct represents
-
-#if defined(__WXMSW__) || \
- defined(__WXPM__) || \
- defined(__WXMAC__) || \
- defined(__WXCOCOA__) // FIXME: __WXCOCOA__
-
- wxNativeEncodingInfo()
- : facename()
- , encoding(wxFONTENCODING_SYSTEM)
- , charset(0) /* ANSI_CHARSET */
- { }
-
- int charset;
-#elif defined(_WX_X_FONTLIKE)
- wxString xregistry,
- xencoding;
-#elif defined(__WXGTK20__)
- // No way to specify this in Pango as this
- // seems to be handled internally.
-#elif defined(__WXMGL__)
- int mglEncoding;
-#elif defined(__WXDFB__)
- // DirectFB uses UTF-8 internally, doesn't use font encodings
-#else
- #error "Unsupported toolkit"
-#endif
-#endif // !__WXPALMOS__
- // this struct is saved in config by wxFontMapper, so it should know to
- // serialise itself (implemented in platform-specific code)
- bool FromString(const wxString& s);
- wxString ToString() const;
-};
-
-#endif // _WX_ENCINFO_H_
-
diff --git a/desmume/src/windows/wx/include/wx/event.h b/desmume/src/windows/wx/include/wx/event.h
deleted file mode 100644
index 26fab62c9..000000000
--- a/desmume/src/windows/wx/include/wx/event.h
+++ /dev/null
@@ -1,3116 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/event.h
-// Purpose: Event classes
-// Author: Julian Smart
-// Modified by:
-// Created: 01/02/97
-// RCS-ID: $Id: event.h 53135 2008-04-12 02:31:04Z VZ $
-// Copyright: (c) wxWidgets team
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_EVENT_H__
-#define _WX_EVENT_H__
-
-#include "wx/defs.h"
-#include "wx/cpp.h"
-#include "wx/object.h"
-#include "wx/clntdata.h"
-
-#if wxUSE_GUI
- #include "wx/gdicmn.h"
- #include "wx/cursor.h"
-#endif
-
-#include "wx/thread.h"
-
-#include "wx/dynarray.h"
-
-// ----------------------------------------------------------------------------
-// forward declarations
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_FWD_BASE wxList;
-
-#if wxUSE_GUI
- class WXDLLIMPEXP_FWD_CORE wxDC;
- class WXDLLIMPEXP_FWD_CORE wxMenu;
- class WXDLLIMPEXP_FWD_CORE wxWindow;
- class WXDLLIMPEXP_FWD_CORE wxWindowBase;
-#endif // wxUSE_GUI
-
-class WXDLLIMPEXP_FWD_BASE wxEvtHandler;
-
-// ----------------------------------------------------------------------------
-// Event types
-// ----------------------------------------------------------------------------
-
-typedef int wxEventType;
-
-// this is used to make the event table entry type safe, so that for an event
-// handler only a function with proper parameter list can be given.
-#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
-
-// in previous versions of wxWidgets the event types used to be constants
-// which created difficulties with custom/user event types definition
-//
-// starting from wxWidgets 2.4 the event types are now dynamically assigned
-// using wxNewEventType() which solves this problem, however at price of
-// several incompatibilities:
-//
-// a) event table macros declaration changed, it now uses wxEventTableEntry
-// ctor instead of initialisation from an agregate - the macro
-// DECLARE_EVENT_TABLE_ENTRY may be used to write code which can compile
-// with all versions of wxWidgets
-//
-// b) event types can't be used as switch() cases as they're not really
-// constant any more - there is no magic solution here, you just have to
-// change the switch()es to if()s
-//
-// if these are real problems for you, define WXWIN_COMPATIBILITY_EVENT_TYPES
-// as 1 to get 100% old behaviour, however you won't be able to use the
-// libraries using the new dynamic event type allocation in such case, so avoid
-// it if possible.
-#ifndef WXWIN_COMPATIBILITY_EVENT_TYPES
- #define WXWIN_COMPATIBILITY_EVENT_TYPES 0
-#endif
-
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
-
-#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
- { type, winid, idLast, fn, obj }
-
-#define BEGIN_DECLARE_EVENT_TYPES() enum {
-#define END_DECLARE_EVENT_TYPES() };
-#define DECLARE_EVENT_TYPE(name, value) name = wxEVT_FIRST + value,
-#define DECLARE_LOCAL_EVENT_TYPE(name, value) name = wxEVT_USER_FIRST + value,
-#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
- DECLARE_LOCAL_EVENT_TYPE(name, value)
-#define DEFINE_EVENT_TYPE(name)
-#define DEFINE_LOCAL_EVENT_TYPE(name)
-
-
-#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
-
-#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
- wxEventTableEntry(type, winid, idLast, fn, obj)
-
-#define BEGIN_DECLARE_EVENT_TYPES()
-#define END_DECLARE_EVENT_TYPES()
-#define DECLARE_EXPORTED_EVENT_TYPE(expdecl, name, value) \
- extern expdecl const wxEventType name;
-#define DECLARE_EVENT_TYPE(name, value) \
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, name, value)
-#define DECLARE_LOCAL_EVENT_TYPE(name, value) \
- DECLARE_EXPORTED_EVENT_TYPE(wxEMPTY_PARAMETER_VALUE, name, value)
-#define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType();
-#define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name)
-
-// generate a new unique event type
-extern WXDLLIMPEXP_BASE wxEventType wxNewEventType();
-
-#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
-
-BEGIN_DECLARE_EVENT_TYPES()
-
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
- wxEVT_NULL = 0,
- wxEVT_FIRST = 10000,
- wxEVT_USER_FIRST = wxEVT_FIRST + 2000,
-#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
- // it is important to still have these as constants to avoid
- // initialization order related problems
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_NULL, 0)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_FIRST, 10000)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_USER_FIRST, wxEVT_FIRST + 2000)
-#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
-
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_BUTTON_CLICKED, 1)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHECKBOX_CLICKED, 2)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHOICE_SELECTED, 3)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_SELECTED, 4)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 5)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 6)
- // now they are in wx/textctrl.h
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED, 7)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER, 8)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_URL, 13)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_MAXLEN, 14)
-#endif // WXWIN_COMPATIBILITY_EVENT_TYPES
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_MENU_SELECTED, 9)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_SLIDER_UPDATED, 10)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_RADIOBOX_SELECTED, 11)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_RADIOBUTTON_SELECTED, 12)
-
- // wxEVT_COMMAND_SCROLLBAR_UPDATED is now obsolete since we use
- // wxEVT_SCROLL... events
-
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_SCROLLBAR_UPDATED, 13)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_VLBOX_SELECTED, 14)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_COMBOBOX_SELECTED, 15)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_RCLICKED, 16)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOOL_ENTER, 17)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_SPINCTRL_UPDATED, 18)
-
- // Sockets and timers send events, too
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_SOCKET, 50)
- DECLARE_EVENT_TYPE(wxEVT_TIMER , 80)
-
- // Mouse event types
- DECLARE_EVENT_TYPE(wxEVT_LEFT_DOWN, 100)
- DECLARE_EVENT_TYPE(wxEVT_LEFT_UP, 101)
- DECLARE_EVENT_TYPE(wxEVT_MIDDLE_DOWN, 102)
- DECLARE_EVENT_TYPE(wxEVT_MIDDLE_UP, 103)
- DECLARE_EVENT_TYPE(wxEVT_RIGHT_DOWN, 104)
- DECLARE_EVENT_TYPE(wxEVT_RIGHT_UP, 105)
- DECLARE_EVENT_TYPE(wxEVT_MOTION, 106)
- DECLARE_EVENT_TYPE(wxEVT_ENTER_WINDOW, 107)
- DECLARE_EVENT_TYPE(wxEVT_LEAVE_WINDOW, 108)
- DECLARE_EVENT_TYPE(wxEVT_LEFT_DCLICK, 109)
- DECLARE_EVENT_TYPE(wxEVT_MIDDLE_DCLICK, 110)
- DECLARE_EVENT_TYPE(wxEVT_RIGHT_DCLICK, 111)
- DECLARE_EVENT_TYPE(wxEVT_SET_FOCUS, 112)
- DECLARE_EVENT_TYPE(wxEVT_KILL_FOCUS, 113)
- DECLARE_EVENT_TYPE(wxEVT_CHILD_FOCUS, 114)
- DECLARE_EVENT_TYPE(wxEVT_MOUSEWHEEL, 115)
-
- // Non-client mouse events
- DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_DOWN, 200)
- DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_UP, 201)
- DECLARE_EVENT_TYPE(wxEVT_NC_MIDDLE_DOWN, 202)
- DECLARE_EVENT_TYPE(wxEVT_NC_MIDDLE_UP, 203)
- DECLARE_EVENT_TYPE(wxEVT_NC_RIGHT_DOWN, 204)
- DECLARE_EVENT_TYPE(wxEVT_NC_RIGHT_UP, 205)
- DECLARE_EVENT_TYPE(wxEVT_NC_MOTION, 206)
- DECLARE_EVENT_TYPE(wxEVT_NC_ENTER_WINDOW, 207)
- DECLARE_EVENT_TYPE(wxEVT_NC_LEAVE_WINDOW, 208)
- DECLARE_EVENT_TYPE(wxEVT_NC_LEFT_DCLICK, 209)
- DECLARE_EVENT_TYPE(wxEVT_NC_MIDDLE_DCLICK, 210)
- DECLARE_EVENT_TYPE(wxEVT_NC_RIGHT_DCLICK, 211)
-
- // Character input event type
- DECLARE_EVENT_TYPE(wxEVT_CHAR, 212)
- DECLARE_EVENT_TYPE(wxEVT_CHAR_HOOK, 213)
- DECLARE_EVENT_TYPE(wxEVT_NAVIGATION_KEY, 214)
- DECLARE_EVENT_TYPE(wxEVT_KEY_DOWN, 215)
- DECLARE_EVENT_TYPE(wxEVT_KEY_UP, 216)
-#if wxUSE_HOTKEY
- DECLARE_EVENT_TYPE(wxEVT_HOTKEY, 217)
-#endif
- // Set cursor event
- DECLARE_EVENT_TYPE(wxEVT_SET_CURSOR, 230)
-
- // wxScrollBar and wxSlider event identifiers
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_TOP, 300)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_BOTTOM, 301)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_LINEUP, 302)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_LINEDOWN, 303)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_PAGEUP, 304)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_PAGEDOWN, 305)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK, 306)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE, 307)
- DECLARE_EVENT_TYPE(wxEVT_SCROLL_CHANGED, 308)
-
- // Scroll events from wxWindow
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP, 320)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_BOTTOM, 321)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_LINEUP, 322)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_LINEDOWN, 323)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_PAGEUP, 324)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_PAGEDOWN, 325)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_THUMBTRACK, 326)
- DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_THUMBRELEASE, 327)
-
- // System events
- DECLARE_EVENT_TYPE(wxEVT_SIZE, 400)
- DECLARE_EVENT_TYPE(wxEVT_MOVE, 401)
- DECLARE_EVENT_TYPE(wxEVT_CLOSE_WINDOW, 402)
- DECLARE_EVENT_TYPE(wxEVT_END_SESSION, 403)
- DECLARE_EVENT_TYPE(wxEVT_QUERY_END_SESSION, 404)
- DECLARE_EVENT_TYPE(wxEVT_ACTIVATE_APP, 405)
- // 406..408 are power events
- DECLARE_EVENT_TYPE(wxEVT_ACTIVATE, 409)
- DECLARE_EVENT_TYPE(wxEVT_CREATE, 410)
- DECLARE_EVENT_TYPE(wxEVT_DESTROY, 411)
- DECLARE_EVENT_TYPE(wxEVT_SHOW, 412)
- DECLARE_EVENT_TYPE(wxEVT_ICONIZE, 413)
- DECLARE_EVENT_TYPE(wxEVT_MAXIMIZE, 414)
- DECLARE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_CHANGED, 415)
- DECLARE_EVENT_TYPE(wxEVT_MOUSE_CAPTURE_LOST, 416)
- DECLARE_EVENT_TYPE(wxEVT_PAINT, 417)
- DECLARE_EVENT_TYPE(wxEVT_ERASE_BACKGROUND, 418)
- DECLARE_EVENT_TYPE(wxEVT_NC_PAINT, 419)
- DECLARE_EVENT_TYPE(wxEVT_PAINT_ICON, 420)
- DECLARE_EVENT_TYPE(wxEVT_MENU_OPEN, 421)
- DECLARE_EVENT_TYPE(wxEVT_MENU_CLOSE, 422)
- DECLARE_EVENT_TYPE(wxEVT_MENU_HIGHLIGHT, 423)
- DECLARE_EVENT_TYPE(wxEVT_CONTEXT_MENU, 424)
- DECLARE_EVENT_TYPE(wxEVT_SYS_COLOUR_CHANGED, 425)
- DECLARE_EVENT_TYPE(wxEVT_DISPLAY_CHANGED, 426)
- DECLARE_EVENT_TYPE(wxEVT_SETTING_CHANGED, 427)
- DECLARE_EVENT_TYPE(wxEVT_QUERY_NEW_PALETTE, 428)
- DECLARE_EVENT_TYPE(wxEVT_PALETTE_CHANGED, 429)
- DECLARE_EVENT_TYPE(wxEVT_JOY_BUTTON_DOWN, 430)
- DECLARE_EVENT_TYPE(wxEVT_JOY_BUTTON_UP, 431)
- DECLARE_EVENT_TYPE(wxEVT_JOY_MOVE, 432)
- DECLARE_EVENT_TYPE(wxEVT_JOY_ZMOVE, 433)
- DECLARE_EVENT_TYPE(wxEVT_DROP_FILES, 434)
- DECLARE_EVENT_TYPE(wxEVT_DRAW_ITEM, 435)
- DECLARE_EVENT_TYPE(wxEVT_MEASURE_ITEM, 436)
- DECLARE_EVENT_TYPE(wxEVT_COMPARE_ITEM, 437)
- DECLARE_EVENT_TYPE(wxEVT_INIT_DIALOG, 438)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_BASE, wxEVT_IDLE, 439)
- DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 440)
- DECLARE_EVENT_TYPE(wxEVT_SIZING, 441)
- DECLARE_EVENT_TYPE(wxEVT_MOVING, 442)
- DECLARE_EVENT_TYPE(wxEVT_HIBERNATE, 443)
- // more power events follow -- see wx/power.h
-
- // Clipboard events
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_COPY, 444)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_CUT, 445)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_PASTE, 446)
-
- // Generic command events
- // Note: a click is a higher-level event than button down/up
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_LEFT_CLICK, 500)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_LEFT_DCLICK, 501)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_RIGHT_CLICK, 502)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_RIGHT_DCLICK, 503)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_SET_FOCUS, 504)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_KILL_FOCUS, 505)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_ENTER, 506)
-
- // Help events
- DECLARE_EVENT_TYPE(wxEVT_HELP, 1050)
- DECLARE_EVENT_TYPE(wxEVT_DETAILED_HELP, 1051)
-
-END_DECLARE_EVENT_TYPES()
-
-// these 2 events are the same
-#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED
-
-// ----------------------------------------------------------------------------
-// Compatibility
-// ----------------------------------------------------------------------------
-
-// this event is also used by wxComboBox and wxSpinCtrl which don't include
-// wx/textctrl.h in all ports [yet], so declare it here as well
-//
-// still, any new code using it should include wx/textctrl.h explicitly
-#if !WXWIN_COMPATIBILITY_EVENT_TYPES
- extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
-#endif
-
-// the predefined constants for the number of times we propagate event
-// upwards window child-parent chain
-enum Propagation_state
-{
- // don't propagate it at all
- wxEVENT_PROPAGATE_NONE = 0,
-
- // propagate it until it is processed
- wxEVENT_PROPAGATE_MAX = INT_MAX
-};
-
-/*
- * wxWidgets events, covering all interesting things that might happen
- * (button clicking, resizing, setting text in widgets, etc.).
- *
- * For each completely new event type, derive a new event class.
- * An event CLASS represents a C++ class defining a range of similar event TYPES;
- * examples are canvas events, panel item command events.
- * An event TYPE is a unique identifier for a particular system event,
- * such as a button press or a listbox deselection.
- *
- */
-
-class WXDLLIMPEXP_BASE wxEvent : public wxObject
-{
-private:
- wxEvent& operator=(const wxEvent&);
-
-protected:
- wxEvent(const wxEvent&); // for implementing Clone()
-
-public:
- wxEvent(int winid = 0, wxEventType commandType = wxEVT_NULL );
-
- void SetEventType(wxEventType typ) { m_eventType = typ; }
- wxEventType GetEventType() const { return m_eventType; }
- wxObject *GetEventObject() const { return m_eventObject; }
- void SetEventObject(wxObject *obj) { m_eventObject = obj; }
- long GetTimestamp() const { return m_timeStamp; }
- void SetTimestamp(long ts = 0) { m_timeStamp = ts; }
- int GetId() const { return m_id; }
- void SetId(int Id) { m_id = Id; }
-
- // Can instruct event processor that we wish to ignore this event
- // (treat as if the event table entry had not been found): this must be done
- // to allow the event processing by the base classes (calling event.Skip()
- // is the analog of calling the base class version of a virtual function)
- void Skip(bool skip = true) { m_skipped = skip; }
- bool GetSkipped() const { return m_skipped; }
-
- // this function is used to create a copy of the event polymorphically and
- // all derived classes must implement it because otherwise wxPostEvent()
- // for them wouldn't work (it needs to do a copy of the event)
- virtual wxEvent *Clone() const = 0;
-
- // Implementation only: this test is explicitly anti OO and this function
- // exists only for optimization purposes.
- bool IsCommandEvent() const { return m_isCommandEvent; }
-
- // Determine if this event should be propagating to the parent window.
- bool ShouldPropagate() const
- { return m_propagationLevel != wxEVENT_PROPAGATE_NONE; }
-
- // Stop an event from propagating to its parent window, returns the old
- // propagation level value
- int StopPropagation()
- {
- int propagationLevel = m_propagationLevel;
- m_propagationLevel = wxEVENT_PROPAGATE_NONE;
- return propagationLevel;
- }
-
- // Resume the event propagation by restoring the propagation level
- // (returned by StopPropagation())
- void ResumePropagation(int propagationLevel)
- {
- m_propagationLevel = propagationLevel;
- }
-
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
-protected:
-#endif
- wxObject* m_eventObject;
- wxEventType m_eventType;
- long m_timeStamp;
- int m_id;
-
-public:
- // m_callbackUserData is for internal usage only
- wxObject* m_callbackUserData;
-
-protected:
- // the propagation level: while it is positive, we propagate the event to
- // the parent window (if any)
- //
- // this one doesn't have to be public, we don't have to worry about
- // backwards compatibility as it is new
- int m_propagationLevel;
-
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
-protected:
-#endif
- bool m_skipped;
- bool m_isCommandEvent;
-
-private:
- // it needs to access our m_propagationLevel
- friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce;
-
- DECLARE_ABSTRACT_CLASS(wxEvent)
-};
-
-/*
- * Helper class to temporarily change an event not to propagate.
- */
-class WXDLLIMPEXP_BASE wxPropagationDisabler
-{
-public:
- wxPropagationDisabler(wxEvent& event) : m_event(event)
- {
- m_propagationLevelOld = m_event.StopPropagation();
- }
-
- ~wxPropagationDisabler()
- {
- m_event.ResumePropagation(m_propagationLevelOld);
- }
-
-private:
- wxEvent& m_event;
- int m_propagationLevelOld;
-
- DECLARE_NO_COPY_CLASS(wxPropagationDisabler)
-};
-
-/*
- * Another one to temporarily lower propagation level.
- */
-class WXDLLIMPEXP_BASE wxPropagateOnce
-{
-public:
- wxPropagateOnce(wxEvent& event) : m_event(event)
- {
- wxASSERT_MSG( m_event.m_propagationLevel > 0,
- _T("shouldn't be used unless ShouldPropagate()!") );
-
- m_event.m_propagationLevel--;
- }
-
- ~wxPropagateOnce()
- {
- m_event.m_propagationLevel++;
- }
-
-private:
- wxEvent& m_event;
-
- DECLARE_NO_COPY_CLASS(wxPropagateOnce)
-};
-
-#if wxUSE_GUI
-
-
-// Item or menu event class
-/*
- wxEVT_COMMAND_BUTTON_CLICKED
- wxEVT_COMMAND_CHECKBOX_CLICKED
- wxEVT_COMMAND_CHOICE_SELECTED
- wxEVT_COMMAND_LISTBOX_SELECTED
- wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
- wxEVT_COMMAND_TEXT_UPDATED
- wxEVT_COMMAND_TEXT_ENTER
- wxEVT_COMMAND_MENU_SELECTED
- wxEVT_COMMAND_SLIDER_UPDATED
- wxEVT_COMMAND_RADIOBOX_SELECTED
- wxEVT_COMMAND_RADIOBUTTON_SELECTED
- wxEVT_COMMAND_SCROLLBAR_UPDATED
- wxEVT_COMMAND_VLBOX_SELECTED
- wxEVT_COMMAND_COMBOBOX_SELECTED
- wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
-*/
-
-#if WXWIN_COMPATIBILITY_2_4
-// Backwards compatibility for wxCommandEvent::m_commandString, will lead to compilation errors in some cases of usage
-class WXDLLIMPEXP_CORE wxCommandEvent;
-
-class WXDLLIMPEXP_CORE wxCommandEventStringHelper
-{
-public:
- wxCommandEventStringHelper(wxCommandEvent * evt)
- : m_evt(evt)
- { }
-
- void operator=(const wxString &str);
- operator wxString();
- const wxChar* c_str() const;
-
-private:
- wxCommandEvent* m_evt;
-};
-#endif
-
-class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent
-{
-public:
- wxCommandEvent(wxEventType commandType = wxEVT_NULL, int winid = 0);
-
- wxCommandEvent(const wxCommandEvent& event)
- : wxEvent(event),
-#if WXWIN_COMPATIBILITY_2_4
- m_commandString(this),
-#endif
- m_cmdString(event.m_cmdString),
- m_commandInt(event.m_commandInt),
- m_extraLong(event.m_extraLong),
- m_clientData(event.m_clientData),
- m_clientObject(event.m_clientObject)
- { }
-
- // Set/Get client data from controls
- void SetClientData(void* clientData) { m_clientData = clientData; }
- void *GetClientData() const { return m_clientData; }
-
- // Set/Get client object from controls
- void SetClientObject(wxClientData* clientObject) { m_clientObject = clientObject; }
- wxClientData *GetClientObject() const { return m_clientObject; }
-
- // Get listbox selection if single-choice
- int GetSelection() const { return m_commandInt; }
-
- // Set/Get listbox/choice selection string
- void SetString(const wxString& s) { m_cmdString = s; }
- wxString GetString() const;
-
- // Get checkbox value
- bool IsChecked() const { return m_commandInt != 0; }
-
- // true if the listbox event was a selection.
- bool IsSelection() const { return (m_extraLong != 0); }
-
- void SetExtraLong(long extraLong) { m_extraLong = extraLong; }
- long GetExtraLong() const { return m_extraLong; }
-
- void SetInt(int i) { m_commandInt = i; }
- int GetInt() const { return m_commandInt; }
-
- virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
-
-#if WXWIN_COMPATIBILITY_2_4
-public:
- wxCommandEventStringHelper m_commandString;
-#else
-protected:
-#endif
- wxString m_cmdString; // String event argument
- int m_commandInt;
- long m_extraLong; // Additional information (e.g. select/deselect)
- void* m_clientData; // Arbitrary client data
- wxClientData* m_clientObject; // Arbitrary client object
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent)
-};
-
-#if WXWIN_COMPATIBILITY_2_4
-inline void wxCommandEventStringHelper::operator=(const wxString &str)
-{
- m_evt->SetString(str);
-}
-
-inline wxCommandEventStringHelper::operator wxString()
-{
- return m_evt->GetString();
-}
-
-inline const wxChar* wxCommandEventStringHelper::c_str() const
-{
- return m_evt->GetString().c_str();
-}
-#endif
-
-// this class adds a possibility to react (from the user) code to a control
-// notification: allow or veto the operation being reported.
-class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent
-{
-public:
- wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
- : wxCommandEvent(commandType, winid)
- { m_bAllow = true; }
-
- wxNotifyEvent(const wxNotifyEvent& event)
- : wxCommandEvent(event)
- { m_bAllow = event.m_bAllow; }
-
- // veto the operation (usually it's allowed by default)
- void Veto() { m_bAllow = false; }
-
- // allow the operation if it was disabled by default
- void Allow() { m_bAllow = true; }
-
- // for implementation code only: is the operation allowed?
- bool IsAllowed() const { return m_bAllow; }
-
- virtual wxEvent *Clone() const { return new wxNotifyEvent(*this); }
-
-private:
- bool m_bAllow;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNotifyEvent)
-};
-
-// Scroll event class, derived form wxCommandEvent. wxScrollEvents are
-// sent by wxSlider and wxScrollBar.
-/*
- wxEVT_SCROLL_TOP
- wxEVT_SCROLL_BOTTOM
- wxEVT_SCROLL_LINEUP
- wxEVT_SCROLL_LINEDOWN
- wxEVT_SCROLL_PAGEUP
- wxEVT_SCROLL_PAGEDOWN
- wxEVT_SCROLL_THUMBTRACK
- wxEVT_SCROLL_THUMBRELEASE
- wxEVT_SCROLL_CHANGED
-*/
-
-class WXDLLIMPEXP_CORE wxScrollEvent : public wxCommandEvent
-{
-public:
- wxScrollEvent(wxEventType commandType = wxEVT_NULL,
- int winid = 0, int pos = 0, int orient = 0);
-
- int GetOrientation() const { return (int) m_extraLong; }
- int GetPosition() const { return m_commandInt; }
- void SetOrientation(int orient) { m_extraLong = (long) orient; }
- void SetPosition(int pos) { m_commandInt = pos; }
-
- virtual wxEvent *Clone() const { return new wxScrollEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollEvent)
-};
-
-// ScrollWin event class, derived fom wxEvent. wxScrollWinEvents
-// are sent by wxWindow.
-/*
- wxEVT_SCROLLWIN_TOP
- wxEVT_SCROLLWIN_BOTTOM
- wxEVT_SCROLLWIN_LINEUP
- wxEVT_SCROLLWIN_LINEDOWN
- wxEVT_SCROLLWIN_PAGEUP
- wxEVT_SCROLLWIN_PAGEDOWN
- wxEVT_SCROLLWIN_THUMBTRACK
- wxEVT_SCROLLWIN_THUMBRELEASE
-*/
-
-class WXDLLIMPEXP_CORE wxScrollWinEvent : public wxEvent
-{
-public:
- wxScrollWinEvent(wxEventType commandType = wxEVT_NULL,
- int pos = 0, int orient = 0);
- wxScrollWinEvent(const wxScrollWinEvent & event) : wxEvent(event)
- { m_commandInt = event.m_commandInt;
- m_extraLong = event.m_extraLong; }
-
- int GetOrientation() const { return (int) m_extraLong; }
- int GetPosition() const { return m_commandInt; }
- void SetOrientation(int orient) { m_extraLong = (long) orient; }
- void SetPosition(int pos) { m_commandInt = pos; }
-
- virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); }
-
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
-protected:
-#endif
- int m_commandInt;
- long m_extraLong;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxScrollWinEvent)
-};
-
-// Mouse event class
-
-/*
- wxEVT_LEFT_DOWN
- wxEVT_LEFT_UP
- wxEVT_MIDDLE_DOWN
- wxEVT_MIDDLE_UP
- wxEVT_RIGHT_DOWN
- wxEVT_RIGHT_UP
- wxEVT_MOTION
- wxEVT_ENTER_WINDOW
- wxEVT_LEAVE_WINDOW
- wxEVT_LEFT_DCLICK
- wxEVT_MIDDLE_DCLICK
- wxEVT_RIGHT_DCLICK
- wxEVT_NC_LEFT_DOWN
- wxEVT_NC_LEFT_UP,
- wxEVT_NC_MIDDLE_DOWN,
- wxEVT_NC_MIDDLE_UP,
- wxEVT_NC_RIGHT_DOWN,
- wxEVT_NC_RIGHT_UP,
- wxEVT_NC_MOTION,
- wxEVT_NC_ENTER_WINDOW,
- wxEVT_NC_LEAVE_WINDOW,
- wxEVT_NC_LEFT_DCLICK,
- wxEVT_NC_MIDDLE_DCLICK,
- wxEVT_NC_RIGHT_DCLICK,
-*/
-
-// the symbolic names for the mouse buttons
-enum
-{
- wxMOUSE_BTN_ANY = -1,
- wxMOUSE_BTN_NONE = 0,
- wxMOUSE_BTN_LEFT = 1,
- wxMOUSE_BTN_MIDDLE = 2,
- wxMOUSE_BTN_RIGHT = 3
-};
-
-class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent
-{
-public:
- wxMouseEvent(wxEventType mouseType = wxEVT_NULL);
- wxMouseEvent(const wxMouseEvent& event) : wxEvent(event)
- { Assign(event); }
-
- // Was it a button event? (*doesn't* mean: is any button *down*?)
- bool IsButton() const { return Button(wxMOUSE_BTN_ANY); }
-
- // Was it a down event from this (or any) button?
- bool ButtonDown(int but = wxMOUSE_BTN_ANY) const;
-
- // Was it a dclick event from this (or any) button?
- bool ButtonDClick(int but = wxMOUSE_BTN_ANY) const;
-
- // Was it a up event from this (or any) button?
- bool ButtonUp(int but = wxMOUSE_BTN_ANY) const;
-
- // Was the given button?
- bool Button(int but) const;
-
- // Was the given button in Down state?
- bool ButtonIsDown(int but) const;
-
- // Get the button which is changing state (wxMOUSE_BTN_NONE if none)
- int GetButton() const;
-
- // Find state of shift/control keys
- bool ControlDown() const { return m_controlDown; }
- bool MetaDown() const { return m_metaDown; }
- bool AltDown() const { return m_altDown; }
- bool ShiftDown() const { return m_shiftDown; }
- bool CmdDown() const
- {
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- return MetaDown();
-#else
- return ControlDown();
-#endif
- }
-
- // Find which event was just generated
- bool LeftDown() const { return (m_eventType == wxEVT_LEFT_DOWN); }
- bool MiddleDown() const { return (m_eventType == wxEVT_MIDDLE_DOWN); }
- bool RightDown() const { return (m_eventType == wxEVT_RIGHT_DOWN); }
-
- bool LeftUp() const { return (m_eventType == wxEVT_LEFT_UP); }
- bool MiddleUp() const { return (m_eventType == wxEVT_MIDDLE_UP); }
- bool RightUp() const { return (m_eventType == wxEVT_RIGHT_UP); }
-
- bool LeftDClick() const { return (m_eventType == wxEVT_LEFT_DCLICK); }
- bool MiddleDClick() const { return (m_eventType == wxEVT_MIDDLE_DCLICK); }
- bool RightDClick() const { return (m_eventType == wxEVT_RIGHT_DCLICK); }
-
- // Find the current state of the mouse buttons (regardless
- // of current event type)
- bool LeftIsDown() const { return m_leftDown; }
- bool MiddleIsDown() const { return m_middleDown; }
- bool RightIsDown() const { return m_rightDown; }
-
- // True if a button is down and the mouse is moving
- bool Dragging() const
- {
- return (m_eventType == wxEVT_MOTION) && ButtonIsDown(wxMOUSE_BTN_ANY);
- }
-
- // True if the mouse is moving, and no button is down
- bool Moving() const
- {
- return (m_eventType == wxEVT_MOTION) && !ButtonIsDown(wxMOUSE_BTN_ANY);
- }
-
- // True if the mouse is just entering the window
- bool Entering() const { return (m_eventType == wxEVT_ENTER_WINDOW); }
-
- // True if the mouse is just leaving the window
- bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
-
- // Find the position of the event
- void GetPosition(wxCoord *xpos, wxCoord *ypos) const
- {
- if (xpos)
- *xpos = m_x;
- if (ypos)
- *ypos = m_y;
- }
-
- void GetPosition(long *xpos, long *ypos) const
- {
- if (xpos)
- *xpos = (long)m_x;
- if (ypos)
- *ypos = (long)m_y;
- }
-
- // Find the position of the event
- wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
-
- // Find the logical position of the event given the DC
- wxPoint GetLogicalPosition(const wxDC& dc) const;
-
- // Get X position
- wxCoord GetX() const { return m_x; }
-
- // Get Y position
- wxCoord GetY() const { return m_y; }
-
- // Get wheel rotation, positive or negative indicates direction of
- // rotation. Current devices all send an event when rotation is equal to
- // +/-WheelDelta, but this allows for finer resolution devices to be
- // created in the future. Because of this you shouldn't assume that one
- // event is equal to 1 line or whatever, but you should be able to either
- // do partial line scrolling or wait until +/-WheelDelta rotation values
- // have been accumulated before scrolling.
- int GetWheelRotation() const { return m_wheelRotation; }
-
- // Get wheel delta, normally 120. This is the threshold for action to be
- // taken, and one such action (for example, scrolling one increment)
- // should occur for each delta.
- int GetWheelDelta() const { return m_wheelDelta; }
-
- // Returns the configured number of lines (or whatever) to be scrolled per
- // wheel action. Defaults to one.
- int GetLinesPerAction() const { return m_linesPerAction; }
-
- // Is the system set to do page scrolling?
- bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); }
-
- virtual wxEvent *Clone() const { return new wxMouseEvent(*this); }
-
- wxMouseEvent& operator=(const wxMouseEvent& event) { Assign(event); return *this; }
-
-public:
- wxCoord m_x, m_y;
-
- bool m_leftDown;
- bool m_middleDown;
- bool m_rightDown;
-
- bool m_controlDown;
- bool m_shiftDown;
- bool m_altDown;
- bool m_metaDown;
-
- int m_wheelRotation;
- int m_wheelDelta;
- int m_linesPerAction;
-
-protected:
- void Assign(const wxMouseEvent& evt);
-
-private:
- DECLARE_DYNAMIC_CLASS(wxMouseEvent)
-};
-
-// Cursor set event
-
-/*
- wxEVT_SET_CURSOR
- */
-
-class WXDLLIMPEXP_CORE wxSetCursorEvent : public wxEvent
-{
-public:
- wxSetCursorEvent(wxCoord x = 0, wxCoord y = 0)
- : wxEvent(0, wxEVT_SET_CURSOR),
- m_x(x), m_y(y), m_cursor()
- { }
-
- wxSetCursorEvent(const wxSetCursorEvent & event)
- : wxEvent(event),
- m_x(event.m_x),
- m_y(event.m_y),
- m_cursor(event.m_cursor)
- { }
-
- wxCoord GetX() const { return m_x; }
- wxCoord GetY() const { return m_y; }
-
- void SetCursor(const wxCursor& cursor) { m_cursor = cursor; }
- const wxCursor& GetCursor() const { return m_cursor; }
- bool HasCursor() const { return m_cursor.Ok(); }
-
- virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); }
-
-private:
- wxCoord m_x, m_y;
- wxCursor m_cursor;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSetCursorEvent)
-};
-
-// Keyboard input event class
-
-/*
- wxEVT_CHAR
- wxEVT_CHAR_HOOK
- wxEVT_KEY_DOWN
- wxEVT_KEY_UP
- wxEVT_HOTKEY
- */
-
-class WXDLLIMPEXP_CORE wxKeyEvent : public wxEvent
-{
-public:
- wxKeyEvent(wxEventType keyType = wxEVT_NULL);
- wxKeyEvent(const wxKeyEvent& evt);
-
- // can be used check if the key event has exactly the given modifiers:
- // "GetModifiers() = wxMOD_CONTROL" is easier to write than "ControlDown()
- // && !MetaDown() && !AltDown() && !ShiftDown()"
- int GetModifiers() const
- {
- return (m_controlDown ? wxMOD_CONTROL : 0) |
- (m_shiftDown ? wxMOD_SHIFT : 0) |
- (m_metaDown ? wxMOD_META : 0) |
- (m_altDown ? wxMOD_ALT : 0);
- }
-
- // Find state of shift/control keys
- bool ControlDown() const { return m_controlDown; }
- bool ShiftDown() const { return m_shiftDown; }
- bool MetaDown() const { return m_metaDown; }
- bool AltDown() const { return m_altDown; }
-
- // "Cmd" is a pseudo key which is Control for PC and Unix platforms but
- // Apple ("Command") key under Macs: it makes often sense to use it instead
- // of, say, ControlDown() because Cmd key is used for the same thing under
- // Mac as Ctrl elsewhere (but Ctrl still exists, just not used for this
- // purpose under Mac)
- bool CmdDown() const
- {
-#if defined(__WXMAC__) || defined(__WXCOCOA__)
- return MetaDown();
-#else
- return ControlDown();
-#endif
- }
-
- // exclude MetaDown() from HasModifiers() because NumLock under X is often
- // configured as mod2 modifier, yet the key events even when it is pressed
- // should be processed normally, not like Ctrl- or Alt-key
- bool HasModifiers() const { return ControlDown() || AltDown(); }
-
- // get the key code: an ASCII7 char or an element of wxKeyCode enum
- int GetKeyCode() const { return (int)m_keyCode; }
-
-#if wxUSE_UNICODE
- // get the Unicode character corresponding to this key
- wxChar GetUnicodeKey() const { return m_uniChar; }
-#endif // wxUSE_UNICODE
-
- // get the raw key code (platform-dependent)
- wxUint32 GetRawKeyCode() const { return m_rawCode; }
-
- // get the raw key flags (platform-dependent)
- wxUint32 GetRawKeyFlags() const { return m_rawFlags; }
-
- // Find the position of the event
- void GetPosition(wxCoord *xpos, wxCoord *ypos) const
- {
- if (xpos) *xpos = m_x;
- if (ypos) *ypos = m_y;
- }
-
- void GetPosition(long *xpos, long *ypos) const
- {
- if (xpos) *xpos = (long)m_x;
- if (ypos) *ypos = (long)m_y;
- }
-
- wxPoint GetPosition() const
- { return wxPoint(m_x, m_y); }
-
- // Get X position
- wxCoord GetX() const { return m_x; }
-
- // Get Y position
- wxCoord GetY() const { return m_y; }
-
-#if WXWIN_COMPATIBILITY_2_6
- // deprecated, Use GetKeyCode instead.
- wxDEPRECATED( long KeyCode() const );
-#endif // WXWIN_COMPATIBILITY_2_6
-
- virtual wxEvent *Clone() const { return new wxKeyEvent(*this); }
-
- // we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for
- // example)
- wxKeyEvent& operator=(const wxKeyEvent& evt)
- {
- m_x = evt.m_x;
- m_y = evt.m_y;
-
- m_keyCode = evt.m_keyCode;
-
- m_controlDown = evt.m_controlDown;
- m_shiftDown = evt.m_shiftDown;
- m_altDown = evt.m_altDown;
- m_metaDown = evt.m_metaDown;
- m_scanCode = evt.m_scanCode;
- m_rawCode = evt.m_rawCode;
- m_rawFlags = evt.m_rawFlags;
-#if wxUSE_UNICODE
- m_uniChar = evt.m_uniChar;
-#endif
-
- return *this;
- }
-
-public:
- wxCoord m_x, m_y;
-
- long m_keyCode;
-
- // TODO: replace those with a single m_modifiers bitmask of wxMOD_XXX?
- bool m_controlDown;
- bool m_shiftDown;
- bool m_altDown;
- bool m_metaDown;
-
- // FIXME: what is this for? relation to m_rawXXX?
- bool m_scanCode;
-
-#if wxUSE_UNICODE
- // This contains the full Unicode character
- // in a character events in Unicode mode
- wxChar m_uniChar;
-#endif
-
- // these fields contain the platform-specific information about
- // key that was pressed
- wxUint32 m_rawCode;
- wxUint32 m_rawFlags;
-
-private:
- DECLARE_DYNAMIC_CLASS(wxKeyEvent)
-};
-
-// Size event class
-/*
- wxEVT_SIZE
- */
-
-class WXDLLIMPEXP_CORE wxSizeEvent : public wxEvent
-{
-public:
- wxSizeEvent() : wxEvent(0, wxEVT_SIZE)
- { }
- wxSizeEvent(const wxSize& sz, int winid = 0)
- : wxEvent(winid, wxEVT_SIZE),
- m_size(sz)
- { }
- wxSizeEvent(const wxSizeEvent & event)
- : wxEvent(event),
- m_size(event.m_size), m_rect(event.m_rect)
- { }
- wxSizeEvent(const wxRect& rect, int id = 0)
- : m_size(rect.GetSize()), m_rect(rect)
- { m_eventType = wxEVT_SIZING; m_id = id; }
-
- wxSize GetSize() const { return m_size; }
- wxRect GetRect() const { return m_rect; }
- void SetRect(const wxRect& rect) { m_rect = rect; }
-
- virtual wxEvent *Clone() const { return new wxSizeEvent(*this); }
-
-public:
- // For internal usage only. Will be converted to protected members.
- wxSize m_size;
- wxRect m_rect; // Used for wxEVT_SIZING
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSizeEvent)
-};
-
-// Move event class
-
-/*
- wxEVT_MOVE
- */
-
-class WXDLLIMPEXP_CORE wxMoveEvent : public wxEvent
-{
-public:
- wxMoveEvent()
- : wxEvent(0, wxEVT_MOVE)
- { }
- wxMoveEvent(const wxPoint& pos, int winid = 0)
- : wxEvent(winid, wxEVT_MOVE),
- m_pos(pos)
- { }
- wxMoveEvent(const wxMoveEvent& event)
- : wxEvent(event),
- m_pos(event.m_pos)
- { }
- wxMoveEvent(const wxRect& rect, int id = 0)
- : m_pos(rect.GetPosition()), m_rect(rect)
- { m_eventType = wxEVT_MOVING; m_id = id; }
-
- wxPoint GetPosition() const { return m_pos; }
- void SetPosition(const wxPoint& pos) { m_pos = pos; }
- wxRect GetRect() const { return m_rect; }
- void SetRect(const wxRect& rect) { m_rect = rect; }
-
- virtual wxEvent *Clone() const { return new wxMoveEvent(*this); }
-
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
-protected:
-#endif
- wxPoint m_pos;
- wxRect m_rect;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMoveEvent)
-};
-
-// Paint event class
-/*
- wxEVT_PAINT
- wxEVT_NC_PAINT
- wxEVT_PAINT_ICON
- */
-
-#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__))
- // see comments in src/msw|os2/dcclient.cpp where g_isPainting is defined
- extern WXDLLIMPEXP_CORE int g_isPainting;
-#endif // debug
-
-class WXDLLIMPEXP_CORE wxPaintEvent : public wxEvent
-{
-public:
- wxPaintEvent(int Id = 0)
- : wxEvent(Id, wxEVT_PAINT)
- {
-#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__))
- // set the internal flag for the duration of processing of WM_PAINT
- g_isPainting++;
-#endif // debug
- }
-
- // default copy ctor and dtor are normally fine, we only need them to keep
- // g_isPainting updated in debug build
-#if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__))
- wxPaintEvent(const wxPaintEvent& event)
- : wxEvent(event)
- {
- g_isPainting++;
- }
-
- virtual ~wxPaintEvent()
- {
- g_isPainting--;
- }
-#endif // debug
-
- virtual wxEvent *Clone() const { return new wxPaintEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaintEvent)
-};
-
-class WXDLLIMPEXP_CORE wxNcPaintEvent : public wxEvent
-{
-public:
- wxNcPaintEvent(int winid = 0)
- : wxEvent(winid, wxEVT_NC_PAINT)
- { }
-
- virtual wxEvent *Clone() const { return new wxNcPaintEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNcPaintEvent)
-};
-
-// Erase background event class
-/*
- wxEVT_ERASE_BACKGROUND
- */
-
-class WXDLLIMPEXP_CORE wxEraseEvent : public wxEvent
-{
-public:
- wxEraseEvent(int Id = 0, wxDC *dc = (wxDC *) NULL)
- : wxEvent(Id, wxEVT_ERASE_BACKGROUND),
- m_dc(dc)
- { }
-
- wxEraseEvent(const wxEraseEvent& event)
- : wxEvent(event),
- m_dc(event.m_dc)
- { }
-
- wxDC *GetDC() const { return m_dc; }
-
- virtual wxEvent *Clone() const { return new wxEraseEvent(*this); }
-
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
-protected:
-#endif
- wxDC *m_dc;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxEraseEvent)
-};
-
-// Focus event class
-/*
- wxEVT_SET_FOCUS
- wxEVT_KILL_FOCUS
- */
-
-class WXDLLIMPEXP_CORE wxFocusEvent : public wxEvent
-{
-public:
- wxFocusEvent(wxEventType type = wxEVT_NULL, int winid = 0)
- : wxEvent(winid, type)
- { m_win = NULL; }
-
- wxFocusEvent(const wxFocusEvent& event)
- : wxEvent(event)
- { m_win = event.m_win; }
-
- // The window associated with this event is the window which had focus
- // before for SET event and the window which will have focus for the KILL
- // one. NB: it may be NULL in both cases!
- wxWindow *GetWindow() const { return m_win; }
- void SetWindow(wxWindow *win) { m_win = win; }
-
- virtual wxEvent *Clone() const { return new wxFocusEvent(*this); }
-
-private:
- wxWindow *m_win;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFocusEvent)
-};
-
-// wxChildFocusEvent notifies the parent that a child has got the focus: unlike
-// wxFocusEvent it is propagated upwards the window chain
-class WXDLLIMPEXP_CORE wxChildFocusEvent : public wxCommandEvent
-{
-public:
- wxChildFocusEvent(wxWindow *win = NULL);
-
- wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
-
- virtual wxEvent *Clone() const { return new wxChildFocusEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxChildFocusEvent)
-};
-
-// Activate event class
-/*
- wxEVT_ACTIVATE
- wxEVT_ACTIVATE_APP
- wxEVT_HIBERNATE
- */
-
-class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
-{
-public:
- wxActivateEvent(wxEventType type = wxEVT_NULL, bool active = true, int Id = 0)
- : wxEvent(Id, type)
- { m_active = active; }
- wxActivateEvent(const wxActivateEvent& event)
- : wxEvent(event)
- { m_active = event.m_active; }
-
- bool GetActive() const { return m_active; }
-
- virtual wxEvent *Clone() const { return new wxActivateEvent(*this); }
-
-private:
- bool m_active;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateEvent)
-};
-
-// InitDialog event class
-/*
- wxEVT_INIT_DIALOG
- */
-
-class WXDLLIMPEXP_CORE wxInitDialogEvent : public wxEvent
-{
-public:
- wxInitDialogEvent(int Id = 0)
- : wxEvent(Id, wxEVT_INIT_DIALOG)
- { }
-
- virtual wxEvent *Clone() const { return new wxInitDialogEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxInitDialogEvent)
-};
-
-// Miscellaneous menu event class
-/*
- wxEVT_MENU_OPEN,
- wxEVT_MENU_CLOSE,
- wxEVT_MENU_HIGHLIGHT,
-*/
-
-class WXDLLIMPEXP_CORE wxMenuEvent : public wxEvent
-{
-public:
- wxMenuEvent(wxEventType type = wxEVT_NULL, int winid = 0, wxMenu* menu = NULL)
- : wxEvent(winid, type)
- { m_menuId = winid; m_menu = menu; }
- wxMenuEvent(const wxMenuEvent & event)
- : wxEvent(event)
- { m_menuId = event.m_menuId; m_menu = event.m_menu; }
-
- // only for wxEVT_MENU_HIGHLIGHT
- int GetMenuId() const { return m_menuId; }
-
- // only for wxEVT_MENU_OPEN/CLOSE
- bool IsPopup() const { return m_menuId == wxID_ANY; }
-
- // only for wxEVT_MENU_OPEN/CLOSE
- wxMenu* GetMenu() const { return m_menu; }
-
- virtual wxEvent *Clone() const { return new wxMenuEvent(*this); }
-
-private:
- int m_menuId;
- wxMenu* m_menu;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMenuEvent)
-};
-
-// Window close or session close event class
-/*
- wxEVT_CLOSE_WINDOW,
- wxEVT_END_SESSION,
- wxEVT_QUERY_END_SESSION
- */
-
-class WXDLLIMPEXP_CORE wxCloseEvent : public wxEvent
-{
-public:
- wxCloseEvent(wxEventType type = wxEVT_NULL, int winid = 0)
- : wxEvent(winid, type),
- m_loggingOff(true),
- m_veto(false), // should be false by default
- m_canVeto(true) {}
-
- wxCloseEvent(const wxCloseEvent & event)
- : wxEvent(event),
- m_loggingOff(event.m_loggingOff),
- m_veto(event.m_veto),
- m_canVeto(event.m_canVeto) {}
-
- void SetLoggingOff(bool logOff) { m_loggingOff = logOff; }
- bool GetLoggingOff() const
- {
- // m_loggingOff flag is only used by wxEVT_[QUERY_]END_SESSION, it
- // doesn't make sense for wxEVT_CLOSE_WINDOW
- wxASSERT_MSG( m_eventType != wxEVT_CLOSE_WINDOW,
- _T("this flag is for end session events only") );
-
- return m_loggingOff;
- }
-
- void Veto(bool veto = true)
- {
- // GetVeto() will return false anyhow...
- wxCHECK_RET( m_canVeto,
- wxT("call to Veto() ignored (can't veto this event)") );
-
- m_veto = veto;
- }
- void SetCanVeto(bool canVeto) { m_canVeto = canVeto; }
- bool CanVeto() const { return m_canVeto; }
- bool GetVeto() const { return m_canVeto && m_veto; }
-
- virtual wxEvent *Clone() const { return new wxCloseEvent(*this); }
-
-protected:
- bool m_loggingOff,
- m_veto,
- m_canVeto;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent)
-};
-
-/*
- wxEVT_SHOW
- */
-
-class WXDLLIMPEXP_CORE wxShowEvent : public wxEvent
-{
-public:
- wxShowEvent(int winid = 0, bool show = false)
- : wxEvent(winid, wxEVT_SHOW)
- { m_show = show; }
- wxShowEvent(const wxShowEvent & event)
- : wxEvent(event)
- { m_show = event.m_show; }
-
- void SetShow(bool show) { m_show = show; }
- bool GetShow() const { return m_show; }
-
- virtual wxEvent *Clone() const { return new wxShowEvent(*this); }
-
-protected:
- bool m_show;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxShowEvent)
-};
-
-/*
- wxEVT_ICONIZE
- */
-
-class WXDLLIMPEXP_CORE wxIconizeEvent : public wxEvent
-{
-public:
- wxIconizeEvent(int winid = 0, bool iconized = true)
- : wxEvent(winid, wxEVT_ICONIZE)
- { m_iconized = iconized; }
- wxIconizeEvent(const wxIconizeEvent & event)
- : wxEvent(event)
- { m_iconized = event.m_iconized; }
-
- // return true if the frame was iconized, false if restored
- bool Iconized() const { return m_iconized; }
-
- virtual wxEvent *Clone() const { return new wxIconizeEvent(*this); }
-
-protected:
- bool m_iconized;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIconizeEvent)
-};
-/*
- wxEVT_MAXIMIZE
- */
-
-class WXDLLIMPEXP_CORE wxMaximizeEvent : public wxEvent
-{
-public:
- wxMaximizeEvent(int winid = 0)
- : wxEvent(winid, wxEVT_MAXIMIZE)
- { }
-
- virtual wxEvent *Clone() const { return new wxMaximizeEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMaximizeEvent)
-};
-
-// Joystick event class
-/*
- wxEVT_JOY_BUTTON_DOWN,
- wxEVT_JOY_BUTTON_UP,
- wxEVT_JOY_MOVE,
- wxEVT_JOY_ZMOVE
-*/
-
-// Which joystick? Same as Windows ids so no conversion necessary.
-enum
-{
- wxJOYSTICK1,
- wxJOYSTICK2
-};
-
-// Which button is down?
-enum
-{
- wxJOY_BUTTON_ANY = -1,
- wxJOY_BUTTON1 = 1,
- wxJOY_BUTTON2 = 2,
- wxJOY_BUTTON3 = 4,
- wxJOY_BUTTON4 = 8
-};
-
-class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent
-{
-#if WXWIN_COMPATIBILITY_2_4
-public:
-#else
-protected:
-#endif
- wxPoint m_pos;
- int m_zPosition;
- int m_buttonChange; // Which button changed?
- int m_buttonState; // Which buttons are down?
- int m_joyStick; // Which joystick?
-
-public:
- wxJoystickEvent(wxEventType type = wxEVT_NULL,
- int state = 0,
- int joystick = wxJOYSTICK1,
- int change = 0)
- : wxEvent(0, type),
- m_pos(),
- m_zPosition(0),
- m_buttonChange(change),
- m_buttonState(state),
- m_joyStick(joystick)
- {
- }
- wxJoystickEvent(const wxJoystickEvent & event)
- : wxEvent(event),
- m_pos(event.m_pos),
- m_zPosition(event.m_zPosition),
- m_buttonChange(event.m_buttonChange),
- m_buttonState(event.m_buttonState),
- m_joyStick(event.m_joyStick)
- { }
-
- wxPoint GetPosition() const { return m_pos; }
- int GetZPosition() const { return m_zPosition; }
- int GetButtonState() const { return m_buttonState; }
- int GetButtonChange() const { return m_buttonChange; }
- int GetJoystick() const { return m_joyStick; }
-
- void SetJoystick(int stick) { m_joyStick = stick; }
- void SetButtonState(int state) { m_buttonState = state; }
- void SetButtonChange(int change) { m_buttonChange = change; }
- void SetPosition(const wxPoint& pos) { m_pos = pos; }
- void SetZPosition(int zPos) { m_zPosition = zPos; }
-
- // Was it a button event? (*doesn't* mean: is any button *down*?)
- bool IsButton() const { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) ||
- (GetEventType() == wxEVT_JOY_BUTTON_UP)); }
-
- // Was it a move event?
- bool IsMove() const { return (GetEventType() == wxEVT_JOY_MOVE); }
-
- // Was it a zmove event?
- bool IsZMove() const { return (GetEventType() == wxEVT_JOY_ZMOVE); }
-
- // Was it a down event from button 1, 2, 3, 4 or any?
- bool ButtonDown(int but = wxJOY_BUTTON_ANY) const
- { return ((GetEventType() == wxEVT_JOY_BUTTON_DOWN) &&
- ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); }
-
- // Was it a up event from button 1, 2, 3 or any?
- bool ButtonUp(int but = wxJOY_BUTTON_ANY) const
- { return ((GetEventType() == wxEVT_JOY_BUTTON_UP) &&
- ((but == wxJOY_BUTTON_ANY) || (but == m_buttonChange))); }
-
- // Was the given button 1,2,3,4 or any in Down state?
- bool ButtonIsDown(int but = wxJOY_BUTTON_ANY) const
- { return (((but == wxJOY_BUTTON_ANY) && (m_buttonState != 0)) ||
- ((m_buttonState & but) == but)); }
-
- virtual wxEvent *Clone() const { return new wxJoystickEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxJoystickEvent)
-};
-
-// Drop files event class
-/*
- wxEVT_DROP_FILES
- */
-
-class WXDLLIMPEXP_CORE wxDropFilesEvent : public wxEvent
-{
-public:
- int m_noFiles;
- wxPoint m_pos;
- wxString* m_files;
-
- wxDropFilesEvent(wxEventType type = wxEVT_NULL,
- int noFiles = 0,
- wxString *files = (wxString *) NULL)
- : wxEvent(0, type),
- m_noFiles(noFiles),
- m_pos(),
- m_files(files)
- { }
-
- // we need a copy ctor to avoid deleting m_files pointer twice
- wxDropFilesEvent(const wxDropFilesEvent& other)
- : wxEvent(other),
- m_noFiles(other.m_noFiles),
- m_pos(other.m_pos),
- m_files(NULL)
- {
- m_files = new wxString[m_noFiles];
- for ( int n = 0; n < m_noFiles; n++ )
- {
- m_files[n] = other.m_files[n];
- }
- }
-
- virtual ~wxDropFilesEvent()
- {
- delete [] m_files;
- }
-
- wxPoint GetPosition() const { return m_pos; }
- int GetNumberOfFiles() const { return m_noFiles; }
- wxString *GetFiles() const { return m_files; }
-
- virtual wxEvent *Clone() const { return new wxDropFilesEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDropFilesEvent)
-};
-
-// Update UI event
-/*
- wxEVT_UPDATE_UI
- */
-
-// Whether to always send update events to windows, or
-// to only send update events to those with the
-// wxWS_EX_PROCESS_UI_UPDATES style.
-
-enum wxUpdateUIMode
-{
- // Send UI update events to all windows
- wxUPDATE_UI_PROCESS_ALL,
-
- // Send UI update events to windows that have
- // the wxWS_EX_PROCESS_UI_UPDATES flag specified
- wxUPDATE_UI_PROCESS_SPECIFIED
-};
-
-class WXDLLIMPEXP_CORE wxUpdateUIEvent : public wxCommandEvent
-{
-public:
- wxUpdateUIEvent(wxWindowID commandId = 0)
- : wxCommandEvent(wxEVT_UPDATE_UI, commandId)
- {
- m_checked =
- m_enabled =
- m_shown =
- m_setEnabled =
- m_setShown =
- m_setText =
- m_setChecked = false;
- }
- wxUpdateUIEvent(const wxUpdateUIEvent & event)
- : wxCommandEvent(event),
- m_checked(event.m_checked),
- m_enabled(event.m_enabled),
- m_shown(event.m_shown),
- m_setEnabled(event.m_setEnabled),
- m_setShown(event.m_setShown),
- m_setText(event.m_setText),
- m_setChecked(event.m_setChecked),
- m_text(event.m_text)
- { }
-
- bool GetChecked() const { return m_checked; }
- bool GetEnabled() const { return m_enabled; }
- bool GetShown() const { return m_shown; }
- wxString GetText() const { return m_text; }
- bool GetSetText() const { return m_setText; }
- bool GetSetChecked() const { return m_setChecked; }
- bool GetSetEnabled() const { return m_setEnabled; }
- bool GetSetShown() const { return m_setShown; }
-
- void Check(bool check) { m_checked = check; m_setChecked = true; }
- void Enable(bool enable) { m_enabled = enable; m_setEnabled = true; }
- void Show(bool show) { m_shown = show; m_setShown = true; }
- void SetText(const wxString& text) { m_text = text; m_setText = true; }
-
- // Sets the interval between updates in milliseconds.
- // Set to -1 to disable updates, or to 0 to update as frequently as possible.
- static void SetUpdateInterval(long updateInterval) { sm_updateInterval = updateInterval; }
-
- // Returns the current interval between updates in milliseconds
- static long GetUpdateInterval() { return sm_updateInterval; }
-
- // Can we update this window?
- static bool CanUpdate(wxWindowBase *win);
-
- // Reset the update time to provide a delay until the next
- // time we should update
- static void ResetUpdateTime();
-
- // Specify how wxWidgets will send update events: to
- // all windows, or only to those which specify that they
- // will process the events.
- static void SetMode(wxUpdateUIMode mode) { sm_updateMode = mode; }
-
- // Returns the UI update mode
- static wxUpdateUIMode GetMode() { return sm_updateMode; }
-
- virtual wxEvent *Clone() const { return new wxUpdateUIEvent(*this); }
-
-protected:
- bool m_checked;
- bool m_enabled;
- bool m_shown;
- bool m_setEnabled;
- bool m_setShown;
- bool m_setText;
- bool m_setChecked;
- wxString m_text;
-#if wxUSE_LONGLONG
- static wxLongLong sm_lastUpdate;
-#endif
- static long sm_updateInterval;
- static wxUpdateUIMode sm_updateMode;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxUpdateUIEvent)
-};
-
-/*
- wxEVT_SYS_COLOUR_CHANGED
- */
-
-// TODO: shouldn't all events record the window ID?
-class WXDLLIMPEXP_CORE wxSysColourChangedEvent : public wxEvent
-{
-public:
- wxSysColourChangedEvent()
- : wxEvent(0, wxEVT_SYS_COLOUR_CHANGED)
- { }
-
- virtual wxEvent *Clone() const { return new wxSysColourChangedEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxSysColourChangedEvent)
-};
-
-/*
- wxEVT_MOUSE_CAPTURE_CHANGED
- The window losing the capture receives this message
- (even if it released the capture itself).
- */
-
-class WXDLLIMPEXP_CORE wxMouseCaptureChangedEvent : public wxEvent
-{
-public:
- wxMouseCaptureChangedEvent(wxWindowID winid = 0, wxWindow* gainedCapture = NULL)
- : wxEvent(winid, wxEVT_MOUSE_CAPTURE_CHANGED),
- m_gainedCapture(gainedCapture)
- { }
-
- wxMouseCaptureChangedEvent(const wxMouseCaptureChangedEvent& event)
- : wxEvent(event),
- m_gainedCapture(event.m_gainedCapture)
- { }
-
- virtual wxEvent *Clone() const { return new wxMouseCaptureChangedEvent(*this); }
-
- wxWindow* GetCapturedWindow() const { return m_gainedCapture; }
-
-private:
- wxWindow* m_gainedCapture;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureChangedEvent)
-};
-
-/*
- wxEVT_MOUSE_CAPTURE_LOST
- The window losing the capture receives this message, unless it released it
- it itself or unless wxWindow::CaptureMouse was called on another window
- (and so capture will be restored when the new capturer releases it).
- */
-
-class WXDLLIMPEXP_CORE wxMouseCaptureLostEvent : public wxEvent
-{
-public:
- wxMouseCaptureLostEvent(wxWindowID winid = 0)
- : wxEvent(winid, wxEVT_MOUSE_CAPTURE_LOST)
- {}
-
- wxMouseCaptureLostEvent(const wxMouseCaptureLostEvent& event)
- : wxEvent(event)
- {}
-
- virtual wxEvent *Clone() const { return new wxMouseCaptureLostEvent(*this); }
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxMouseCaptureLostEvent)
-};
-
-/*
- wxEVT_DISPLAY_CHANGED
- */
-class WXDLLIMPEXP_CORE wxDisplayChangedEvent : public wxEvent
-{
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDisplayChangedEvent)
-
-public:
- wxDisplayChangedEvent()
- : wxEvent(0, wxEVT_DISPLAY_CHANGED)
- { }
-
- virtual wxEvent *Clone() const { return new wxDisplayChangedEvent(*this); }
-};
-
-/*
- wxEVT_PALETTE_CHANGED
- */
-
-class WXDLLIMPEXP_CORE wxPaletteChangedEvent : public wxEvent
-{
-public:
- wxPaletteChangedEvent(wxWindowID winid = 0)
- : wxEvent(winid, wxEVT_PALETTE_CHANGED),
- m_changedWindow((wxWindow *) NULL)
- { }
-
- wxPaletteChangedEvent(const wxPaletteChangedEvent& event)
- : wxEvent(event),
- m_changedWindow(event.m_changedWindow)
- { }
-
- void SetChangedWindow(wxWindow* win) { m_changedWindow = win; }
- wxWindow* GetChangedWindow() const { return m_changedWindow; }
-
- virtual wxEvent *Clone() const { return new wxPaletteChangedEvent(*this); }
-
-protected:
- wxWindow* m_changedWindow;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxPaletteChangedEvent)
-};
-
-/*
- wxEVT_QUERY_NEW_PALETTE
- Indicates the window is getting keyboard focus and should re-do its palette.
- */
-
-class WXDLLIMPEXP_CORE wxQueryNewPaletteEvent : public wxEvent
-{
-public:
- wxQueryNewPaletteEvent(wxWindowID winid = 0)
- : wxEvent(winid, wxEVT_QUERY_NEW_PALETTE),
- m_paletteRealized(false)
- { }
- wxQueryNewPaletteEvent(const wxQueryNewPaletteEvent & event)
- : wxEvent(event),
- m_paletteRealized(event.m_paletteRealized)
- { }
-
- // App sets this if it changes the palette.
- void SetPaletteRealized(bool realized) { m_paletteRealized = realized; }
- bool GetPaletteRealized() const { return m_paletteRealized; }
-
- virtual wxEvent *Clone() const { return new wxQueryNewPaletteEvent(*this); }
-
-protected:
- bool m_paletteRealized;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxQueryNewPaletteEvent)
-};
-
-/*
- Event generated by dialog navigation keys
- wxEVT_NAVIGATION_KEY
- */
-// NB: don't derive from command event to avoid being propagated to the parent
-class WXDLLIMPEXP_CORE wxNavigationKeyEvent : public wxEvent
-{
-public:
- wxNavigationKeyEvent()
- : wxEvent(0, wxEVT_NAVIGATION_KEY),
- m_flags(IsForward | FromTab), // defaults are for TAB
- m_focus((wxWindow *)NULL)
- {
- m_propagationLevel = wxEVENT_PROPAGATE_NONE;
- }
-
- wxNavigationKeyEvent(const wxNavigationKeyEvent& event)
- : wxEvent(event),
- m_flags(event.m_flags),
- m_focus(event.m_focus)
- { }
-
- // direction: forward (true) or backward (false)
- bool GetDirection() const
- { return (m_flags & IsForward) != 0; }
- void SetDirection(bool bForward)
- { if ( bForward ) m_flags |= IsForward; else m_flags &= ~IsForward; }
-
- // it may be a window change event (MDI, notebook pages...) or a control
- // change event
- bool IsWindowChange() const
- { return (m_flags & WinChange) != 0; }
- void SetWindowChange(bool bIs)
- { if ( bIs ) m_flags |= WinChange; else m_flags &= ~WinChange; }
-
- // Set to true under MSW if the event was generated using the tab key.
- // This is required for proper navogation over radio buttons
- bool IsFromTab() const
- { return (m_flags & FromTab) != 0; }
- void SetFromTab(bool bIs)
- { if ( bIs ) m_flags |= FromTab; else m_flags &= ~FromTab; }
-
- // the child which has the focus currently (may be NULL - use
- // wxWindow::FindFocus then)
- wxWindow* GetCurrentFocus() const { return m_focus; }
- void SetCurrentFocus(wxWindow *win) { m_focus = win; }
-
- // Set flags
- void SetFlags(long flags) { m_flags = flags; }
-
- virtual wxEvent *Clone() const { return new wxNavigationKeyEvent(*this); }
-
- enum
- {
- IsBackward = 0x0000,
- IsForward = 0x0001,
- WinChange = 0x0002,
- FromTab = 0x0004
- };
-
- long m_flags;
- wxWindow *m_focus;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNavigationKeyEvent)
-};
-
-// Window creation/destruction events: the first is sent as soon as window is
-// created (i.e. the underlying GUI object exists), but when the C++ object is
-// fully initialized (so virtual functions may be called). The second,
-// wxEVT_DESTROY, is sent right before the window is destroyed - again, it's
-// still safe to call virtual functions at this moment
-/*
- wxEVT_CREATE
- wxEVT_DESTROY
- */
-
-class WXDLLIMPEXP_CORE wxWindowCreateEvent : public wxCommandEvent
-{
-public:
- wxWindowCreateEvent(wxWindow *win = NULL);
-
- wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
-
- virtual wxEvent *Clone() const { return new wxWindowCreateEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowCreateEvent)
-};
-
-class WXDLLIMPEXP_CORE wxWindowDestroyEvent : public wxCommandEvent
-{
-public:
- wxWindowDestroyEvent(wxWindow *win = NULL);
-
- wxWindow *GetWindow() const { return (wxWindow *)GetEventObject(); }
-
- virtual wxEvent *Clone() const { return new wxWindowDestroyEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWindowDestroyEvent)
-};
-
-// A help event is sent when the user clicks on a window in context-help mode.
-/*
- wxEVT_HELP
- wxEVT_DETAILED_HELP
-*/
-
-class WXDLLIMPEXP_CORE wxHelpEvent : public wxCommandEvent
-{
-public:
- // how was this help event generated?
- enum Origin
- {
- Origin_Unknown, // unrecognized event source
- Origin_Keyboard, // event generated from F1 key press
- Origin_HelpButton // event from [?] button on the title bar (Windows)
- };
-
- wxHelpEvent(wxEventType type = wxEVT_NULL,
- wxWindowID winid = 0,
- const wxPoint& pt = wxDefaultPosition,
- Origin origin = Origin_Unknown)
- : wxCommandEvent(type, winid),
- m_pos(pt),
- m_origin(GuessOrigin(origin))
- { }
- wxHelpEvent(const wxHelpEvent & event)
- : wxCommandEvent(event),
- m_pos(event.m_pos),
- m_target(event.m_target),
- m_link(event.m_link),
- m_origin(event.m_origin)
- { }
-
- // Position of event (in screen coordinates)
- const wxPoint& GetPosition() const { return m_pos; }
- void SetPosition(const wxPoint& pos) { m_pos = pos; }
-
- // Optional link to further help
- const wxString& GetLink() const { return m_link; }
- void SetLink(const wxString& link) { m_link = link; }
-
- // Optional target to display help in. E.g. a window specification
- const wxString& GetTarget() const { return m_target; }
- void SetTarget(const wxString& target) { m_target = target; }
-
- virtual wxEvent *Clone() const { return new wxHelpEvent(*this); }
-
- // optional indication of the event source
- Origin GetOrigin() const { return m_origin; }
- void SetOrigin(Origin origin) { m_origin = origin; }
-
-protected:
- wxPoint m_pos;
- wxString m_target;
- wxString m_link;
- Origin m_origin;
-
- // we can try to guess the event origin ourselves, even if none is
- // specified in the ctor
- static Origin GuessOrigin(Origin origin);
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxHelpEvent)
-};
-
-// A Clipboard Text event is sent when a window intercepts text copy/cut/paste
-// message, i.e. the user has cut/copied/pasted data from/into a text control
-// via ctrl-C/X/V, ctrl/shift-del/insert, a popup menu command, etc.
-// NOTE : under windows these events are *NOT* generated automatically
-// for a Rich Edit text control.
-/*
-wxEVT_COMMAND_TEXT_COPY
-wxEVT_COMMAND_TEXT_CUT
-wxEVT_COMMAND_TEXT_PASTE
-*/
-
-class WXDLLIMPEXP_CORE wxClipboardTextEvent : public wxCommandEvent
-{
-public:
- wxClipboardTextEvent(wxEventType type = wxEVT_NULL,
- wxWindowID winid = 0)
- : wxCommandEvent(type, winid)
- { }
- wxClipboardTextEvent(const wxClipboardTextEvent & event)
- : wxCommandEvent(event)
- { }
-
- virtual wxEvent *Clone() const { return new wxClipboardTextEvent(*this); }
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxClipboardTextEvent)
-};
-
-// A Context event is sent when the user right clicks on a window or
-// presses Shift-F10
-// NOTE : Under windows this is a repackaged WM_CONTETXMENU message
-// Under other systems it may have to be generated from a right click event
-/*
- wxEVT_CONTEXT_MENU
-*/
-
-class WXDLLIMPEXP_CORE wxContextMenuEvent : public wxCommandEvent
-{
-public:
- wxContextMenuEvent(wxEventType type = wxEVT_NULL,
- wxWindowID winid = 0,
- const wxPoint& pt = wxDefaultPosition)
- : wxCommandEvent(type, winid),
- m_pos(pt)
- { }
- wxContextMenuEvent(const wxContextMenuEvent & event)
- : wxCommandEvent(event),
- m_pos(event.m_pos)
- { }
-
- // Position of event (in screen coordinates)
- const wxPoint& GetPosition() const { return m_pos; }
- void SetPosition(const wxPoint& pos) { m_pos = pos; }
-
- virtual wxEvent *Clone() const { return new wxContextMenuEvent(*this); }
-
-protected:
- wxPoint m_pos;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxContextMenuEvent)
-};
-
-// Idle event
-/*
- wxEVT_IDLE
- */
-
-// Whether to always send idle events to windows, or
-// to only send update events to those with the
-// wxWS_EX_PROCESS_IDLE style.
-
-enum wxIdleMode
-{
- // Send idle events to all windows
- wxIDLE_PROCESS_ALL,
-
- // Send idle events to windows that have
- // the wxWS_EX_PROCESS_IDLE flag specified
- wxIDLE_PROCESS_SPECIFIED
-};
-
-class WXDLLIMPEXP_CORE wxIdleEvent : public wxEvent
-{
-public:
- wxIdleEvent()
- : wxEvent(0, wxEVT_IDLE),
- m_requestMore(false)
- { }
- wxIdleEvent(const wxIdleEvent & event)
- : wxEvent(event),
- m_requestMore(event.m_requestMore)
- { }
-
- void RequestMore(bool needMore = true) { m_requestMore = needMore; }
- bool MoreRequested() const { return m_requestMore; }
-
- virtual wxEvent *Clone() const { return new wxIdleEvent(*this); }
-
- // Specify how wxWidgets will send idle events: to
- // all windows, or only to those which specify that they
- // will process the events.
- static void SetMode(wxIdleMode mode) { sm_idleMode = mode; }
-
- // Returns the idle event mode
- static wxIdleMode GetMode() { return sm_idleMode; }
-
- // Can we send an idle event?
- static bool CanSend(wxWindow* win);
-
-protected:
- bool m_requestMore;
- static wxIdleMode sm_idleMode;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxIdleEvent)
-};
-
-#endif // wxUSE_GUI
-
-/* TODO
- wxEVT_MOUSE_CAPTURE_CHANGED,
- wxEVT_SETTING_CHANGED, // WM_WININICHANGE (NT) / WM_SETTINGCHANGE (Win95)
-// wxEVT_FONT_CHANGED, // WM_FONTCHANGE: roll into wxEVT_SETTING_CHANGED, but remember to propagate
- // wxEVT_FONT_CHANGED to all other windows (maybe).
- wxEVT_DRAW_ITEM, // Leave these three as virtual functions in wxControl?? Platform-specific.
- wxEVT_MEASURE_ITEM,
- wxEVT_COMPARE_ITEM
-*/
-
-
-// ============================================================================
-// event handler and related classes
-// ============================================================================
-
-// for backwards compatibility and to prevent eVC 4 for ARM from crashing with
-// internal compiler error when compiling wx, we define wxObjectEventFunction
-// as a wxObject method even though it can only be a wxEvtHandler one
-typedef void (wxObject::*wxObjectEventFunction)(wxEvent&);
-
-// we can't have ctors nor base struct in backwards compatibility mode or
-// otherwise we won't be able to initialize the objects with an agregate, so
-// we have to keep both versions
-#if WXWIN_COMPATIBILITY_EVENT_TYPES
-
-struct WXDLLIMPEXP_BASE wxEventTableEntry
-{
- // For some reason, this can't be wxEventType, or VC++ complains.
- int m_eventType; // main event type
- int m_id; // control/menu/toolbar id
- int m_lastId; // used for ranges of ids
- wxObjectEventFunction m_fn; // function to call: not wxEventFunction,
- // because of dependency problems
-
- wxObject* m_callbackUserData;
-};
-
-#else // !WXWIN_COMPATIBILITY_EVENT_TYPES
-
-// struct containing the members common to static and dynamic event tables
-// entries
-struct WXDLLIMPEXP_BASE wxEventTableEntryBase
-{
-private:
- wxEventTableEntryBase& operator=(const wxEventTableEntryBase& event);
-
-public:
- wxEventTableEntryBase(int winid, int idLast,
- wxObjectEventFunction fn, wxObject *data)
- : m_id(winid),
- m_lastId(idLast),
- m_fn(fn),
- m_callbackUserData(data)
- { }
-
- wxEventTableEntryBase(const wxEventTableEntryBase& event)
- : m_id(event.m_id),
- m_lastId(event.m_lastId),
- m_fn(event.m_fn),
- m_callbackUserData(event.m_callbackUserData)
- { }
-
- // the range of ids for this entry: if m_lastId == wxID_ANY, the range
- // consists only of m_id, otherwise it is m_id..m_lastId inclusive
- int m_id,
- m_lastId;
-
- // function to call: not wxEventFunction, because of dependency problems
- wxObjectEventFunction m_fn;
-
- // arbitrary user data asosciated with the callback
- wxObject* m_callbackUserData;
-};
-
-// an entry from a static event table
-struct WXDLLIMPEXP_BASE wxEventTableEntry : public wxEventTableEntryBase
-{
- wxEventTableEntry(const int& evType, int winid, int idLast,
- wxObjectEventFunction fn, wxObject *data)
- : wxEventTableEntryBase(winid, idLast, fn, data),
- m_eventType(evType)
- { }
-
- // the reference to event type: this allows us to not care about the
- // (undefined) order in which the event table entries and the event types
- // are initialized: initially the value of this reference might be
- // invalid, but by the time it is used for the first time, all global
- // objects will have been initialized (including the event type constants)
- // and so it will have the correct value when it is needed
- const int& m_eventType;
-
-private:
- wxEventTableEntry& operator=(const wxEventTableEntry&);
-};
-
-// an entry used in dynamic event table managed by wxEvtHandler::Connect()
-struct WXDLLIMPEXP_BASE wxDynamicEventTableEntry : public wxEventTableEntryBase
-{
- wxDynamicEventTableEntry(int evType, int winid, int idLast,
- wxObjectEventFunction fn, wxObject *data, wxEvtHandler* eventSink)
- : wxEventTableEntryBase(winid, idLast, fn, data),
- m_eventType(evType),
- m_eventSink(eventSink)
- { }
-
- // not a reference here as we can't keep a reference to a temporary int
- // created to wrap the constant value typically passed to Connect() - nor
- // do we need it
- int m_eventType;
-
- // Pointer to object whose function is fn - so we don't assume the
- // EventFunction is always a member of the EventHandler receiving the
- // message
- wxEvtHandler* m_eventSink;
-
- DECLARE_NO_COPY_CLASS(wxDynamicEventTableEntry)
-};
-
-#endif // !WXWIN_COMPATIBILITY_EVENT_TYPES
-
-// ----------------------------------------------------------------------------
-// wxEventTable: an array of event entries terminated with {0, 0, 0, 0, 0}
-// ----------------------------------------------------------------------------
-
-struct WXDLLIMPEXP_BASE wxEventTable
-{
- const wxEventTable *baseTable; // base event table (next in chain)
- const wxEventTableEntry *entries; // bottom of entry array
-};
-
-// ----------------------------------------------------------------------------
-// wxEventHashTable: a helper of wxEvtHandler to speed up wxEventTable lookups.
-// ----------------------------------------------------------------------------
-
-WX_DEFINE_ARRAY_PTR(const wxEventTableEntry*, wxEventTableEntryPointerArray);
-
-class WXDLLIMPEXP_BASE wxEventHashTable
-{
-private:
- // Internal data structs
- struct EventTypeTable
- {
- wxEventType eventType;
- wxEventTableEntryPointerArray eventEntryTable;
- };
- typedef EventTypeTable* EventTypeTablePointer;
-
-public:
- // Constructor, needs the event table it needs to hash later on.
- // Note: hashing of the event table is not done in the constructor as it
- // can be that the event table is not yet full initialize, the hash
- // will gets initialized when handling the first event look-up request.
- wxEventHashTable(const wxEventTable &table);
- // Destructor.
- ~wxEventHashTable();
-
- // Handle the given event, in other words search the event table hash
- // and call self->ProcessEvent() if a match was found.
- bool HandleEvent(wxEvent &event, wxEvtHandler *self);
-
- // Clear table
- void Clear();
-
- // Clear all tables
- static void ClearAll();
- // Rebuild all tables
- static void ReconstructAll();
-
-protected:
- // Init the hash table with the entries of the static event table.
- void InitHashTable();
- // Helper funtion of InitHashTable() to insert 1 entry into the hash table.
- void AddEntry(const wxEventTableEntry &entry);
- // Allocate and init with null pointers the base hash table.
- void AllocEventTypeTable(size_t size);
- // Grow the hash table in size and transfer all items currently
- // in the table to the correct location in the new table.
- void GrowEventTypeTable();
-
-protected:
- const wxEventTable &m_table;
- bool m_rebuildHash;
-
- size_t m_size;
- EventTypeTablePointer *m_eventTypeTable;
-
- static wxEventHashTable* sm_first;
- wxEventHashTable* m_previous;
- wxEventHashTable* m_next;
-
- DECLARE_NO_COPY_CLASS(wxEventHashTable)
-};
-
-// ----------------------------------------------------------------------------
-// wxEvtHandler: the base class for all objects handling wxWidgets events
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxEvtHandler : public wxObject
-{
-public:
- wxEvtHandler();
- virtual ~wxEvtHandler();
-
- wxEvtHandler *GetNextHandler() const { return m_nextHandler; }
- wxEvtHandler *GetPreviousHandler() const { return m_previousHandler; }
- void SetNextHandler(wxEvtHandler *handler) { m_nextHandler = handler; }
- void SetPreviousHandler(wxEvtHandler *handler) { m_previousHandler = handler; }
-
- void SetEvtHandlerEnabled(bool enabled) { m_enabled = enabled; }
- bool GetEvtHandlerEnabled() const { return m_enabled; }
-
- // process an event right now
- virtual bool ProcessEvent(wxEvent& event);
-
- // add an event to be processed later
- void AddPendingEvent(wxEvent& event);
-
- void ProcessPendingEvents();
-
-#if wxUSE_THREADS
- bool ProcessThreadEvent(wxEvent& event);
-#endif
-
- // Dynamic association of a member function handler with the event handler,
- // winid and event type
- void Connect(int winid,
- int lastId,
- int eventType,
- wxObjectEventFunction func,
- wxObject *userData = (wxObject *) NULL,
- wxEvtHandler *eventSink = (wxEvtHandler *) NULL);
-
- // Convenience function: take just one id
- void Connect(int winid,
- int eventType,
- wxObjectEventFunction func,
- wxObject *userData = (wxObject *) NULL,
- wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
- { Connect(winid, wxID_ANY, eventType, func, userData, eventSink); }
-
- // Even more convenient: without id (same as using id of wxID_ANY)
- void Connect(int eventType,
- wxObjectEventFunction func,
- wxObject *userData = (wxObject *) NULL,
- wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
- { Connect(wxID_ANY, wxID_ANY, eventType, func, userData, eventSink); }
-
- bool Disconnect(int winid,
- int lastId,
- wxEventType eventType,
- wxObjectEventFunction func = NULL,
- wxObject *userData = (wxObject *) NULL,
- wxEvtHandler *eventSink = (wxEvtHandler *) NULL);
-
- bool Disconnect(int winid = wxID_ANY,
- wxEventType eventType = wxEVT_NULL,
- wxObjectEventFunction func = NULL,
- wxObject *userData = (wxObject *) NULL,
- wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
- { return Disconnect(winid, wxID_ANY, eventType, func, userData, eventSink); }
-
- bool Disconnect(wxEventType eventType,
- wxObjectEventFunction func,
- wxObject *userData = (wxObject *) NULL,
- wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
- { return Disconnect(wxID_ANY, eventType, func, userData, eventSink); }
-
- wxList* GetDynamicEventTable() const { return m_dynamicEvents ; }
-
- // User data can be associated with each wxEvtHandler
- void SetClientObject( wxClientData *data ) { DoSetClientObject(data); }
- wxClientData *GetClientObject() const { return DoGetClientObject(); }
-
- void SetClientData( void *data ) { DoSetClientData(data); }
- void *GetClientData() const { return DoGetClientData(); }
-
- // check if the given event table entry matches this event and call the
- // handler if it does
- //
- // return true if the event was processed, false otherwise (no match or the
- // handler decided to skip the event)
- static bool ProcessEventIfMatches(const wxEventTableEntryBase& tableEntry,
- wxEvtHandler *handler,
- wxEvent& event);
-
- // implementation from now on
- virtual bool SearchEventTable(wxEventTable& table, wxEvent& event);
- bool SearchDynamicEventTable( wxEvent& event );
-
-#if wxUSE_THREADS
- void ClearEventLocker();
-#endif // wxUSE_THREADS
-
- // Avoid problems at exit by cleaning up static hash table gracefully
- void ClearEventHashTable() { GetEventHashTable().Clear(); }
-
-private:
- static const wxEventTableEntry sm_eventTableEntries[];
-
-protected:
- // hooks for wxWindow used by ProcessEvent()
- // -----------------------------------------
-
- // This one is called before trying our own event table to allow plugging
- // in the validators.
- //
- // NB: This method is intentionally *not* inside wxUSE_VALIDATORS!
- // It is part of wxBase which doesn't use validators and the code
- // is compiled out when building wxBase w/o GUI classes, which affects
- // binary compatibility and wxBase library can't be used by GUI
- // ports.
- virtual bool TryValidator(wxEvent& WXUNUSED(event)) { return false; }
-
- // this one is called after failing to find the event handle in our own
- // table to give a chance to the other windows to process it
- //
- // base class implementation passes the event to wxTheApp
- virtual bool TryParent(wxEvent& event);
-
-
- static const wxEventTable sm_eventTable;
- virtual const wxEventTable *GetEventTable() const;
-
- static wxEventHashTable sm_eventHashTable;
- virtual wxEventHashTable& GetEventHashTable() const;
-
- wxEvtHandler* m_nextHandler;
- wxEvtHandler* m_previousHandler;
- wxList* m_dynamicEvents;
- wxList* m_pendingEvents;
-
-#if wxUSE_THREADS
-#if defined (__VISAGECPP__)
- const wxCriticalSection& Lock() const { return m_eventsLocker; }
- wxCriticalSection& Lock() { return m_eventsLocker; }
-
- wxCriticalSection m_eventsLocker;
-# else
- const wxCriticalSection& Lock() const { return *m_eventsLocker; }
- wxCriticalSection& Lock() { return *m_eventsLocker; }
-
- wxCriticalSection* m_eventsLocker;
-# endif
-#endif
-
- // Is event handler enabled?
- bool m_enabled;
-
-
- // The user data: either an object which will be deleted by the container
- // when it's deleted or some raw pointer which we do nothing with - only
- // one type of data can be used with the given window (i.e. you cannot set
- // the void data and then associate the container with wxClientData or vice
- // versa)
- union
- {
- wxClientData *m_clientObject;
- void *m_clientData;
- };
-
- // what kind of data do we have?
- wxClientDataType m_clientDataType;
-
- // client data accessors
- virtual void DoSetClientObject( wxClientData *data );
- virtual wxClientData *DoGetClientObject() const;
-
- virtual void DoSetClientData( void *data );
- virtual void *DoGetClientData() const;
-
-private:
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxEvtHandler)
-};
-
-// Post a message to the given eventhandler which will be processed during the
-// next event loop iteration
-inline void wxPostEvent(wxEvtHandler *dest, wxEvent& event)
-{
- wxCHECK_RET( dest, wxT("need an object to post event to in wxPostEvent") );
-
- dest->AddPendingEvent(event);
-}
-
-typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
-
-#define wxEventHandler(func) \
- (wxObjectEventFunction)wxStaticCastEvent(wxEventFunction, &func)
-
-#if wxUSE_GUI
-
-typedef void (wxEvtHandler::*wxCommandEventFunction)(wxCommandEvent&);
-typedef void (wxEvtHandler::*wxScrollEventFunction)(wxScrollEvent&);
-typedef void (wxEvtHandler::*wxScrollWinEventFunction)(wxScrollWinEvent&);
-typedef void (wxEvtHandler::*wxSizeEventFunction)(wxSizeEvent&);
-typedef void (wxEvtHandler::*wxMoveEventFunction)(wxMoveEvent&);
-typedef void (wxEvtHandler::*wxPaintEventFunction)(wxPaintEvent&);
-typedef void (wxEvtHandler::*wxNcPaintEventFunction)(wxNcPaintEvent&);
-typedef void (wxEvtHandler::*wxEraseEventFunction)(wxEraseEvent&);
-typedef void (wxEvtHandler::*wxMouseEventFunction)(wxMouseEvent&);
-typedef void (wxEvtHandler::*wxCharEventFunction)(wxKeyEvent&);
-typedef void (wxEvtHandler::*wxFocusEventFunction)(wxFocusEvent&);
-typedef void (wxEvtHandler::*wxChildFocusEventFunction)(wxChildFocusEvent&);
-typedef void (wxEvtHandler::*wxActivateEventFunction)(wxActivateEvent&);
-typedef void (wxEvtHandler::*wxMenuEventFunction)(wxMenuEvent&);
-typedef void (wxEvtHandler::*wxJoystickEventFunction)(wxJoystickEvent&);
-typedef void (wxEvtHandler::*wxDropFilesEventFunction)(wxDropFilesEvent&);
-typedef void (wxEvtHandler::*wxInitDialogEventFunction)(wxInitDialogEvent&);
-typedef void (wxEvtHandler::*wxSysColourChangedEventFunction)(wxSysColourChangedEvent&);
-typedef void (wxEvtHandler::*wxDisplayChangedEventFunction)(wxDisplayChangedEvent&);
-typedef void (wxEvtHandler::*wxUpdateUIEventFunction)(wxUpdateUIEvent&);
-typedef void (wxEvtHandler::*wxIdleEventFunction)(wxIdleEvent&);
-typedef void (wxEvtHandler::*wxCloseEventFunction)(wxCloseEvent&);
-typedef void (wxEvtHandler::*wxShowEventFunction)(wxShowEvent&);
-typedef void (wxEvtHandler::*wxIconizeEventFunction)(wxIconizeEvent&);
-typedef void (wxEvtHandler::*wxMaximizeEventFunction)(wxMaximizeEvent&);
-typedef void (wxEvtHandler::*wxNavigationKeyEventFunction)(wxNavigationKeyEvent&);
-typedef void (wxEvtHandler::*wxPaletteChangedEventFunction)(wxPaletteChangedEvent&);
-typedef void (wxEvtHandler::*wxQueryNewPaletteEventFunction)(wxQueryNewPaletteEvent&);
-typedef void (wxEvtHandler::*wxWindowCreateEventFunction)(wxWindowCreateEvent&);
-typedef void (wxEvtHandler::*wxWindowDestroyEventFunction)(wxWindowDestroyEvent&);
-typedef void (wxEvtHandler::*wxSetCursorEventFunction)(wxSetCursorEvent&);
-typedef void (wxEvtHandler::*wxNotifyEventFunction)(wxNotifyEvent&);
-typedef void (wxEvtHandler::*wxHelpEventFunction)(wxHelpEvent&);
-typedef void (wxEvtHandler::*wxContextMenuEventFunction)(wxContextMenuEvent&);
-typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureChangedEvent&);
-typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&);
-typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&);
-
-// these typedefs don't have the same name structure as the others, keep for
-// backwards compatibility only
-#if WXWIN_COMPATIBILITY_2_4
- typedef wxSysColourChangedEventFunction wxSysColourChangedFunction;
- typedef wxDisplayChangedEventFunction wxDisplayChangedFunction;
-#endif // WXWIN_COMPATIBILITY_2_4
-
-
-#define wxCommandEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
-#define wxScrollEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScrollEventFunction, &func)
-#define wxScrollWinEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxScrollWinEventFunction, &func)
-#define wxSizeEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSizeEventFunction, &func)
-#define wxMoveEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMoveEventFunction, &func)
-#define wxPaintEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxPaintEventFunction, &func)
-#define wxNcPaintEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNcPaintEventFunction, &func)
-#define wxEraseEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxEraseEventFunction, &func)
-#define wxMouseEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseEventFunction, &func)
-#define wxCharEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCharEventFunction, &func)
-#define wxKeyEventHandler(func) wxCharEventHandler(func)
-#define wxFocusEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFocusEventFunction, &func)
-#define wxChildFocusEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxChildFocusEventFunction, &func)
-#define wxActivateEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxActivateEventFunction, &func)
-#define wxMenuEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMenuEventFunction, &func)
-#define wxJoystickEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxJoystickEventFunction, &func)
-#define wxDropFilesEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDropFilesEventFunction, &func)
-#define wxInitDialogEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxInitDialogEventFunction, &func)
-#define wxSysColourChangedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSysColourChangedEventFunction, &func)
-#define wxDisplayChangedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxDisplayChangedEventFunction, &func)
-#define wxUpdateUIEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxUpdateUIEventFunction, &func)
-#define wxIdleEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIdleEventFunction, &func)
-#define wxCloseEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCloseEventFunction, &func)
-#define wxShowEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxShowEventFunction, &func)
-#define wxIconizeEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxIconizeEventFunction, &func)
-#define wxMaximizeEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMaximizeEventFunction, &func)
-#define wxNavigationKeyEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNavigationKeyEventFunction, &func)
-#define wxPaletteChangedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxPaletteChangedEventFunction, &func)
-#define wxQueryNewPaletteEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxQueryNewPaletteEventFunction, &func)
-#define wxWindowCreateEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWindowCreateEventFunction, &func)
-#define wxWindowDestroyEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxWindowDestroyEventFunction, &func)
-#define wxSetCursorEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxSetCursorEventFunction, &func)
-#define wxNotifyEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxNotifyEventFunction, &func)
-#define wxHelpEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxHelpEventFunction, &func)
-#define wxContextMenuEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxContextMenuEventFunction, &func)
-#define wxMouseCaptureChangedEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseCaptureChangedEventFunction, &func)
-#define wxMouseCaptureLostEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxMouseCaptureLostEventFunction, &func)
-#define wxClipboardTextEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxClipboardTextEventFunction, &func)
-
-#endif // wxUSE_GUI
-
-// N.B. In GNU-WIN32, you *have* to take the address of a member function
-// (use &) or the compiler crashes...
-
-#define DECLARE_EVENT_TABLE() \
- private: \
- static const wxEventTableEntry sm_eventTableEntries[]; \
- protected: \
- static const wxEventTable sm_eventTable; \
- virtual const wxEventTable* GetEventTable() const; \
- static wxEventHashTable sm_eventHashTable; \
- virtual wxEventHashTable& GetEventHashTable() const;
-
-// N.B.: when building DLL with Borland C++ 5.5 compiler, you must initialize
-// sm_eventTable before using it in GetEventTable() or the compiler gives
-// E2233 (see http://groups.google.com/groups?selm=397dcc8a%241_2%40dnews)
-
-#define BEGIN_EVENT_TABLE(theClass, baseClass) \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE1(theClass, baseClass, T1) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE2(theClass, baseClass, T1, T2) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE3(theClass, baseClass, T1, T2, T3) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE4(theClass, baseClass, T1, T2, T3, T4) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE5(theClass, baseClass, T1, T2, T3, T4, T5) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE7(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define BEGIN_EVENT_TABLE_TEMPLATE8(theClass, baseClass, T1, T2, T3, T4, T5, T6, T7, T8) \
- template \
- const wxEventTable theClass::sm_eventTable = \
- { &baseClass::sm_eventTable, &theClass::sm_eventTableEntries[0] }; \
- template \
- const wxEventTable *theClass::GetEventTable() const \
- { return &theClass::sm_eventTable; } \
- template \
- wxEventHashTable theClass::sm_eventHashTable(theClass::sm_eventTable); \
- template \
- wxEventHashTable &theClass::GetEventHashTable() const \
- { return theClass::sm_eventHashTable; } \
- template \
- const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
-
-#define END_EVENT_TABLE() DECLARE_EVENT_TABLE_ENTRY( wxEVT_NULL, 0, 0, 0, 0 ) };
-
-/*
- * Event table macros
- */
-
-// helpers for writing shorter code below: declare an event macro taking 2, 1
-// or none ids (the missing ids default to wxID_ANY)
-//
-// macro arguments:
-// - evt one of wxEVT_XXX constants
-// - id1, id2 ids of the first/last id
-// - fn the function (should be cast to the right type)
-#define wx__DECLARE_EVT2(evt, id1, id2, fn) \
- DECLARE_EVENT_TABLE_ENTRY(evt, id1, id2, fn, NULL),
-#define wx__DECLARE_EVT1(evt, id, fn) \
- wx__DECLARE_EVT2(evt, id, wxID_ANY, fn)
-#define wx__DECLARE_EVT0(evt, fn) \
- wx__DECLARE_EVT1(evt, wxID_ANY, fn)
-
-
-// Generic events
-#define EVT_CUSTOM(event, winid, func) \
- wx__DECLARE_EVT1(event, winid, wxEventHandler(func))
-#define EVT_CUSTOM_RANGE(event, id1, id2, func) \
- wx__DECLARE_EVT2(event, id1, id2, wxEventHandler(func))
-
-// EVT_COMMAND
-#define EVT_COMMAND(winid, event, func) \
- wx__DECLARE_EVT1(event, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_RANGE(id1, id2, event, func) \
- wx__DECLARE_EVT2(event, id1, id2, wxCommandEventHandler(func))
-
-#define EVT_NOTIFY(event, winid, func) \
- wx__DECLARE_EVT1(event, winid, wxNotifyEventHandler(func))
-#define EVT_NOTIFY_RANGE(event, id1, id2, func) \
- wx__DECLARE_EVT2(event, id1, id2, wxNotifyEventHandler(func))
-
-// Miscellaneous
-#define EVT_SIZE(func) wx__DECLARE_EVT0(wxEVT_SIZE, wxSizeEventHandler(func))
-#define EVT_SIZING(func) wx__DECLARE_EVT0(wxEVT_SIZING, wxSizeEventHandler(func))
-#define EVT_MOVE(func) wx__DECLARE_EVT0(wxEVT_MOVE, wxMoveEventHandler(func))
-#define EVT_MOVING(func) wx__DECLARE_EVT0(wxEVT_MOVING, wxMoveEventHandler(func))
-#define EVT_CLOSE(func) wx__DECLARE_EVT0(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(func))
-#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func))
-#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func))
-#define EVT_PAINT(func) wx__DECLARE_EVT0(wxEVT_PAINT, wxPaintEventHandler(func))
-#define EVT_NC_PAINT(func) wx__DECLARE_EVT0(wxEVT_NC_PAINT, wxNcPaintEventHandler(func))
-#define EVT_ERASE_BACKGROUND(func) wx__DECLARE_EVT0(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(func))
-#define EVT_CHAR(func) wx__DECLARE_EVT0(wxEVT_CHAR, wxCharEventHandler(func))
-#define EVT_KEY_DOWN(func) wx__DECLARE_EVT0(wxEVT_KEY_DOWN, wxKeyEventHandler(func))
-#define EVT_KEY_UP(func) wx__DECLARE_EVT0(wxEVT_KEY_UP, wxKeyEventHandler(func))
-#if wxUSE_HOTKEY
-#define EVT_HOTKEY(winid, func) wx__DECLARE_EVT1(wxEVT_HOTKEY, winid, wxCharEventHandler(func))
-#endif
-#define EVT_CHAR_HOOK(func) wx__DECLARE_EVT0(wxEVT_CHAR_HOOK, wxCharEventHandler(func))
-#define EVT_MENU_OPEN(func) wx__DECLARE_EVT0(wxEVT_MENU_OPEN, wxMenuEventHandler(func))
-#define EVT_MENU_CLOSE(func) wx__DECLARE_EVT0(wxEVT_MENU_CLOSE, wxMenuEventHandler(func))
-#define EVT_MENU_HIGHLIGHT(winid, func) wx__DECLARE_EVT1(wxEVT_MENU_HIGHLIGHT, winid, wxMenuEventHandler(func))
-#define EVT_MENU_HIGHLIGHT_ALL(func) wx__DECLARE_EVT0(wxEVT_MENU_HIGHLIGHT, wxMenuEventHandler(func))
-#define EVT_SET_FOCUS(func) wx__DECLARE_EVT0(wxEVT_SET_FOCUS, wxFocusEventHandler(func))
-#define EVT_KILL_FOCUS(func) wx__DECLARE_EVT0(wxEVT_KILL_FOCUS, wxFocusEventHandler(func))
-#define EVT_CHILD_FOCUS(func) wx__DECLARE_EVT0(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(func))
-#define EVT_ACTIVATE(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE, wxActivateEventHandler(func))
-#define EVT_ACTIVATE_APP(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE_APP, wxActivateEventHandler(func))
-#define EVT_HIBERNATE(func) wx__DECLARE_EVT0(wxEVT_HIBERNATE, wxActivateEventHandler(func))
-#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func))
-#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func))
-#define EVT_DROP_FILES(func) wx__DECLARE_EVT0(wxEVT_DROP_FILES, wxDropFilesEventHandler(func))
-#define EVT_INIT_DIALOG(func) wx__DECLARE_EVT0(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(func))
-#define EVT_SYS_COLOUR_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEventHandler(func))
-#define EVT_DISPLAY_CHANGED(func) wx__DECLARE_EVT0(wxEVT_DISPLAY_CHANGED, wxDisplayChangedEventHandler(func))
-#define EVT_SHOW(func) wx__DECLARE_EVT0(wxEVT_SHOW, wxShowEventHandler(func))
-#define EVT_MAXIMIZE(func) wx__DECLARE_EVT0(wxEVT_MAXIMIZE, wxMaximizeEventHandler(func))
-#define EVT_ICONIZE(func) wx__DECLARE_EVT0(wxEVT_ICONIZE, wxIconizeEventHandler(func))
-#define EVT_NAVIGATION_KEY(func) wx__DECLARE_EVT0(wxEVT_NAVIGATION_KEY, wxNavigationKeyEventHandler(func))
-#define EVT_PALETTE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_PALETTE_CHANGED, wxPaletteChangedEventHandler(func))
-#define EVT_QUERY_NEW_PALETTE(func) wx__DECLARE_EVT0(wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEventHandler(func))
-#define EVT_WINDOW_CREATE(func) wx__DECLARE_EVT0(wxEVT_CREATE, wxWindowCreateEventHandler(func))
-#define EVT_WINDOW_DESTROY(func) wx__DECLARE_EVT0(wxEVT_DESTROY, wxWindowDestroyEventHandler(func))
-#define EVT_SET_CURSOR(func) wx__DECLARE_EVT0(wxEVT_SET_CURSOR, wxSetCursorEventHandler(func))
-#define EVT_MOUSE_CAPTURE_CHANGED(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEventHandler(func))
-#define EVT_MOUSE_CAPTURE_LOST(func) wx__DECLARE_EVT0(wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEventHandler(func))
-
-// Mouse events
-#define EVT_LEFT_DOWN(func) wx__DECLARE_EVT0(wxEVT_LEFT_DOWN, wxMouseEventHandler(func))
-#define EVT_LEFT_UP(func) wx__DECLARE_EVT0(wxEVT_LEFT_UP, wxMouseEventHandler(func))
-#define EVT_MIDDLE_DOWN(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DOWN, wxMouseEventHandler(func))
-#define EVT_MIDDLE_UP(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_UP, wxMouseEventHandler(func))
-#define EVT_RIGHT_DOWN(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DOWN, wxMouseEventHandler(func))
-#define EVT_RIGHT_UP(func) wx__DECLARE_EVT0(wxEVT_RIGHT_UP, wxMouseEventHandler(func))
-#define EVT_MOTION(func) wx__DECLARE_EVT0(wxEVT_MOTION, wxMouseEventHandler(func))
-#define EVT_LEFT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_LEFT_DCLICK, wxMouseEventHandler(func))
-#define EVT_MIDDLE_DCLICK(func) wx__DECLARE_EVT0(wxEVT_MIDDLE_DCLICK, wxMouseEventHandler(func))
-#define EVT_RIGHT_DCLICK(func) wx__DECLARE_EVT0(wxEVT_RIGHT_DCLICK, wxMouseEventHandler(func))
-#define EVT_LEAVE_WINDOW(func) wx__DECLARE_EVT0(wxEVT_LEAVE_WINDOW, wxMouseEventHandler(func))
-#define EVT_ENTER_WINDOW(func) wx__DECLARE_EVT0(wxEVT_ENTER_WINDOW, wxMouseEventHandler(func))
-#define EVT_MOUSEWHEEL(func) wx__DECLARE_EVT0(wxEVT_MOUSEWHEEL, wxMouseEventHandler(func))
-
-// All mouse events
-#define EVT_MOUSE_EVENTS(func) \
- EVT_LEFT_DOWN(func) \
- EVT_LEFT_UP(func) \
- EVT_MIDDLE_DOWN(func) \
- EVT_MIDDLE_UP(func) \
- EVT_RIGHT_DOWN(func) \
- EVT_RIGHT_UP(func) \
- EVT_MOTION(func) \
- EVT_LEFT_DCLICK(func) \
- EVT_MIDDLE_DCLICK(func) \
- EVT_RIGHT_DCLICK(func) \
- EVT_LEAVE_WINDOW(func) \
- EVT_ENTER_WINDOW(func) \
- EVT_MOUSEWHEEL(func)
-
-// Scrolling from wxWindow (sent to wxScrolledWindow)
-#define EVT_SCROLLWIN_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_TOP, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEUP, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEventHandler(func))
-#define EVT_SCROLLWIN_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEventHandler(func))
-
-#define EVT_SCROLLWIN(func) \
- EVT_SCROLLWIN_TOP(func) \
- EVT_SCROLLWIN_BOTTOM(func) \
- EVT_SCROLLWIN_LINEUP(func) \
- EVT_SCROLLWIN_LINEDOWN(func) \
- EVT_SCROLLWIN_PAGEUP(func) \
- EVT_SCROLLWIN_PAGEDOWN(func) \
- EVT_SCROLLWIN_THUMBTRACK(func) \
- EVT_SCROLLWIN_THUMBRELEASE(func)
-
-// Scrolling from wxSlider and wxScrollBar
-#define EVT_SCROLL_TOP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_TOP, wxScrollEventHandler(func))
-#define EVT_SCROLL_BOTTOM(func) wx__DECLARE_EVT0(wxEVT_SCROLL_BOTTOM, wxScrollEventHandler(func))
-#define EVT_SCROLL_LINEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEUP, wxScrollEventHandler(func))
-#define EVT_SCROLL_LINEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler(func))
-#define EVT_SCROLL_PAGEUP(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEUP, wxScrollEventHandler(func))
-#define EVT_SCROLL_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(func))
-#define EVT_SCROLL_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(func))
-#define EVT_SCROLL_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(func))
-#define EVT_SCROLL_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(func))
-
-#define EVT_SCROLL(func) \
- EVT_SCROLL_TOP(func) \
- EVT_SCROLL_BOTTOM(func) \
- EVT_SCROLL_LINEUP(func) \
- EVT_SCROLL_LINEDOWN(func) \
- EVT_SCROLL_PAGEUP(func) \
- EVT_SCROLL_PAGEDOWN(func) \
- EVT_SCROLL_THUMBTRACK(func) \
- EVT_SCROLL_THUMBRELEASE(func) \
- EVT_SCROLL_CHANGED(func)
-
-// Scrolling from wxSlider and wxScrollBar, with an id
-#define EVT_COMMAND_SCROLL_TOP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_TOP, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_BOTTOM(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_BOTTOM, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_LINEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEUP, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_LINEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_LINEDOWN, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_PAGEUP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEUP, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEDOWN, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBRELEASE, winid, wxScrollEventHandler(func))
-#define EVT_COMMAND_SCROLL_CHANGED(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_CHANGED, winid, wxScrollEventHandler(func))
-
-#define EVT_COMMAND_SCROLL(winid, func) \
- EVT_COMMAND_SCROLL_TOP(winid, func) \
- EVT_COMMAND_SCROLL_BOTTOM(winid, func) \
- EVT_COMMAND_SCROLL_LINEUP(winid, func) \
- EVT_COMMAND_SCROLL_LINEDOWN(winid, func) \
- EVT_COMMAND_SCROLL_PAGEUP(winid, func) \
- EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) \
- EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) \
- EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \
- EVT_COMMAND_SCROLL_CHANGED(winid, func)
-
-#if WXWIN_COMPATIBILITY_2_6
- // compatibility macros for the old name, deprecated in 2.8
- #define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED
- #define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED
- #define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED
-#endif // WXWIN_COMPATIBILITY_2_6
-
-// Convenience macros for commonly-used commands
-#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func))
-#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICE_SELECTED, winid, wxCommandEventHandler(func))
-#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_SELECTED, winid, wxCommandEventHandler(func))
-#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, winid, wxCommandEventHandler(func))
-#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func))
-#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_MENU_SELECTED, id1, id2, wxCommandEventHandler(func))
-#if defined(__SMARTPHONE__)
-# define EVT_BUTTON(winid, func) EVT_MENU(winid, func)
-#else
-# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func))
-#endif
-#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SLIDER_UPDATED, winid, wxCommandEventHandler(func))
-#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBOX_SELECTED, winid, wxCommandEventHandler(func))
-#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBUTTON_SELECTED, winid, wxCommandEventHandler(func))
-// EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events
-#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SCROLLBAR_UPDATED, winid, wxCommandEventHandler(func))
-#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_VLBOX_SELECTED, winid, wxCommandEventHandler(func))
-#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxCommandEventHandler(func))
-#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_CLICKED, winid, wxCommandEventHandler(func))
-#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_CLICKED, id1, id2, wxCommandEventHandler(func))
-#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_RCLICKED, winid, wxCommandEventHandler(func))
-#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func))
-#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_ENTER, winid, wxCommandEventHandler(func))
-#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, winid, wxCommandEventHandler(func))
-
-// Generic command events
-#define EVT_COMMAND_LEFT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_CLICK, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_LEFT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_DCLICK, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_RIGHT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_CLICK, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_RIGHT_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RIGHT_DCLICK, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_SET_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SET_FOCUS, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_KILL_FOCUS(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_KILL_FOCUS, winid, wxCommandEventHandler(func))
-#define EVT_COMMAND_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_ENTER, winid, wxCommandEventHandler(func))
-
-// Joystick events
-
-#define EVT_JOY_BUTTON_DOWN(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_DOWN, wxJoystickEventHandler(func))
-#define EVT_JOY_BUTTON_UP(func) wx__DECLARE_EVT0(wxEVT_JOY_BUTTON_UP, wxJoystickEventHandler(func))
-#define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func))
-#define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func))
-
-// These are obsolete, see _BUTTON_ events
-#if WXWIN_COMPATIBILITY_2_4
- #define EVT_JOY_DOWN(func) EVT_JOY_BUTTON_DOWN(func)
- #define EVT_JOY_UP(func) EVT_JOY_BUTTON_UP(func)
-#endif // WXWIN_COMPATIBILITY_2_4
-
-// All joystick events
-#define EVT_JOYSTICK_EVENTS(func) \
- EVT_JOY_BUTTON_DOWN(func) \
- EVT_JOY_BUTTON_UP(func) \
- EVT_JOY_MOVE(func) \
- EVT_JOY_ZMOVE(func)
-
-// Idle event
-#define EVT_IDLE(func) wx__DECLARE_EVT0(wxEVT_IDLE, wxIdleEventHandler(func))
-
-// Update UI event
-#define EVT_UPDATE_UI(winid, func) wx__DECLARE_EVT1(wxEVT_UPDATE_UI, winid, wxUpdateUIEventHandler(func))
-#define EVT_UPDATE_UI_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_UPDATE_UI, id1, id2, wxUpdateUIEventHandler(func))
-
-// Help events
-#define EVT_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_HELP, winid, wxHelpEventHandler(func))
-#define EVT_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_HELP, id1, id2, wxHelpEventHandler(func))
-#define EVT_DETAILED_HELP(winid, func) wx__DECLARE_EVT1(wxEVT_DETAILED_HELP, winid, wxHelpEventHandler(func))
-#define EVT_DETAILED_HELP_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_DETAILED_HELP, id1, id2, wxHelpEventHandler(func))
-
-// Context Menu Events
-#define EVT_CONTEXT_MENU(func) wx__DECLARE_EVT0(wxEVT_CONTEXT_MENU, wxContextMenuEventHandler(func))
-#define EVT_COMMAND_CONTEXT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_CONTEXT_MENU, winid, wxContextMenuEventHandler(func))
-
-// Clipboard text Events
-#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_CUT, winid, wxClipboardTextEventHandler(func))
-#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_COPY, winid, wxClipboardTextEventHandler(func))
-#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_PASTE, winid, wxClipboardTextEventHandler(func))
-
-// ----------------------------------------------------------------------------
-// Global data
-// ----------------------------------------------------------------------------
-
-// for pending event processing - notice that there is intentionally no
-// WXDLLEXPORT here
-extern WXDLLIMPEXP_BASE wxList *wxPendingEvents;
-#if wxUSE_THREADS
- extern WXDLLIMPEXP_BASE wxCriticalSection *wxPendingEventsLocker;
-#endif
-
-// ----------------------------------------------------------------------------
-// Helper functions
-// ----------------------------------------------------------------------------
-
-#if wxUSE_GUI
-
-// Find a window with the focus, that is also a descendant of the given window.
-// This is used to determine the window to initially send commands to.
-WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor);
-
-#endif // wxUSE_GUI
-
-#endif // _WX_EVENT_H__
diff --git a/desmume/src/windows/wx/include/wx/evtloop.h b/desmume/src/windows/wx/include/wx/evtloop.h
deleted file mode 100644
index 51b58eb55..000000000
--- a/desmume/src/windows/wx/include/wx/evtloop.h
+++ /dev/null
@@ -1,229 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/evtloop.h
-// Purpose: declares wxEventLoop class
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 01.06.01
-// RCS-ID: $Id: evtloop.h 53607 2008-05-16 15:21:40Z SN $
-// Copyright: (c) 2001 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_EVTLOOP_H_
-#define _WX_EVTLOOP_H_
-
-#include "wx/utils.h"
-
-class WXDLLIMPEXP_FWD_CORE wxEventLoop;
-
-// ----------------------------------------------------------------------------
-// wxEventLoop: a GUI event loop
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxEventLoopBase
-{
-public:
- // trivial, but needed (because of wxEventLoopBase) ctor
- wxEventLoopBase() { }
-
- // dtor
- virtual ~wxEventLoopBase() { }
-
- // start the event loop, return the exit code when it is finished
- virtual int Run() = 0;
-
- // exit from the loop with the given exit code
- virtual void Exit(int rc = 0) = 0;
-
- // return true if any events are available
- virtual bool Pending() const = 0;
-
- // dispatch a single event, return false if we should exit from the loop
- virtual bool Dispatch() = 0;
-
- // return currently active (running) event loop, may be NULL
- static wxEventLoop *GetActive() { return ms_activeLoop; }
-
- // set currently active (running) event loop
- static void SetActive(wxEventLoop* loop) { ms_activeLoop = loop; }
-
- // is this event loop running now?
- //
- // notice that even if this event loop hasn't terminated yet but has just
- // spawned a nested (e.g. modal) event loop, this would return false
- bool IsRunning() const;
-
-protected:
- // this function should be called before the event loop terminates, whether
- // this happens normally (because of Exit() call) or abnormally (because of
- // an exception thrown from inside the loop)
- virtual void OnExit() { }
-
-
- // the pointer to currently active loop
- static wxEventLoop *ms_activeLoop;
-
- DECLARE_NO_COPY_CLASS(wxEventLoopBase)
-};
-
-#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXDFB__)
-
-// this class can be used to implement a standard event loop logic using
-// Pending() and Dispatch()
-//
-// it also handles idle processing automatically
-class WXDLLEXPORT wxEventLoopManual : public wxEventLoopBase
-{
-public:
- wxEventLoopManual();
-
- // enters a loop calling OnNextIteration(), Pending() and Dispatch() and
- // terminating when Exit() is called
- virtual int Run();
-
- // sets the "should exit" flag and wakes up the loop so that it terminates
- // soon
- virtual void Exit(int rc = 0);
-
-protected:
- // implement this to wake up the loop: usually done by posting a dummy event
- // to it (called from Exit())
- virtual void WakeUp() = 0;
-
- // may be overridden to perform some action at the start of each new event
- // loop iteration
- virtual void OnNextIteration() { }
-
-
- // the loop exit code
- int m_exitcode;
-
- // should we exit the loop?
- bool m_shouldExit;
-};
-
-#endif // platforms using "manual" loop
-
-// we're moving away from old m_impl wxEventLoop model as otherwise the user
-// code doesn't have access to platform-specific wxEventLoop methods and this
-// can sometimes be very useful (e.g. under MSW this is necessary for
-// integration with MFC) but currently this is done for MSW only, other ports
-// should follow a.s.a.p.
-#if defined(__WXPALMOS__)
- #include "wx/palmos/evtloop.h"
-#elif defined(__WXMSW__)
- #include "wx/msw/evtloop.h"
-#elif defined(__WXMAC__)
- #include "wx/mac/evtloop.h"
-#elif defined(__WXDFB__)
- #include "wx/dfb/evtloop.h"
-#else // other platform
-
-class WXDLLEXPORT wxEventLoopImpl;
-
-class WXDLLEXPORT wxEventLoop : public wxEventLoopBase
-{
-public:
- wxEventLoop() { m_impl = NULL; }
- virtual ~wxEventLoop();
-
- virtual int Run();
- virtual void Exit(int rc = 0);
- virtual bool Pending() const;
- virtual bool Dispatch();
-
-protected:
- // the pointer to the port specific implementation class
- wxEventLoopImpl *m_impl;
-
- DECLARE_NO_COPY_CLASS(wxEventLoop)
-};
-
-#endif // platforms
-
-inline bool wxEventLoopBase::IsRunning() const { return GetActive() == this; }
-
-// ----------------------------------------------------------------------------
-// wxModalEventLoop
-// ----------------------------------------------------------------------------
-
-// this is a naive generic implementation which uses wxWindowDisabler to
-// implement modality, we will surely need platform-specific implementations
-// too, this generic implementation is here only temporarily to see how it
-// works
-class WXDLLEXPORT wxModalEventLoop : public wxEventLoop
-{
-public:
- wxModalEventLoop(wxWindow *winModal)
- {
- m_windowDisabler = new wxWindowDisabler(winModal);
- }
-
-protected:
- virtual void OnExit()
- {
- delete m_windowDisabler;
- m_windowDisabler = NULL;
-
- wxEventLoop::OnExit();
- }
-
-private:
- wxWindowDisabler *m_windowDisabler;
-};
-
-// ----------------------------------------------------------------------------
-// wxEventLoopActivator: helper class for wxEventLoop implementations
-// ----------------------------------------------------------------------------
-
-// this object sets the wxEventLoop given to the ctor as the currently active
-// one and unsets it in its dtor, this is especially useful in presence of
-// exceptions but is more tidy even when we don't use them
-class wxEventLoopActivator
-{
-public:
- wxEventLoopActivator(wxEventLoop *evtLoop)
- {
- m_evtLoopOld = wxEventLoop::GetActive();
- wxEventLoop::SetActive(evtLoop);
- }
-
- ~wxEventLoopActivator()
- {
- // restore the previously active event loop
- wxEventLoop::SetActive(m_evtLoopOld);
- }
-
-private:
- wxEventLoop *m_evtLoopOld;
-};
-
-#if wxABI_VERSION >= 20808
-class wxEventLoopGuarantor
-{
-public:
- wxEventLoopGuarantor()
- {
- m_evtLoopNew = NULL;
- if (!wxEventLoop::GetActive())
- {
- m_evtLoopNew = new wxEventLoop;
- wxEventLoop::SetActive(m_evtLoopNew);
- }
- }
-
- ~wxEventLoopGuarantor()
- {
- if (m_evtLoopNew)
- {
- wxEventLoop::SetActive(NULL);
- delete m_evtLoopNew;
- }
- }
-
-private:
- wxEventLoop *m_evtLoopNew;
-};
-#endif // wxABI_VERSION >= 20805
-
-#endif // _WX_EVTLOOP_H_
diff --git a/desmume/src/windows/wx/include/wx/except.h b/desmume/src/windows/wx/include/wx/except.h
deleted file mode 100644
index 9276db65b..000000000
--- a/desmume/src/windows/wx/include/wx/except.h
+++ /dev/null
@@ -1,30 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/except.h
-// Purpose: C++ exception related stuff
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 17.09.2003
-// RCS-ID: $Id: except.h 27408 2004-05-23 20:53:33Z JS $
-// Copyright: (c) 2003 Vadim Zeitlin
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_EXCEPT_H_
-#define _WX_EXCEPT_H_
-
-#include "wx/defs.h"
-
-// ----------------------------------------------------------------------------
-// macros working whether wxUSE_EXCEPTIONS is 0 or 1
-// ----------------------------------------------------------------------------
-
-#if wxUSE_EXCEPTIONS
- #define wxTRY try
- #define wxCATCH_ALL(code) catch ( ... ) { code }
-#else // !wxUSE_EXCEPTIONS
- #define wxTRY
- #define wxCATCH_ALL(code)
-#endif // wxUSE_EXCEPTIONS/!wxUSE_EXCEPTIONS
-
-#endif // _WX_EXCEPT_H_
-
diff --git a/desmume/src/windows/wx/include/wx/fdrepdlg.h b/desmume/src/windows/wx/include/wx/fdrepdlg.h
deleted file mode 100644
index 43e8c4cef..000000000
--- a/desmume/src/windows/wx/include/wx/fdrepdlg.h
+++ /dev/null
@@ -1,195 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/fdrepdlg.h
-// Purpose: wxFindReplaceDialog class
-// Author: Markus Greither and Vadim Zeitlin
-// Modified by:
-// Created: 23/03/2001
-// RCS-ID:
-// Copyright: (c) Markus Greither
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FINDREPLACEDLG_H_
-#define _WX_FINDREPLACEDLG_H_
-
-#include "wx/defs.h"
-
-#if wxUSE_FINDREPLDLG
-
-#include "wx/dialog.h"
-
-class WXDLLIMPEXP_FWD_CORE wxFindDialogEvent;
-class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialog;
-class WXDLLIMPEXP_FWD_CORE wxFindReplaceData;
-class WXDLLIMPEXP_FWD_CORE wxFindReplaceDialogImpl;
-
-// ----------------------------------------------------------------------------
-// Flags for wxFindReplaceData.Flags
-// ----------------------------------------------------------------------------
-
-// flages used by wxFindDialogEvent::GetFlags()
-enum wxFindReplaceFlags
-{
- // downward search/replace selected (otherwise - upwards)
- wxFR_DOWN = 1,
-
- // whole word search/replace selected
- wxFR_WHOLEWORD = 2,
-
- // case sensitive search/replace selected (otherwise - case insensitive)
- wxFR_MATCHCASE = 4
-};
-
-// these flags can be specified in wxFindReplaceDialog ctor or Create()
-enum wxFindReplaceDialogStyles
-{
- // replace dialog (otherwise find dialog)
- wxFR_REPLACEDIALOG = 1,
-
- // don't allow changing the search direction
- wxFR_NOUPDOWN = 2,
-
- // don't allow case sensitive searching
- wxFR_NOMATCHCASE = 4,
-
- // don't allow whole word searching
- wxFR_NOWHOLEWORD = 8
-};
-
-// ----------------------------------------------------------------------------
-// wxFindReplaceData: holds Setup Data/Feedback Data for wxFindReplaceDialog
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFindReplaceData : public wxObject
-{
-public:
- wxFindReplaceData() { Init(); }
- wxFindReplaceData(wxUint32 flags) { Init(); SetFlags(flags); }
-
- // accessors
- const wxString& GetFindString() { return m_FindWhat; }
- const wxString& GetReplaceString() { return m_ReplaceWith; }
-
- int GetFlags() const { return m_Flags; }
-
- // setters: may only be called before showing the dialog, no effect later
- void SetFlags(wxUint32 flags) { m_Flags = flags; }
-
- void SetFindString(const wxString& str) { m_FindWhat = str; }
- void SetReplaceString(const wxString& str) { m_ReplaceWith = str; }
-
-protected:
- void Init();
-
-private:
- wxUint32 m_Flags;
- wxString m_FindWhat,
- m_ReplaceWith;
-
- friend class wxFindReplaceDialogBase;
-};
-
-// ----------------------------------------------------------------------------
-// wxFindReplaceDialogBase
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFindReplaceDialogBase : public wxDialog
-{
-public:
- // ctors and such
- wxFindReplaceDialogBase() { m_FindReplaceData = NULL; }
- wxFindReplaceDialogBase(wxWindow * WXUNUSED(parent),
- wxFindReplaceData *data,
- const wxString& WXUNUSED(title),
- int WXUNUSED(style) = 0)
- {
- m_FindReplaceData = data;
- }
-
- virtual ~wxFindReplaceDialogBase();
-
- // find dialog data access
- const wxFindReplaceData *GetData() const { return m_FindReplaceData; }
- void SetData(wxFindReplaceData *data) { m_FindReplaceData = data; }
-
- // implementation only, don't use
- void Send(wxFindDialogEvent& event);
-
-protected:
- wxFindReplaceData *m_FindReplaceData;
-
- // the last string we searched for
- wxString m_lastSearch;
-
- DECLARE_NO_COPY_CLASS(wxFindReplaceDialogBase)
-};
-
-// include wxFindReplaceDialog declaration
-#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__WXWINCE__)
- #include "wx/msw/fdrepdlg.h"
-#else
- #define wxGenericFindReplaceDialog wxFindReplaceDialog
-
- #include "wx/generic/fdrepdlg.h"
-#endif
-
-// ----------------------------------------------------------------------------
-// wxFindReplaceDialog events
-// ----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFindDialogEvent : public wxCommandEvent
-{
-public:
- wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
- : wxCommandEvent(commandType, id) { }
-
- int GetFlags() const { return GetInt(); }
- wxString GetFindString() const { return GetString(); }
- const wxString& GetReplaceString() const { return m_strReplace; }
-
- wxFindReplaceDialog *GetDialog() const
- { return wxStaticCast(GetEventObject(), wxFindReplaceDialog); }
-
- // implementation only
- void SetFlags(int flags) { SetInt(flags); }
- void SetFindString(const wxString& str) { SetString(str); }
- void SetReplaceString(const wxString& str) { m_strReplace = str; }
-
-private:
- wxString m_strReplace;
-
- DECLARE_DYNAMIC_CLASS_NO_COPY(wxFindDialogEvent)
-};
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND, 510)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_NEXT, 511)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_REPLACE, 512)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_REPLACE_ALL, 513)
- DECLARE_EVENT_TYPE(wxEVT_COMMAND_FIND_CLOSE, 514)
-END_DECLARE_EVENT_TYPES()
-
-typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&);
-
-#define wxFindDialogEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFindDialogEventFunction, &func)
-
-#define EVT_FIND(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_FIND, id, wxFindDialogEventHandler(fn))
-
-#define EVT_FIND_NEXT(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_NEXT, id, wxFindDialogEventHandler(fn))
-
-#define EVT_FIND_REPLACE(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE, id, wxFindDialogEventHandler(fn))
-
-#define EVT_FIND_REPLACE_ALL(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn))
-
-#define EVT_FIND_CLOSE(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_CLOSE, id, wxFindDialogEventHandler(fn))
-
-#endif // wxUSE_FINDREPLDLG
-
-#endif
- // _WX_FDREPDLG_H
diff --git a/desmume/src/windows/wx/include/wx/features.h b/desmume/src/windows/wx/include/wx/features.h
deleted file mode 100644
index e9c055495..000000000
--- a/desmume/src/windows/wx/include/wx/features.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
-* Name: wx/features.h
-* Purpose: test macros for the features which might be available in some
-* wxWidgets ports but not others
-* Author: Vadim Zeitlin
-* Modified by: Ryan Norton (Converted to C)
-* Created: 18.03.02
-* RCS-ID: $Id: features.h 40865 2006-08-27 09:42:42Z VS $
-* Copyright: (c) 2002 Vadim Zeitlin
-* Licence: wxWindows licence
-*/
-
-/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
-
-#ifndef _WX_FEATURES_H_
-#define _WX_FEATURES_H_
-
-/* radio menu items are currently not implemented in wxMotif, use this
- symbol (kept for compatibility from the time when they were not implemented
- under other platforms as well) to test for this */
-#if !defined(__WXMOTIF__)
- #define wxHAS_RADIO_MENU_ITEMS
-#else
- #undef wxHAS_RADIO_MENU_ITEMS
-#endif
-
-/* the raw keyboard codes are generated under wxGTK and wxMSW only */
-#if defined(__WXGTK__) || defined(__WXMSW__) || defined(__WXMAC__) \
- || defined(__WXDFB__)
- #define wxHAS_RAW_KEY_CODES
-#else
- #undef wxHAS_RAW_KEY_CODES
-#endif
-
-/* taskbar is implemented in the major ports */
-#if defined(__WXMSW__) || defined(__WXCOCOA__) \
- || defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXX11__) \
- || defined(__WXMAC_OSX__) || defined(__WXCOCOA__)
- #define wxHAS_TASK_BAR_ICON
-#else
- #undef wxHAS_TASK_BAR_ICON
-#endif
-
-/* wxIconLocation appeared in the middle of 2.5.0 so it's handy to have a */
-/* separate define for it */
-#define wxHAS_ICON_LOCATION
-
-/* same for wxCrashReport */
-#ifdef __WXMSW__
- #define wxHAS_CRASH_REPORT
-#else
- #undef wxHAS_CRASH_REPORT
-#endif
-
-/* wxRE_ADVANCED is not always available, depending on regex library used
- * (it's unavailable only if compiling via configure against system library) */
-#ifndef WX_NO_REGEX_ADVANCED
- #define wxHAS_REGEX_ADVANCED
-#else
- #undef wxHAS_REGEX_ADVANCED
-#endif
-
-#endif /* _WX_FEATURES_H_ */
-
diff --git a/desmume/src/windows/wx/include/wx/ffile.h b/desmume/src/windows/wx/include/wx/ffile.h
deleted file mode 100644
index c3dda75d4..000000000
--- a/desmume/src/windows/wx/include/wx/ffile.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/ffile.h
-// Purpose: wxFFile - encapsulates "FILE *" stream
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 14.07.99
-// RCS-ID: $Id: ffile.h 38570 2006-04-05 14:37:47Z VZ $
-// Copyright: (c) 1998 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FFILE_H_
-#define _WX_FFILE_H_
-
-#include "wx/defs.h" // for wxUSE_FFILE
-
-#if wxUSE_FFILE
-
-#include "wx/string.h"
-#include "wx/filefn.h"
-#include "wx/convauto.h"
-
-#include
-
-// ----------------------------------------------------------------------------
-// class wxFFile: standard C stream library IO
-//
-// NB: for space efficiency this class has no virtual functions, including
-// dtor which is _not_ virtual, so it shouldn't be used as a base class.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxFFile
-{
-public:
- // ctors
- // -----
- // def ctor
- wxFFile() { m_fp = NULL; }
- // open specified file (may fail, use IsOpened())
- wxFFile(const wxChar *filename, const wxChar *mode = _T("r"));
- // attach to (already opened) file
- wxFFile(FILE *lfp) { m_fp = lfp; }
-
- // open/close
- // open a file (existing or not - the mode controls what happens)
- bool Open(const wxChar *filename, const wxChar *mode = _T("r"));
- // closes the opened file (this is a NOP if not opened)
- bool Close();
-
- // assign an existing file descriptor and get it back from wxFFile object
- void Attach(FILE *lfp, const wxString& name = wxEmptyString)
- { Close(); m_fp = lfp; m_name = name; }
- void Detach() { m_fp = NULL; }
- FILE *fp() const { return m_fp; }
-
- // read/write (unbuffered)
- // read all data from the file into a string (useful for text files)
- bool ReadAll(wxString *str, const wxMBConv& conv = wxConvAuto());
- // returns number of bytes read - use Eof() and Error() to see if an error
- // occurred or not
- size_t Read(void *pBuf, size_t nCount);
- // returns the number of bytes written
- size_t Write(const void *pBuf, size_t nCount);
- // returns true on success
- bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto())
- {
- const wxWX2MBbuf buf = s.mb_str(conv);
- size_t size = strlen(buf);
- return Write((const char *)buf, size) == size;
- }
- // flush data not yet written
- bool Flush();
-
- // file pointer operations (return ofsInvalid on failure)
- // move ptr ofs bytes related to start/current pos/end of file
- bool Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
- // move ptr to ofs bytes before the end
- bool SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); }
- // get current position in the file
- wxFileOffset Tell() const;
- // get current file length
- wxFileOffset Length() const;
-
- // simple accessors: note that Eof() and Error() may only be called if
- // IsOpened()!
- // is file opened?
- bool IsOpened() const { return m_fp != NULL; }
- // is end of file reached?
- bool Eof() const { return feof(m_fp) != 0; }
- // has an error occurred?
- bool Error() const { return ferror(m_fp) != 0; }
- // get the file name
- const wxString& GetName() const { return m_name; }
- // type such as disk or pipe
- wxFileKind GetKind() const { return wxGetFileKind(m_fp); }
-
- // dtor closes the file if opened
- ~wxFFile() { Close(); }
-
-private:
- // copy ctor and assignment operator are private because it doesn't make
- // sense to copy files this way: attempt to do it will provoke a compile-time
- // error.
- wxFFile(const wxFFile&);
- wxFFile& operator=(const wxFFile&);
-
- FILE *m_fp; // IO stream or NULL if not opened
-
- wxString m_name; // the name of the file (for diagnostic messages)
-};
-
-#endif // wxUSE_FFILE
-
-#endif // _WX_FFILE_H_
-
diff --git a/desmume/src/windows/wx/include/wx/file.h b/desmume/src/windows/wx/include/wx/file.h
deleted file mode 100644
index 1691dc0c4..000000000
--- a/desmume/src/windows/wx/include/wx/file.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: file.h
-// Purpose: wxFile - encapsulates low-level "file descriptor"
-// wxTempFile - safely replace the old file
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 29/01/98
-// RCS-ID: $Id: file.h 46331 2007-06-05 13:16:11Z JS $
-// Copyright: (c) 1998 Vadim Zeitlin
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FILEH__
-#define _WX_FILEH__
-
-#include "wx/defs.h"
-
-#if wxUSE_FILE
-
-#include "wx/string.h"
-#include "wx/filefn.h"
-#include "wx/strconv.h"
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// we redefine these constants here because S_IREAD &c are _not_ standard
-// however, we do assume that the values correspond to the Unix umask bits
-#define wxS_IRUSR 00400
-#define wxS_IWUSR 00200
-#define wxS_IXUSR 00100
-
-#define wxS_IRGRP 00040
-#define wxS_IWGRP 00020
-#define wxS_IXGRP 00010
-
-#define wxS_IROTH 00004
-#define wxS_IWOTH 00002
-#define wxS_IXOTH 00001
-
-// default mode for the new files: corresponds to umask 022
-#define wxS_DEFAULT (wxS_IRUSR | wxS_IWUSR | wxS_IRGRP | wxS_IWGRP |\
- wxS_IROTH | wxS_IWOTH)
-
-// ----------------------------------------------------------------------------
-// class wxFile: raw file IO
-//
-// NB: for space efficiency this class has no virtual functions, including
-// dtor which is _not_ virtual, so it shouldn't be used as a base class.
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxFile
-{
-public:
- // more file constants
- // -------------------
- // opening mode
- enum OpenMode { read, write, read_write, write_append, write_excl };
- // standard values for file descriptor
- enum { fd_invalid = -1, fd_stdin, fd_stdout, fd_stderr };
-
- // static functions
- // ----------------
- // check whether a regular file by this name exists
- static bool Exists(const wxChar *name);
- // check whether we can access the given file in given mode
- // (only read and write make sense here)
- static bool Access(const wxChar *name, OpenMode mode);
-
- // ctors
- // -----
- // def ctor
- wxFile() { m_fd = fd_invalid; m_error = false; }
- // open specified file (may fail, use IsOpened())
- wxFile(const wxChar *szFileName, OpenMode mode = read);
- // attach to (already opened) file
- wxFile(int lfd) { m_fd = lfd; m_error = false; }
-
- // open/close
- // create a new file (with the default value of bOverwrite, it will fail if
- // the file already exists, otherwise it will overwrite it and succeed)
- bool Create(const wxChar *szFileName, bool bOverwrite = false,
- int access = wxS_DEFAULT);
- bool Open(const wxChar *szFileName, OpenMode mode = read,
- int access = wxS_DEFAULT);
- bool Close(); // Close is a NOP if not opened
-
- // assign an existing file descriptor and get it back from wxFile object
- void Attach(int lfd) { Close(); m_fd = lfd; m_error = false; }
- void Detach() { m_fd = fd_invalid; }
- int fd() const { return m_fd; }
-
- // read/write (unbuffered)
- // returns number of bytes read or wxInvalidOffset on error
- ssize_t Read(void *pBuf, size_t nCount);
- // returns the number of bytes written
- size_t Write(const void *pBuf, size_t nCount);
- // returns true on success
- bool Write(const wxString& s, const wxMBConv& conv = wxConvUTF8)
- {
- const wxWX2MBbuf buf = s.mb_str(conv);
- if (!buf)
- return false;
- size_t size = strlen(buf);
- return Write((const char *) buf, size) == size;
- }
- // flush data not yet written
- bool Flush();
-
- // file pointer operations (return wxInvalidOffset on failure)
- // move ptr ofs bytes related to start/current offset/end of file
- wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart);
- // move ptr to ofs bytes before the end
- wxFileOffset SeekEnd(wxFileOffset ofs = 0) { return Seek(ofs, wxFromEnd); }
- // get current offset
- wxFileOffset Tell() const;
- // get current file length
- wxFileOffset Length() const;
-
- // simple accessors
- // is file opened?
- bool IsOpened() const { return m_fd != fd_invalid; }
- // is end of file reached?
- bool Eof() const;
- // has an error occurred?
- bool Error() const { return m_error; }
- // type such as disk or pipe
- wxFileKind GetKind() const { return wxGetFileKind(m_fd); }
-
- // dtor closes the file if opened
- ~wxFile() { Close(); }
-
-private:
- // copy ctor and assignment operator are private because
- // it doesn't make sense to copy files this way:
- // attempt to do it will provoke a compile-time error.
- wxFile(const wxFile&);
- wxFile& operator=(const wxFile&);
-
- int m_fd; // file descriptor or INVALID_FD if not opened
- bool m_error; // error memory
-};
-
-// ----------------------------------------------------------------------------
-// class wxTempFile: if you want to replace another file, create an instance
-// of wxTempFile passing the name of the file to be replaced to the ctor. Then
-// you can write to wxTempFile and call Commit() function to replace the old
-// file (and close this one) or call Discard() to cancel the modification. If
-// you call neither of them, dtor will call Discard().
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxTempFile
-{
-public:
- // ctors
- // default
- wxTempFile() { }
- // associates the temp file with the file to be replaced and opens it
- wxTempFile(const wxString& strName);
-
- // open the temp file (strName is the name of file to be replaced)
- bool Open(const wxString& strName);
-
- // is the file opened?
- bool IsOpened() const { return m_file.IsOpened(); }
- // get current file length
- wxFileOffset Length() const { return m_file.Length(); }
- // move ptr ofs bytes related to start/current offset/end of file
- wxFileOffset Seek(wxFileOffset ofs, wxSeekMode mode = wxFromStart)
- { return m_file.Seek(ofs, mode); }
- // get current offset
- wxFileOffset Tell() const { return m_file.Tell(); }
-
- // I/O (both functions return true on success, false on failure)
- bool Write(const void *p, size_t n) { return m_file.Write(p, n) == n; }
- bool Write(const wxString& str, const wxMBConv& conv = wxConvUTF8)
- { return m_file.Write(str, conv); }
-
- // different ways to close the file
- // validate changes and delete the old file of name m_strName
- bool Commit();
- // discard changes
- void Discard();
-
- // dtor calls Discard() if file is still opened
- ~wxTempFile();
-
-private:
- // no copy ctor/assignment operator
- wxTempFile(const wxTempFile&);
- wxTempFile& operator=(const wxTempFile&);
-
- wxString m_strName, // name of the file to replace in Commit()
- m_strTemp; // temporary file name
- wxFile m_file; // the temporary file
-};
-
-#endif // wxUSE_FILE
-
-#endif // _WX_FILEH__
diff --git a/desmume/src/windows/wx/include/wx/fileconf.h b/desmume/src/windows/wx/include/wx/fileconf.h
deleted file mode 100644
index 0a76ab4c8..000000000
--- a/desmume/src/windows/wx/include/wx/fileconf.h
+++ /dev/null
@@ -1,246 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Name: wx/fileconf.h
-// Purpose: wxFileConfig derivation of wxConfigBase
-// Author: Vadim Zeitlin
-// Modified by:
-// Created: 07.04.98 (adapted from appconf.cpp)
-// RCS-ID: $Id: fileconf.h 50711 2007-12-15 02:57:58Z VZ $
-// Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin
-// Ballueder@usa.net
-// Licence: wxWindows licence
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _FILECONF_H
-#define _FILECONF_H
-
-#include "wx/defs.h"
-
-#if wxUSE_CONFIG
-
-#include "wx/textfile.h"
-#include "wx/string.h"
-#include "wx/confbase.h"
-
-// ----------------------------------------------------------------------------
-// wxFileConfig
-// ----------------------------------------------------------------------------
-
-/*
- wxFileConfig derives from base Config and implements file based config class,
- i.e. it uses ASCII disk files to store the information. These files are
- alternatively called INI, .conf or .rc in the documentation. They are
- organized in groups or sections, which can nest (i.e. a group contains
- subgroups, which contain their own subgroups &c). Each group has some
- number of entries, which are "key = value" pairs. More precisely, the format
- is:
-
- # comments are allowed after either ';' or '#' (Win/UNIX standard)
-
- # blank lines (as above) are ignored
-
- # global entries are members of special (no name) top group
- written_for = Windows
- platform = Linux
-
- # the start of the group 'Foo'
- [Foo] # may put comments like this also
- # following 3 lines are entries
- key = value
- another_key = " strings with spaces in the beginning should be quoted, \
- otherwise the spaces are lost"
- last_key = but you don't have to put " normally (nor quote them, like here)
-
- # subgroup of the group 'Foo'
- # (order is not important, only the name is: separator is '/', as in paths)
- [Foo/Bar]
- # entries prefixed with "!" are immutable, i.e. can't be changed if they are
- # set in the system-wide config file
- !special_key = value
- bar_entry = whatever
-
- [Foo/Bar/Fubar] # depth is (theoretically :-) unlimited
- # may have the same name as key in another section
- bar_entry = whatever not
-
- You have {read/write/delete}Entry functions (guess what they do) and also
- setCurrentPath to select current group. enum{Subgroups/Entries} allow you
- to get all entries in the config file (in the current group). Finally,
- flush() writes immediately all changed entries to disk (otherwise it would
- be done automatically in dtor)
-
- wxFileConfig manages not less than 2 config files for each program: global
- and local (or system and user if you prefer). Entries are read from both of
- them and the local entries override the global ones unless the latter is
- immutable (prefixed with '!') in which case a warning message is generated
- and local value is ignored. Of course, the changes are always written to local
- file only.
-
- The names of these files can be specified in a number of ways. First of all,
- you can use the standard convention: using the ctor which takes 'strAppName'
- parameter will probably be sufficient for 90% of cases. If, for whatever
- reason you wish to use the files with some other names, you can always use the
- second ctor.
-
- wxFileConfig also may automatically expand the values of environment variables
- in the entries it reads: for example, if you have an entry
- score_file = $HOME/.score
- a call to Read(&str, "score_file") will return a complete path to .score file
- unless the expansion was previously disabled with SetExpandEnvVars(false) call
- (it's on by default, the current status can be retrieved with
- IsExpandingEnvVars function).
-*/
-class WXDLLIMPEXP_FWD_BASE wxFileConfigGroup;
-class WXDLLIMPEXP_FWD_BASE wxFileConfigEntry;
-class WXDLLIMPEXP_FWD_BASE wxFileConfigLineList;
-
-#if wxUSE_STREAMS
-class WXDLLIMPEXP_FWD_BASE wxInputStream;
-class WXDLLIMPEXP_FWD_BASE wxOutputStream;
-#endif // wxUSE_STREAMS
-
-class WXDLLIMPEXP_BASE wxFileConfig : public wxConfigBase
-{
-public:
- // construct the "standard" full name for global (system-wide) and
- // local (user-specific) config files from the base file name.
- //
- // the following are the filenames returned by this functions:
- // global local
- // Unix /etc/file.ext ~/.file
- // Win %windir%\file.ext %USERPROFILE%\file.ext
- //
- // where file is the basename of szFile, ext is its extension
- // or .conf (Unix) or .ini (Win) if it has none
- static wxString GetGlobalFileName(const wxChar *szFile);
- static wxString GetLocalFileName(const wxChar *szFile);
-
- // ctor & dtor
- // New constructor: one size fits all. Specify wxCONFIG_USE_LOCAL_FILE or
- // wxCONFIG_USE_GLOBAL_FILE to say which files should be used.
- wxFileConfig(const wxString& appName = wxEmptyString,
- const wxString& vendorName = wxEmptyString,
- const wxString& localFilename = wxEmptyString,
- const wxString& globalFilename = wxEmptyString,
- long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE,
- const wxMBConv& conv = wxConvAuto());
-
-#if wxUSE_STREAMS
- // ctor that takes an input stream.
- wxFileConfig(wxInputStream &inStream, const wxMBConv& conv = wxConvAuto());
-#endif // wxUSE_STREAMS
-
- // dtor will save unsaved data
- virtual ~wxFileConfig();
-
- // under Unix, set the umask to be used for the file creation, do nothing
- // under other systems
-#ifdef __UNIX__
- void SetUmask(int mode) { m_umask = mode; }
-#else // !__UNIX__
- void SetUmask(int WXUNUSED(mode)) { }
-#endif // __UNIX__/!__UNIX__
-
- // implement inherited pure virtual functions
- virtual void SetPath(const wxString& strPath);
- virtual const wxString& GetPath() const { return m_strPath; }
-
- virtual bool GetFirstGroup(wxString& str, long& lIndex) const;
- virtual bool GetNextGroup (wxString& str, long& lIndex) const;
- virtual bool GetFirstEntry(wxString& str, long& lIndex) const;
- virtual bool GetNextEntry (wxString& str, long& lIndex) const;
-
- virtual size_t GetNumberOfEntries(bool bRecursive = false) const;
- virtual size_t GetNumberOfGroups(bool bRecursive = false) const;
-
- virtual bool HasGroup(const wxString& strName) const;
- virtual bool HasEntry(const wxString& strName) const;
-
- virtual bool Flush(bool bCurrentOnly = false);
-
- virtual bool RenameEntry(const wxString& oldName, const wxString& newName);
- virtual bool RenameGroup(const wxString& oldName, const wxString& newName);
-
- virtual bool DeleteEntry(const wxString& key, bool bGroupIfEmptyAlso = true);
- virtual bool DeleteGroup(const wxString& szKey);
- virtual bool DeleteAll();
-
- // additional, wxFileConfig-specific, functionality
-#if wxUSE_STREAMS
- // save the entire config file text to the given stream, note that the text
- // won't be saved again in dtor when Flush() is called if you use this method
- // as it won't be "changed" any more
- virtual bool Save(wxOutputStream& os, const wxMBConv& conv = wxConvAuto());
-#endif // wxUSE_STREAMS
-
-public:
- // functions to work with this list
- wxFileConfigLineList *LineListAppend(const wxString& str);
- wxFileConfigLineList *LineListInsert(const wxString& str,
- wxFileConfigLineList *pLine); // NULL => Prepend()
- void LineListRemove(wxFileConfigLineList *pLine);
- bool LineListIsEmpty();
-
-protected:
- virtual bool DoReadString(const wxString& key, wxString *pStr) const;
- virtual bool DoReadLong(const wxString& key, long *pl) const;
-
- virtual bool DoWriteString(const wxString& key, const wxString& szValue);
- virtual bool DoWriteLong(const wxString& key, long lValue);
-
-private:
- // GetXXXFileName helpers: return ('/' terminated) directory names
- static wxString GetGlobalDir();
- static wxString GetLocalDir();
-
- // common part of all ctors (assumes that m_str{Local|Global}File are already
- // initialized
- void Init();
-
- // common part of from dtor and DeleteAll
- void CleanUp();
-
- // parse the whole file
- void Parse(const wxTextBuffer& buffer, bool bLocal);
-
- // the same as SetPath("/")
- void SetRootPath();
-
- // real SetPath() implementation, returns true if path could be set or false
- // if path doesn't exist and createMissingComponents == false
- bool DoSetPath(const wxString& strPath, bool createMissingComponents);
-
- // set/test the dirty flag
- void SetDirty() { m_isDirty = true; }
- void ResetDirty() { m_isDirty = false; }
- bool IsDirty() const { return m_isDirty; }
-
-
- // member variables
- // ----------------
- wxFileConfigLineList *m_linesHead, // head of the linked list
- *m_linesTail; // tail
-
- wxString m_strLocalFile, // local file name passed to ctor
- m_strGlobalFile; // global
- wxString m_strPath; // current path (not '/' terminated)
-
- wxFileConfigGroup *m_pRootGroup, // the top (unnamed) group
- *m_pCurrentGroup; // the current group
-
- wxMBConv *m_conv;
-
-#ifdef __UNIX__
- int m_umask; // the umask to use for file creation
-#endif // __UNIX__
-
- bool m_isDirty; // if true, we have unsaved changes
-
- DECLARE_NO_COPY_CLASS(wxFileConfig)
-};
-
-#endif
- // wxUSE_CONFIG
-
-#endif
- //_FILECONF_H
-
diff --git a/desmume/src/windows/wx/include/wx/filedlg.h b/desmume/src/windows/wx/include/wx/filedlg.h
deleted file mode 100644
index 8f3fc48d5..000000000
--- a/desmume/src/windows/wx/include/wx/filedlg.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/filedlg.h
-// Purpose: wxFileDialog base header
-// Author: Robert Roebling
-// Modified by:
-// Created: 8/17/99
-// Copyright: (c) Robert Roebling
-// RCS-ID: $Id: filedlg.h 44027 2006-12-21 19:26:48Z VZ $
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FILEDLG_H_BASE_
-#define _WX_FILEDLG_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_FILEDLG
-
-#include "wx/dialog.h"
-#include "wx/arrstr.h"
-
-//----------------------------------------------------------------------------
-// wxFileDialog data
-//----------------------------------------------------------------------------
-
-/*
- The flags below must coexist with the following flags in m_windowStyle
- #define wxCAPTION 0x20000000
- #define wxMAXIMIZE 0x00002000
- #define wxCLOSE_BOX 0x00001000
- #define wxSYSTEM_MENU 0x00000800
- wxBORDER_NONE = 0x00200000
- #define wxRESIZE_BORDER 0x00000040
-*/
-
-enum
-{
- wxFD_OPEN = 0x0001,
- wxFD_SAVE = 0x0002,
- wxFD_OVERWRITE_PROMPT = 0x0004,
- wxFD_FILE_MUST_EXIST = 0x0010,
- wxFD_MULTIPLE = 0x0020,
- wxFD_CHANGE_DIR = 0x0080,
- wxFD_PREVIEW = 0x0100
-};
-
-#if WXWIN_COMPATIBILITY_2_6
-enum
-{
- wxOPEN = wxFD_OPEN,
- wxSAVE = wxFD_SAVE,
- wxOVERWRITE_PROMPT = wxFD_OVERWRITE_PROMPT,
-#if WXWIN_COMPATIBILITY_2_4
- wxHIDE_READONLY = 0x0008,
-#endif
- wxFILE_MUST_EXIST = wxFD_FILE_MUST_EXIST,
- wxMULTIPLE = wxFD_MULTIPLE,
- wxCHANGE_DIR = wxFD_CHANGE_DIR
-};
-#endif
-
-#define wxFD_DEFAULT_STYLE wxFD_OPEN
-
-extern WXDLLEXPORT_DATA(const wxChar) wxFileDialogNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorPromptStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorDefaultWildcardStr[];
-
-//----------------------------------------------------------------------------
-// wxFileDialogBase
-//----------------------------------------------------------------------------
-
-class WXDLLEXPORT wxFileDialogBase: public wxDialog
-{
-public:
- wxFileDialogBase () { Init(); }
-
- wxFileDialogBase(wxWindow *parent,
- const wxString& message = wxFileSelectorPromptStr,
- const wxString& defaultDir = wxEmptyString,
- const wxString& defaultFile = wxEmptyString,
- const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
- long style = wxFD_DEFAULT_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize,
- const wxString& name = wxFileDialogNameStr)
- {
- Init();
- Create(parent, message, defaultDir, defaultFile, wildCard, style, pos, sz, name);
- }
-
- bool Create(wxWindow *parent,
- const wxString& message = wxFileSelectorPromptStr,
- const wxString& defaultDir = wxEmptyString,
- const wxString& defaultFile = wxEmptyString,
- const wxString& wildCard = wxFileSelectorDefaultWildcardStr,
- long style = wxFD_DEFAULT_STYLE,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& sz = wxDefaultSize,
- const wxString& name = wxFileDialogNameStr);
-
- bool HasFdFlag(int flag) const { return HasFlag(flag); }
-
- virtual void SetMessage(const wxString& message) { m_message = message; }
- virtual void SetPath(const wxString& path) { m_path = path; }
- virtual void SetDirectory(const wxString& dir) { m_dir = dir; }
- virtual void SetFilename(const wxString& name) { m_fileName = name; }
- virtual void SetWildcard(const wxString& wildCard) { m_wildCard = wildCard; }
- virtual void SetFilterIndex(int filterIndex) { m_filterIndex = filterIndex; }
-
- virtual wxString GetMessage() const { return m_message; }
- virtual wxString GetPath() const { return m_path; }
- virtual void GetPaths(wxArrayString& paths) const { paths.Empty(); paths.Add(m_path); }
- virtual wxString GetDirectory() const { return m_dir; }
- virtual wxString GetFilename() const { return m_fileName; }
- virtual void GetFilenames(wxArrayString& files) const { files.Empty(); files.Add(m_fileName); }
- virtual wxString GetWildcard() const { return m_wildCard; }
- virtual int GetFilterIndex() const { return m_filterIndex; }
-
- // Utility functions
-
-#if WXWIN_COMPATIBILITY_2_4
- // Parses the wildCard, returning the number of filters.
- // Returns 0 if none or if there's a problem,
- // The arrays will contain an equal number of items found before the error.
- // wildCard is in the form:
- // "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
- wxDEPRECATED( static int ParseWildcard(const wxString& wildCard,
- wxArrayString& descriptions,
- wxArrayString& filters) );
-#endif // WXWIN_COMPATIBILITY_2_4
-
-#if WXWIN_COMPATIBILITY_2_6
-
- wxDEPRECATED( long GetStyle() const );
- wxDEPRECATED( void SetStyle(long style) );
-
-#endif // WXWIN_COMPATIBILITY_2_6
-
-
- // Append first extension to filePath from a ';' separated extensionList
- // if filePath = "path/foo.bar" just return it as is
- // if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg"
- // if the extension is "*.j?g" (has wildcards) or "jpg" then return filePath
- static wxString AppendExtension(const wxString &filePath,
- const wxString &extensionList);
-
-protected:
- wxString m_message;
- wxString m_dir;
- wxString m_path; // Full path
- wxString m_fileName;
- wxString m_wildCard;
- int m_filterIndex;
-
-private:
- void Init();
- DECLARE_DYNAMIC_CLASS(wxFileDialogBase)
- DECLARE_NO_COPY_CLASS(wxFileDialogBase)
-};
-
-//----------------------------------------------------------------------------
-// wxFileDialog convenience functions
-//----------------------------------------------------------------------------
-
-// File selector - backward compatibility
-WXDLLEXPORT wxString
-wxFileSelector(const wxChar *message = wxFileSelectorPromptStr,
- const wxChar *default_path = NULL,
- const wxChar *default_filename = NULL,
- const wxChar *default_extension = NULL,
- const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
- int flags = 0,
- wxWindow *parent = NULL,
- int x = wxDefaultCoord, int y = wxDefaultCoord);
-
-// An extended version of wxFileSelector
-WXDLLEXPORT wxString
-wxFileSelectorEx(const wxChar *message = wxFileSelectorPromptStr,
- const wxChar *default_path = NULL,
- const wxChar *default_filename = NULL,
- int *indexDefaultExtension = NULL,
- const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
- int flags = 0,
- wxWindow *parent = NULL,
- int x = wxDefaultCoord, int y = wxDefaultCoord);
-
-// Ask for filename to load
-WXDLLEXPORT wxString
-wxLoadFileSelector(const wxChar *what,
- const wxChar *extension,
- const wxChar *default_name = (const wxChar *)NULL,
- wxWindow *parent = (wxWindow *) NULL);
-
-// Ask for filename to save
-WXDLLEXPORT wxString
-wxSaveFileSelector(const wxChar *what,
- const wxChar *extension,
- const wxChar *default_name = (const wxChar *) NULL,
- wxWindow *parent = (wxWindow *) NULL);
-
-
-#if defined (__WXUNIVERSAL__)
-#define wxUSE_GENERIC_FILEDIALOG
-#include "wx/generic/filedlgg.h"
-#elif defined(__WXMSW__)
-#include "wx/msw/filedlg.h"
-#elif defined(__WXMOTIF__)
-#include "wx/motif/filedlg.h"
-#elif defined(__WXGTK24__)
-#include "wx/gtk/filedlg.h" // GTK+ > 2.4 has native version
-#elif defined(__WXGTK20__)
-#define wxUSE_GENERIC_FILEDIALOG
-#include "wx/generic/filedlgg.h"
-#elif defined(__WXGTK__)
-#include "wx/gtk1/filedlg.h"
-#elif defined(__WXMAC__)
-#include "wx/mac/filedlg.h"
-#elif defined(__WXCOCOA__)
-#include "wx/cocoa/filedlg.h"
-#elif defined(__WXPM__)
-#include "wx/os2/filedlg.h"
-#endif
-
-#endif // wxUSE_FILEDLG
-
-#endif // _WX_FILEDLG_H_BASE_
diff --git a/desmume/src/windows/wx/include/wx/filefn.h b/desmume/src/windows/wx/include/wx/filefn.h
deleted file mode 100644
index 56c01c7bc..000000000
--- a/desmume/src/windows/wx/include/wx/filefn.h
+++ /dev/null
@@ -1,741 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/filefn.h
-// Purpose: File- and directory-related functions
-// Author: Julian Smart
-// Modified by:
-// Created: 29/01/98
-// RCS-ID: $Id: filefn.h 53877 2008-05-31 12:43:44Z SN $
-// Copyright: (c) 1998 Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _FILEFN_H_
-#define _FILEFN_H_
-
-#include "wx/list.h"
-#include "wx/arrstr.h"
-
-#ifdef __WXWINCE__
- #include "wx/msw/wince/time.h"
- #include "wx/msw/private.h"
-#else
- #include
-#endif
-
-#ifdef __WXWINCE__
-// Nothing
-#elif !defined(__MWERKS__)
- #include
- #include
-#else
- #ifdef __MACH__
- #include
- #include
- #include
- #include
- #else
- #include
- #include
- #include
- #endif
-#endif
-
-#ifdef __OS2__
-// need to check for __OS2__ first since currently both
-// __OS2__ and __UNIX__ are defined.
- #include
- #include "wx/os2/private.h"
- #ifdef __WATCOMC__
- #include
- #endif
- #include
- #ifdef __EMX__
- #include
- #endif
-#elif defined(__UNIX__)
- #include
- #include
-#endif
-
-#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
-#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__SALFORDC__) && !defined(__WXWINCE__) && !defined(__CYGWIN__)
- #include
- #include
- #include
-#endif // __WINDOWS__
-#endif // native Win compiler
-
-#if defined(__DOS__)
- #ifdef __WATCOMC__
- #include
- #include
- #include
- #endif
- #ifdef __DJGPP__
- #include
- #include
- #endif
-#endif
-
-#ifdef __BORLANDC__ // Please someone tell me which version of Borland needs
- // this (3.1 I believe) and how to test for it.
- // If this works for Borland 4.0 as well, then no worries.
- #include
-#endif
-
-#ifdef __SALFORDC__
- #include
- #include
-#endif
-
-#ifndef __WXWINCE__
- #include // O_RDONLY &c
-#endif
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-#ifdef __WXWINCE__
- typedef long off_t;
-#else
- // define off_t
- #if !defined(__WXMAC__) || defined(__UNIX__) || defined(__MACH__)
- #include
- #else
- typedef long off_t;
- #endif
-#endif
-
-#if (defined(__VISUALC__) && !defined(__WXWINCE__)) || ( defined(__MWERKS__) && defined( __INTEL__) )
- typedef _off_t off_t;
-#elif defined(__SYMANTEC__)
- typedef long off_t;
-#elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__)
- typedef long off_t;
-#endif
-
-enum wxSeekMode
-{
- wxFromStart,
- wxFromCurrent,
- wxFromEnd
-};
-
-enum wxFileKind
-{
- wxFILE_KIND_UNKNOWN,
- wxFILE_KIND_DISK, // a file supporting seeking to arbitrary offsets
- wxFILE_KIND_TERMINAL, // a tty
- wxFILE_KIND_PIPE // a pipe
-};
-
-// ----------------------------------------------------------------------------
-// declare our versions of low level file functions: some compilers prepend
-// underscores to the usual names, some also have Unicode versions of them
-// ----------------------------------------------------------------------------
-
-// Wrappers around Win32 api functions like CreateFile, ReadFile and such
-// Implemented in filefnwce.cpp
-#if defined( __WXWINCE__)
- typedef __int64 wxFileOffset;
- #define wxFileOffsetFmtSpec _("I64")
- int wxOpen(const wxChar *filename, int oflag, int WXUNUSED(pmode));
- int wxAccess(const wxChar *name, int WXUNUSED(how));
- int wxClose(int fd);
- int wxFsync(int WXUNUSED(fd));
- int wxRead(int fd, void *buf, unsigned int count);
- int wxWrite(int fd, const void *buf, unsigned int count);
- int wxEof(int fd);
- wxFileOffset wxSeek(int fd, wxFileOffset offset, int origin);
- #define wxLSeek wxSeek
- wxFileOffset wxTell(int fd);
-
- // always Unicode under WinCE
- #define wxMkDir _wmkdir
- #define wxRmDir _wrmdir
- #define wxStat _wstat
- #define wxStructStat struct _stat
-#elif (defined(__WXMSW__) || defined(__OS2__)) && !defined(__WXPALMOS__) && \
- ( \
- defined(__VISUALC__) || \
- (defined(__MINGW32__) && !defined(__WINE__) && \
- wxCHECK_W32API_VERSION(0, 5)) || \
- defined(__MWERKS__) || \
- defined(__DMC__) || \
- defined(__WATCOMC__) || \
- defined(__BORLANDC__) \
- )
-
- #undef wxHAS_HUGE_FILES
-
- // detect compilers which have support for huge files
- #if defined(__VISUALC__)
- #define wxHAS_HUGE_FILES 1
- #elif defined(__MINGW32__)
- #define wxHAS_HUGE_FILES 1
- #elif defined(_LARGE_FILES)
- #define wxHAS_HUGE_FILES 1
- #endif
-
- // other Windows compilers (DMC, Watcom, Metrowerks and Borland) don't have
- // huge file support (or at least not all functions needed for it by wx)
- // currently
-
- #ifdef wxHAS_HUGE_FILES
- typedef wxLongLong_t wxFileOffset;
- #define wxFileOffsetFmtSpec wxLongLongFmtSpec
- #else
- typedef off_t wxFileOffset;
- #endif
-
-
- // functions
-
- // MSVC and compatible compilers prepend underscores to the POSIX function
- // names, other compilers don't and even if their later versions usually do
- // define the versions with underscores for MSVC compatibility, it's better
- // to avoid using them as they're not present in earlier versions and
- // always using the native functions spelling is easier than testing for
- // the versions
- #if defined(__BORLANDC__) || defined(__DMC__) || defined(__WATCOMC__) || defined(__MINGW64__)
- #define wxPOSIX_IDENT(func) ::func
- #else // by default assume MSVC-compatible names
- #define wxPOSIX_IDENT(func) _ ## func
- #define wxHAS_UNDERSCORES_IN_POSIX_IDENTS
- #endif
-
- // at least Borland 5.5 doesn't like "struct ::stat" so don't use the scope
- // resolution operator present in wxPOSIX_IDENT for it
- #ifdef __BORLANDC__
- #define wxPOSIX_STRUCT(s) struct s
- #else
- #define wxPOSIX_STRUCT(s) struct wxPOSIX_IDENT(s)
- #endif
-
- // first functions not working with strings, i.e. without ANSI/Unicode
- // complications
- #define wxClose wxPOSIX_IDENT(close)
-
- #if defined(__MWERKS__)
- #if __MSL__ >= 0x6000
- #define wxRead(fd, buf, nCount) _read(fd, (void *)buf, nCount)
- #define wxWrite(fd, buf, nCount) _write(fd, (void *)buf, nCount)
- #else
- #define wxRead(fd, buf, nCount)\
- _read(fd, (const char *)buf, nCount)
- #define wxWrite(fd, buf, nCount)\
- _write(fd, (const char *)buf, nCount)
- #endif
- #else // __MWERKS__
- #define wxRead wxPOSIX_IDENT(read)
- #define wxWrite wxPOSIX_IDENT(write)
- #endif
-
- #ifdef wxHAS_HUGE_FILES
- #ifndef __MINGW64__
- #define wxSeek wxPOSIX_IDENT(lseeki64)
- #define wxLseek wxPOSIX_IDENT(lseeki64)
- #define wxTell wxPOSIX_IDENT(telli64)
- #else
- // unfortunately, mingw-W64 is somewhat inconsistent...
- #define wxSeek _lseeki64
- #define wxLseek _lseeki64
- #define wxTell _telli64
- #endif
- #else // !wxHAS_HUGE_FILES
- #define wxSeek wxPOSIX_IDENT(lseek)
- #define wxLseek wxPOSIX_IDENT(lseek)
- #define wxTell wxPOSIX_IDENT(tell)
- #endif // wxHAS_HUGE_FILES/!wxHAS_HUGE_FILES
-
- #ifndef __WATCOMC__
- #if !defined(__BORLANDC__) || (__BORLANDC__ > 0x540)
- // NB: this one is not POSIX and always has the underscore
- #define wxFsync _commit
-
- // could be already defined by configure (Cygwin)
- #ifndef HAVE_FSYNC
- #define HAVE_FSYNC
- #endif
- #endif // BORLANDC
- #endif
-
- #define wxEof wxPOSIX_IDENT(eof)
-
- // then the functions taking strings
- #if wxUSE_UNICODE
- #if wxUSE_UNICODE_MSLU
- // implement the missing file functions in Win9x ourselves
- #if defined( __VISUALC__ ) \
- || ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
- || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
- || ( defined(__BORLANDC__) && (__BORLANDC__ > 0x460) ) \
- || defined(__DMC__)
-
- WXDLLIMPEXP_BASE int wxMSLU__wopen(const wxChar *name,
- int flags, int mode);
- WXDLLIMPEXP_BASE int wxMSLU__waccess(const wxChar *name,
- int mode);
- WXDLLIMPEXP_BASE int wxMSLU__wmkdir(const wxChar *name);
- WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name);
-
- WXDLLIMPEXP_BASE int
- wxMSLU__wstat(const wxChar *name, wxPOSIX_STRUCT(stat) *buffer);
- WXDLLIMPEXP_BASE int
- wxMSLU__wstati64(const wxChar *name,
- wxPOSIX_STRUCT(stati64) *buffer);
- #endif // Windows compilers with MSLU support
-
- #define wxOpen wxMSLU__wopen
-
- #define wxAccess wxMSLU__waccess
- #define wxMkDir wxMSLU__wmkdir
- #define wxRmDir wxMSLU__wrmdir
- #ifdef wxHAS_HUGE_FILES
- #define wxStat wxMSLU__wstati64
- #else
- #define wxStat wxMSLU__wstat
- #endif
- #else // !wxUSE_UNICODE_MSLU
- #ifdef __BORLANDC__
- #if __BORLANDC__ >= 0x550 && __BORLANDC__ <= 0x551
- WXDLLIMPEXP_BASE int wxOpen(const wxChar *pathname,
- int flags, mode_t mode);
- #else
- #define wxOpen _wopen
- #endif
- #define wxAccess _waccess
- #define wxMkDir _wmkdir
- #define wxRmDir _wrmdir
- #ifdef wxHAS_HUGE_FILES
- #define wxStat _wstati64
- #else
- #define wxStat _wstat
- #endif
- #else
- #define wxOpen _wopen
- #define wxAccess _waccess
- #define wxMkDir _wmkdir
- #define wxRmDir _wrmdir
- #ifdef wxHAS_HUGE_FILES
- #define wxStat _wstati64
- #else
- #define wxStat _wstat
- #endif
- #endif
- #endif // wxUSE_UNICODE_MSLU/!wxUSE_UNICODE_MSLU
- #else // !wxUSE_UNICODE
- #define wxOpen wxPOSIX_IDENT(open)
- #define wxAccess wxPOSIX_IDENT(access)
- #define wxMkDir wxPOSIX_IDENT(mkdir)
- #define wxRmDir wxPOSIX_IDENT(rmdir)
- #ifdef wxHAS_HUGE_FILES
- #define wxStat wxPOSIX_IDENT(stati64)
- #else
- // Unfortunately Watcom is not consistent, so:-
- #if defined(__OS2__) && defined(__WATCOMC__)
- #define wxStat _stat
- #else
- #if defined (__BORLANDC__)
- #define wxStat _stat //wxPOSIX_IDENT(stat)
- #else
- #define wxStat wxPOSIX_IDENT(stat)
- #endif // !borland
- #endif // !watcom
- #endif
- #endif // wxUSE_UNICODE/!wxUSE_UNICODE
-
- // Types: Notice that Watcom is the only compiler to have a wide char
- // version of struct stat as well as a wide char stat function variant.
- // This was droped since OW 1.4 "for consistency across platforms".
- #ifdef wxHAS_HUGE_FILES
- #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
- #define wxStructStat struct _wstati64
- #else
- #define wxStructStat struct _stati64
- #endif
- #else
- #if wxUSE_UNICODE && wxONLY_WATCOM_EARLIER_THAN(1,4)
- #define wxStructStat struct _wstat
- #else
- #define wxStructStat struct _stat
- #endif
- #endif
-
- // constants (unless already defined by the user code)
- #ifdef wxHAS_UNDERSCORES_IN_POSIX_IDENTS
- #ifndef O_RDONLY
- #define O_RDONLY _O_RDONLY
- #define O_WRONLY _O_WRONLY
- #define O_RDWR _O_RDWR
- #define O_EXCL _O_EXCL
- #define O_CREAT _O_CREAT
- #define O_BINARY _O_BINARY
- #endif
-
- #ifndef S_IFMT
- #define S_IFMT _S_IFMT
- #define S_IFDIR _S_IFDIR
- #define S_IFREG _S_IFREG
- #endif
- #endif // wxHAS_UNDERSCORES_IN_POSIX_IDENTS
-
- #ifdef wxHAS_HUGE_FILES
- // wxFile is present and supports large files. Currently wxFFile
- // doesn't have large file support with any Windows compiler (even
- // Win64 ones).
- #if wxUSE_FILE
- #define wxHAS_LARGE_FILES
- #endif
- #endif
-
- // it's a private define, undefine it so that nobody gets tempted to use it
- #undef wxHAS_HUGE_FILES
-#else // Unix or Windows using unknown compiler, assume POSIX supported
- typedef off_t wxFileOffset;
- #ifdef _LARGE_FILES
- #define wxFileOffsetFmtSpec wxLongLongFmtSpec
- wxCOMPILE_TIME_ASSERT( sizeof(off_t) == sizeof(wxLongLong_t),
- BadFileSizeType );
- // wxFile is present and supports large files
- #ifdef wxUSE_FILE
- #define wxHAS_LARGE_FILES
- #endif
- // wxFFile is present and supports large files
- #if SIZEOF_LONG == 8 || defined HAVE_FSEEKO
- #define wxHAS_LARGE_FFILES
- #endif
- #else
- #define wxFileOffsetFmtSpec _T("")
- #endif
- // functions
- #define wxClose close
- #define wxRead ::read
- #define wxWrite ::write
- #define wxLseek lseek
- #define wxSeek lseek
- #define wxFsync fsync
- #define wxEof eof
-
- #define wxMkDir mkdir
- #define wxRmDir rmdir
-
- #define wxTell(fd) lseek(fd, 0, SEEK_CUR)
-
- #define wxStructStat struct stat
-
- #if wxUSE_UNICODE
- #define wxNEED_WX_UNISTD_H
- #if defined(__DMC__)
- typedef unsigned long mode_t;
- #endif
- WXDLLIMPEXP_BASE int wxStat( const wxChar *file_name, wxStructStat *buf );
- WXDLLIMPEXP_BASE int wxLstat( const wxChar *file_name, wxStructStat *buf );
- WXDLLIMPEXP_BASE int wxAccess( const wxChar *pathname, int mode );
- WXDLLIMPEXP_BASE int wxOpen( const wxChar *pathname, int flags, mode_t mode );
- #else
- #define wxOpen open
- #define wxStat stat
- #define wxLstat lstat
- #define wxAccess access
- #endif
-
- #define wxHAS_NATIVE_LSTAT
-#endif // platforms
-
-#ifdef O_BINARY
- #define wxO_BINARY O_BINARY
-#else
- #define wxO_BINARY 0
-#endif
-
-// if the platform doesn't have symlinks, define wxLstat to be the same as
-// wxStat to avoid #ifdefs in the code using it
-#ifndef wxHAS_NATIVE_LSTAT
- #define wxLstat wxStat
-#endif
-
-#if defined(__VISAGECPP__) && __IBMCPP__ >= 400
-//
-// VisualAge C++ V4.0 cannot have any external linkage const decs
-// in headers included by more than one primary source
-//
-extern const int wxInvalidOffset;
-#else
-const int wxInvalidOffset = -1;
-#endif
-
-// ----------------------------------------------------------------------------
-// functions
-// ----------------------------------------------------------------------------
-WXDLLIMPEXP_BASE bool wxFileExists(const wxString& filename);
-
-// does the path exist? (may have or not '/' or '\\' at the end)
-WXDLLIMPEXP_BASE bool wxDirExists(const wxChar *pszPathName);
-
-WXDLLIMPEXP_BASE bool wxIsAbsolutePath(const wxString& filename);
-
-// Get filename
-WXDLLIMPEXP_BASE wxChar* wxFileNameFromPath(wxChar *path);
-WXDLLIMPEXP_BASE wxString wxFileNameFromPath(const wxString& path);
-
-// Get directory
-WXDLLIMPEXP_BASE wxString wxPathOnly(const wxString& path);
-
-// wxString version
-WXDLLIMPEXP_BASE wxString wxRealPath(const wxString& path);
-
-WXDLLIMPEXP_BASE void wxDos2UnixFilename(wxChar *s);
-
-WXDLLIMPEXP_BASE void wxUnix2DosFilename(wxChar *s);
-
-// Strip the extension, in situ
-WXDLLIMPEXP_BASE void wxStripExtension(wxChar *buffer);
-WXDLLIMPEXP_BASE void wxStripExtension(wxString& buffer);
-
-// Get a temporary filename
-WXDLLIMPEXP_BASE wxChar* wxGetTempFileName(const wxString& prefix, wxChar *buf = (wxChar *) NULL);
-WXDLLIMPEXP_BASE bool wxGetTempFileName(const wxString& prefix, wxString& buf);
-
-// Expand file name (~/ and ${OPENWINHOME}/ stuff)
-WXDLLIMPEXP_BASE wxChar* wxExpandPath(wxChar *dest, const wxChar *path);
-WXDLLIMPEXP_BASE bool wxExpandPath(wxString& dest, const wxChar *path);
-
-// Contract w.r.t environment ( -> ${OPENWINHOME}/lib)
-// and make (if under the home tree) relative to home
-// [caller must copy-- volatile]
-WXDLLIMPEXP_BASE wxChar* wxContractPath(const wxString& filename,
- const wxString& envname = wxEmptyString,
- const wxString& user = wxEmptyString);
-
-// Destructive removal of /./ and /../ stuff
-WXDLLIMPEXP_BASE wxChar* wxRealPath(wxChar *path);
-
-// Allocate a copy of the full absolute path
-WXDLLIMPEXP_BASE wxChar* wxCopyAbsolutePath(const wxString& path);
-
-// Get first file name matching given wild card.
-// Flags are reserved for future use.
-#define wxFILE 1
-#define wxDIR 2
-WXDLLIMPEXP_BASE wxString wxFindFirstFile(const wxChar *spec, int flags = wxFILE);
-WXDLLIMPEXP_BASE wxString wxFindNextFile();
-
-// Does the pattern contain wildcards?
-WXDLLIMPEXP_BASE bool wxIsWild(const wxString& pattern);
-
-// Does the pattern match the text (usually a filename)?
-// If dot_special is true, doesn't match * against . (eliminating
-// `hidden' dot files)
-WXDLLIMPEXP_BASE bool wxMatchWild(const wxString& pattern, const wxString& text, bool dot_special = true);
-
-// Concatenate two files to form third
-WXDLLIMPEXP_BASE bool wxConcatFiles(const wxString& file1, const wxString& file2, const wxString& file3);
-
-// Copy file1 to file2
-WXDLLIMPEXP_BASE bool wxCopyFile(const wxString& file1, const wxString& file2,
- bool overwrite = true);
-
-// Remove file
-WXDLLIMPEXP_BASE bool wxRemoveFile(const wxString& file);
-
-// Rename file
-WXDLLIMPEXP_BASE bool wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite = true);
-
-// Get current working directory.
-#if WXWIN_COMPATIBILITY_2_6
-// If buf is NULL, allocates space using new, else
-// copies into buf.
-// IMPORTANT NOTE getcwd is know not to work under some releases
-// of Win32s 1.3, according to MS release notes!
-wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* wxGetWorkingDirectory(wxChar *buf = (wxChar *) NULL, int sz = 1000) );
-// new and preferred version of wxGetWorkingDirectory
-// NB: can't have the same name because of overloading ambiguity
-#endif // WXWIN_COMPATIBILITY_2_6
-WXDLLIMPEXP_BASE wxString wxGetCwd();
-
-// Set working directory
-WXDLLIMPEXP_BASE bool wxSetWorkingDirectory(const wxString& d);
-
-// Make directory
-WXDLLIMPEXP_BASE bool wxMkdir(const wxString& dir, int perm = 0777);
-
-// Remove directory. Flags reserved for future use.
-WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0);
-
-// Return the type of an open file
-WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(int fd);
-WXDLLIMPEXP_BASE wxFileKind wxGetFileKind(FILE *fp);
-
-#if WXWIN_COMPATIBILITY_2_6
-// compatibility defines, don't use in new code
-wxDEPRECATED( inline bool wxPathExists(const wxChar *pszPathName) );
-inline bool wxPathExists(const wxChar *pszPathName)
-{
- return wxDirExists(pszPathName);
-}
-#endif //WXWIN_COMPATIBILITY_2_6
-
-// permissions; these functions work both on files and directories:
-WXDLLIMPEXP_BASE bool wxIsWritable(const wxString &path);
-WXDLLIMPEXP_BASE bool wxIsReadable(const wxString &path);
-WXDLLIMPEXP_BASE bool wxIsExecutable(const wxString &path);
-
-// ----------------------------------------------------------------------------
-// separators in file names
-// ----------------------------------------------------------------------------
-
-// between file name and extension
-#define wxFILE_SEP_EXT wxT('.')
-
-// between drive/volume name and the path
-#define wxFILE_SEP_DSK wxT(':')
-
-// between the path components
-#define wxFILE_SEP_PATH_DOS wxT('\\')
-#define wxFILE_SEP_PATH_UNIX wxT('/')
-#define wxFILE_SEP_PATH_MAC wxT(':')
-#define wxFILE_SEP_PATH_VMS wxT('.') // VMS also uses '[' and ']'
-
-// separator in the path list (as in PATH environment variable)
-// there is no PATH variable in Classic Mac OS so just use the
-// semicolon (it must be different from the file name separator)
-// NB: these are strings and not characters on purpose!
-#define wxPATH_SEP_DOS wxT(";")
-#define wxPATH_SEP_UNIX wxT(":")
-#define wxPATH_SEP_MAC wxT(";")
-
-// platform independent versions
-#if defined(__UNIX__) && !defined(__OS2__)
- // CYGWIN also uses UNIX settings
- #define wxFILE_SEP_PATH wxFILE_SEP_PATH_UNIX
- #define wxPATH_SEP wxPATH_SEP_UNIX
-#elif defined(__MAC__)
- #define wxFILE_SEP_PATH wxFILE_SEP_PATH_MAC
- #define wxPATH_SEP wxPATH_SEP_MAC
-#else // Windows and OS/2
- #define wxFILE_SEP_PATH wxFILE_SEP_PATH_DOS
- #define wxPATH_SEP wxPATH_SEP_DOS
-#endif // Unix/Windows
-
-// this is useful for wxString::IsSameAs(): to compare two file names use
-// filename1.IsSameAs(filename2, wxARE_FILENAMES_CASE_SENSITIVE)
-#if defined(__UNIX__) && !defined(__DARWIN__) && !defined(__OS2__)
- #define wxARE_FILENAMES_CASE_SENSITIVE true
-#else // Windows, Mac OS and OS/2
- #define wxARE_FILENAMES_CASE_SENSITIVE false
-#endif // Unix/Windows
-
-// is the char a path separator?
-inline bool wxIsPathSeparator(wxChar c)
-{
- // under DOS/Windows we should understand both Unix and DOS file separators
-#if ( defined(__UNIX__) && !defined(__OS2__) )|| defined(__MAC__)
- return c == wxFILE_SEP_PATH;
-#else
- return c == wxFILE_SEP_PATH_DOS || c == wxFILE_SEP_PATH_UNIX;
-#endif
-}
-
-// does the string ends with path separator?
-WXDLLIMPEXP_BASE bool wxEndsWithPathSeparator(const wxChar *pszFileName);
-
-// split the full path into path (including drive for DOS), name and extension
-// (understands both '/' and '\\')
-WXDLLIMPEXP_BASE void wxSplitPath(const wxChar *pszFileName,
- wxString *pstrPath,
- wxString *pstrName,
- wxString *pstrExt);
-
-// find a file in a list of directories, returns false if not found
-WXDLLIMPEXP_BASE bool wxFindFileInPath(wxString *pStr, const wxChar *pszPath, const wxChar *pszFile);
-
-// Get the OS directory if appropriate (such as the Windows directory).
-// On non-Windows platform, probably just return the empty string.
-WXDLLIMPEXP_BASE wxString wxGetOSDirectory();
-
-#if wxUSE_DATETIME
-
-// Get file modification time
-WXDLLIMPEXP_BASE time_t wxFileModificationTime(const wxString& filename);
-
-#endif // wxUSE_DATETIME
-
-// Parses the wildCard, returning the number of filters.
-// Returns 0 if none or if there's a problem,
-// The arrays will contain an equal number of items found before the error.
-// wildCard is in the form:
-// "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
-WXDLLIMPEXP_BASE int wxParseCommonDialogsFilter(const wxString& wildCard, wxArrayString& descriptions, wxArrayString& filters);
-
-// ----------------------------------------------------------------------------
-// classes
-// ----------------------------------------------------------------------------
-
-#ifdef __UNIX__
-
-// set umask to the given value in ctor and reset it to the old one in dtor
-class WXDLLIMPEXP_BASE wxUmaskChanger
-{
-public:
- // change the umask to the given one if it is not -1: this allows to write
- // the same code whether you really want to change umask or not, as is in
- // wxFileConfig::Flush() for example
- wxUmaskChanger(int umaskNew)
- {
- m_umaskOld = umaskNew == -1 ? -1 : (int)umask((mode_t)umaskNew);
- }
-
- ~wxUmaskChanger()
- {
- if ( m_umaskOld != -1 )
- umask((mode_t)m_umaskOld);
- }
-
-private:
- int m_umaskOld;
-};
-
-// this macro expands to an "anonymous" wxUmaskChanger object under Unix and
-// nothing elsewhere
-#define wxCHANGE_UMASK(m) wxUmaskChanger wxMAKE_UNIQUE_NAME(umaskChanger_)(m)
-
-#else // !__UNIX__
-
-#define wxCHANGE_UMASK(m)
-
-#endif // __UNIX__/!__UNIX__
-
-
-// Path searching
-class WXDLLIMPEXP_BASE wxPathList : public wxArrayString
-{
-public:
- wxPathList() {}
- wxPathList(const wxArrayString &arr)
- { Add(arr); }
-
- // Adds all paths in environment variable
- void AddEnvList(const wxString& envVariable);
-
- // Adds given path to this list
- bool Add(const wxString& path);
- void Add(const wxArrayString &paths);
-
- // Find the first full path for which the file exists
- wxString FindValidPath(const wxString& filename) const;
-
- // Find the first full path for which the file exists; ensure it's an
- // absolute path that gets returned.
- wxString FindAbsoluteValidPath(const wxString& filename) const;
-
- // Given full path and filename, add path to list
- bool EnsureFileAccessible(const wxString& path);
-
-#if WXWIN_COMPATIBILITY_2_6
- // Returns true if the path is in the list
- wxDEPRECATED( bool Member(const wxString& path) const );
-#endif
-};
-
-#endif // _WX_FILEFN_H_
diff --git a/desmume/src/windows/wx/include/wx/filename.h b/desmume/src/windows/wx/include/wx/filename.h
deleted file mode 100644
index 0a3abb58f..000000000
--- a/desmume/src/windows/wx/include/wx/filename.h
+++ /dev/null
@@ -1,541 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/filename.h
-// Purpose: wxFileName - encapsulates a file path
-// Author: Robert Roebling, Vadim Zeitlin
-// Modified by:
-// Created: 28.12.00
-// RCS-ID: $Id: filename.h 49563 2007-10-31 20:46:21Z VZ $
-// Copyright: (c) 2000 Robert Roebling
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FILENAME_H_
-#define _WX_FILENAME_H_
-
-/*
- TODO:
-
- 1. support for drives under Windows
- 2. more file operations:
- a) chmod()
- b) [acm]time() - get and set
- c) rename()?
- 3. SameFileAs() function to compare inodes under Unix
- */
-
-#include "wx/arrstr.h"
-#include "wx/filefn.h"
-#include "wx/datetime.h"
-#include "wx/intl.h"
-
-#if wxUSE_FILE
-class WXDLLIMPEXP_FWD_BASE wxFile;
-#endif
-
-#if wxUSE_FFILE
-class WXDLLIMPEXP_FWD_BASE wxFFile;
-#endif
-
-// ----------------------------------------------------------------------------
-// constants
-// ----------------------------------------------------------------------------
-
-// the various values for the path format: this mainly affects the path
-// separator but also whether or not the path has the drive part (as under
-// Windows)
-enum wxPathFormat
-{
- wxPATH_NATIVE = 0, // the path format for the current platform
- wxPATH_UNIX,
- wxPATH_BEOS = wxPATH_UNIX,
- wxPATH_MAC,
- wxPATH_DOS,
- wxPATH_WIN = wxPATH_DOS,
- wxPATH_OS2 = wxPATH_DOS,
- wxPATH_VMS,
-
- wxPATH_MAX // Not a valid value for specifying path format
-};
-
-// the kind of normalization to do with the file name: these values can be
-// or'd together to perform several operations at once
-enum wxPathNormalize
-{
- wxPATH_NORM_ENV_VARS = 0x0001, // replace env vars with their values
- wxPATH_NORM_DOTS = 0x0002, // squeeze all .. and . and prepend cwd
- wxPATH_NORM_TILDE = 0x0004, // Unix only: replace ~ and ~user
- wxPATH_NORM_CASE = 0x0008, // if case insensitive => tolower
- wxPATH_NORM_ABSOLUTE = 0x0010, // make the path absolute
- wxPATH_NORM_LONG = 0x0020, // make the path the long form
- wxPATH_NORM_SHORTCUT = 0x0040, // resolve the shortcut, if it is a shortcut
- wxPATH_NORM_ALL = 0x00ff & ~wxPATH_NORM_CASE
-};
-
-// what exactly should GetPath() return?
-enum
-{
- wxPATH_GET_VOLUME = 0x0001, // include the volume if applicable
- wxPATH_GET_SEPARATOR = 0x0002 // terminate the path with the separator
-};
-
-// MkDir flags
-enum
-{
- wxPATH_MKDIR_FULL = 0x0001 // create directories recursively
-};
-
-// error code of wxFileName::GetSize()
-extern WXDLLIMPEXP_DATA_BASE(wxULongLong) wxInvalidSize;
-
-
-
-// ----------------------------------------------------------------------------
-// wxFileName: encapsulates a file path
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxFileName
-{
-public:
- // constructors and assignment
-
- // the usual stuff
- wxFileName() { Clear(); }
- wxFileName(const wxFileName& filepath) { Assign(filepath); }
-
- // from a full filename: if it terminates with a '/', a directory path
- // is contructed (the name will be empty), otherwise a file name and
- // extension are extracted from it
- wxFileName( const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE )
- { Assign( fullpath, format ); }
-
- // from a directory name and a file name
- wxFileName(const wxString& path,
- const wxString& name,
- wxPathFormat format = wxPATH_NATIVE)
- { Assign(path, name, format); }
-
- // from a volume, directory name, file base name and extension
- wxFileName(const wxString& volume,
- const wxString& path,
- const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE)
- { Assign(volume, path, name, ext, format); }
-
- // from a directory name, file base name and extension
- wxFileName(const wxString& path,
- const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE)
- { Assign(path, name, ext, format); }
-
- // the same for delayed initialization
-
- void Assign(const wxFileName& filepath);
-
- void Assign(const wxString& fullpath,
- wxPathFormat format = wxPATH_NATIVE);
-
- void Assign(const wxString& volume,
- const wxString& path,
- const wxString& name,
- const wxString& ext,
- bool hasExt,
- wxPathFormat format = wxPATH_NATIVE);
-
- void Assign(const wxString& volume,
- const wxString& path,
- const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE)
- { Assign(volume, path, name, ext, !ext.empty(), format); }
-
- void Assign(const wxString& path,
- const wxString& name,
- wxPathFormat format = wxPATH_NATIVE);
-
- void Assign(const wxString& path,
- const wxString& name,
- const wxString& ext,
- wxPathFormat format = wxPATH_NATIVE);
-
- void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE);
-
- // assorted assignment operators
-
- wxFileName& operator=(const wxFileName& filename)
- { Assign(filename); return *this; }
-
- wxFileName& operator=(const wxString& filename)
- { Assign(filename); return *this; }
-
- // reset all components to default, uninitialized state
- void Clear();
-
- // static pseudo constructors
- static wxFileName FileName(const wxString& file,
- wxPathFormat format = wxPATH_NATIVE);
- static wxFileName DirName(const wxString& dir,
- wxPathFormat format = wxPATH_NATIVE);
-
- // file tests
-
- // is the filename valid at all?
- bool IsOk() const
- {
- // we're fine if we have the path or the name or if we're a root dir
- return m_dirs.size() != 0 || !m_name.empty() || !m_relative ||
- !m_ext.empty() || m_hasExt;
- }
-
- // does the file with this name exists?
- bool FileExists() const;
- static bool FileExists( const wxString &file );
-
- // does the directory with this name exists?
- bool DirExists() const;
- static bool DirExists( const wxString &dir );
-
- // checks on most common flags for files/directories;
- // more platform-specific features (like e.g. Unix permissions) are not
- // available in wxFileName
-
- bool IsDirWritable() const { return wxIsWritable(GetPath()); }
- static bool IsDirWritable(const wxString &path) { return wxDirExists(path) && wxIsWritable(path); }
-
- bool IsDirReadable() const { return wxIsReadable(GetPath()); }
- static bool IsDirReadable(const wxString &path) { return wxDirExists(path) && wxIsReadable(path); }
-
- // NOTE: IsDirExecutable() is not present because the meaning of "executable"
- // directory is very platform-dependent and also not so useful
-
- bool IsFileWritable() const { return wxIsWritable(GetFullPath()); }
- static bool IsFileWritable(const wxString &path) { return wxFileExists(path) && wxIsWritable(path); }
-
- bool IsFileReadable() const { return wxIsReadable(GetFullPath()); }
- static bool IsFileReadable(const wxString &path) { return wxFileExists(path) && wxIsReadable(path); }
-
- bool IsFileExecutable() const { return wxIsExecutable(GetFullPath()); }
- static bool IsFileExecutable(const wxString &path) { return wxFileExists(path) && wxIsExecutable(path); }
-
-
- // time functions
-#if wxUSE_DATETIME
- // set the file last access/mod and creation times
- // (any of the pointers may be NULL)
- bool SetTimes(const wxDateTime *dtAccess,
- const wxDateTime *dtMod,
- const wxDateTime *dtCreate);
-
- // set the access and modification times to the current moment
- bool Touch();
-
- // return the last access, last modification and create times
- // (any of the pointers may be NULL)
- bool GetTimes(wxDateTime *dtAccess,
- wxDateTime *dtMod,
- wxDateTime *dtCreate) const;
-
- // convenience wrapper: get just the last mod time of the file
- wxDateTime GetModificationTime() const
- {
- wxDateTime dtMod;
- (void)GetTimes(NULL, &dtMod, NULL);
- return dtMod;
- }
-#endif // wxUSE_DATETIME
-
-#ifdef __WXMAC__
- bool MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) ;
- bool MacGetTypeAndCreator( wxUint32 *type , wxUint32 *creator ) ;
- // gets the 'common' type and creator for a certain extension
- static bool MacFindDefaultTypeAndCreator( const wxString& ext , wxUint32 *type , wxUint32 *creator ) ;
- // registers application defined extensions and their default type and creator
- static void MacRegisterDefaultTypeAndCreator( const wxString& ext , wxUint32 type , wxUint32 creator ) ;
- // looks up the appropriate type and creator from the registration and then sets
- bool MacSetDefaultTypeAndCreator() ;
-#endif
-
- // various file/dir operations
-
- // retrieve the value of the current working directory
- void AssignCwd(const wxString& volume = wxEmptyString);
- static wxString GetCwd(const wxString& volume = wxEmptyString);
-
- // change the current working directory
- bool SetCwd();
- static bool SetCwd( const wxString &cwd );
-
- // get the value of user home (Unix only mainly)
- void AssignHomeDir();
- static wxString GetHomeDir();
-
- // get the system temporary directory
- static wxString GetTempDir();
-
-#if wxUSE_FILE || wxUSE_FFILE
- // get a temp file name starting with the specified prefix
- void AssignTempFileName(const wxString& prefix);
- static wxString CreateTempFileName(const wxString& prefix);
-#endif // wxUSE_FILE
-
-#if wxUSE_FILE
- // get a temp file name starting with the specified prefix and open the
- // file passed to us using this name for writing (atomically if
- // possible)
- void AssignTempFileName(const wxString& prefix, wxFile *fileTemp);
- static wxString CreateTempFileName(const wxString& prefix,
- wxFile *fileTemp);
-#endif // wxUSE_FILE
-
-#if wxUSE_FFILE
- // get a temp file name starting with the specified prefix and open the
- // file passed to us using this name for writing (atomically if
- // possible)
- void AssignTempFileName(const wxString& prefix, wxFFile *fileTemp);
- static wxString CreateTempFileName(const wxString& prefix,
- wxFFile *fileTemp);
-#endif // wxUSE_FFILE
-
- // directory creation and removal.
- bool Mkdir( int perm = 0777, int flags = 0);
- static bool Mkdir( const wxString &dir, int perm = 0777, int flags = 0 );
-
- bool Rmdir();
- static bool Rmdir( const wxString &dir );
-
- // operations on the path
-
- // normalize the path: with the default flags value, the path will be
- // made absolute, without any ".." and "." and all environment
- // variables will be expanded in it
- //
- // this may be done using another (than current) value of cwd
- bool Normalize(int flags = wxPATH_NORM_ALL,
- const wxString& cwd = wxEmptyString,
- wxPathFormat format = wxPATH_NATIVE);
-
- // get a path path relative to the given base directory, i.e. opposite
- // of Normalize
- //
- // pass an empty string to get a path relative to the working directory
- //
- // returns true if the file name was modified, false if we failed to do
- // anything with it (happens when the file is on a different volume,
- // for example)
- bool MakeRelativeTo(const wxString& pathBase = wxEmptyString,
- wxPathFormat format = wxPATH_NATIVE);
-
- // make the path absolute
- //
- // this may be done using another (than current) value of cwd
- bool MakeAbsolute(const wxString& cwd = wxEmptyString,
- wxPathFormat format = wxPATH_NATIVE)
- { return Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE |
- wxPATH_NORM_TILDE, cwd, format); }
-
-#if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE
- // if the path is a shortcut, return the target and optionally,
- // the arguments
- bool GetShortcutTarget(const wxString& shortcutPath,
- wxString& targetFilename,
- wxString* arguments = NULL);
-#endif
-
- // Comparison
-
- // compares with the rules of the given platforms format
- bool SameAs(const wxFileName& filepath,
- wxPathFormat format = wxPATH_NATIVE) const;
-
- // compare with another filename object
- bool operator==(const wxFileName& filename) const
- { return SameAs(filename); }
- bool operator!=(const wxFileName& filename) const
- { return !SameAs(filename); }
-
- // compare with a filename string interpreted as a native file name
- bool operator==(const wxString& filename) const
- { return SameAs(wxFileName(filename)); }
- bool operator!=(const wxString& filename) const
- { return !SameAs(wxFileName(filename)); }
-
- // are the file names of this type cases sensitive?
- static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE );
-
- // is this filename absolute?
- bool IsAbsolute(wxPathFormat format = wxPATH_NATIVE) const;
-
- // is this filename relative?
- bool IsRelative(wxPathFormat format = wxPATH_NATIVE) const
- { return !IsAbsolute(format); }
-
- // Returns the characters that aren't allowed in filenames
- // on the specified platform.
- static wxString GetForbiddenChars(wxPathFormat format = wxPATH_NATIVE);
-
- // Information about path format
-
- // get the string separating the volume from the path for this format,
- // return an empty string if this format doesn't support the notion of
- // volumes at all
- static wxString GetVolumeSeparator(wxPathFormat format = wxPATH_NATIVE);
-
- // get the string of path separators for this format
- static wxString GetPathSeparators(wxPathFormat format = wxPATH_NATIVE);
-
- // get the string of path terminators, i.e. characters which terminate the
- // path
- static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE);
-
- // get the canonical path separator for this format
- static wxChar GetPathSeparator(wxPathFormat format = wxPATH_NATIVE)
- { return GetPathSeparators(format)[0u]; }
-
- // is the char a path separator for this format?
- static bool IsPathSeparator(wxChar ch, wxPathFormat format = wxPATH_NATIVE);
-
- // Dir accessors
- size_t GetDirCount() const { return m_dirs.size(); }
- void AppendDir(const wxString& dir);
- void PrependDir(const wxString& dir);
- void InsertDir(size_t before, const wxString& dir);
- void RemoveDir(size_t pos);
- void RemoveLastDir() { RemoveDir(GetDirCount() - 1); }
-
- // Other accessors
- void SetExt( const wxString &ext ) { m_ext = ext; m_hasExt = !m_ext.empty(); }
- void ClearExt() { m_ext = wxEmptyString; m_hasExt = false; }
- void SetEmptyExt() { m_ext = wxT(""); m_hasExt = true; }
- wxString GetExt() const { return m_ext; }
- bool HasExt() const { return m_hasExt; }
-
- void SetName( const wxString &name ) { m_name = name; }
- wxString GetName() const { return m_name; }
- bool HasName() const { return !m_name.empty(); }
-
- void SetVolume( const wxString &volume ) { m_volume = volume; }
- wxString GetVolume() const { return m_volume; }
- bool HasVolume() const { return !m_volume.empty(); }
-
- // full name is the file name + extension (but without the path)
- void SetFullName(const wxString& fullname);
- wxString GetFullName() const;
-
- const wxArrayString& GetDirs() const { return m_dirs; }
-
- // flags are combination of wxPATH_GET_XXX flags
- wxString GetPath(int flags = wxPATH_GET_VOLUME,
- wxPathFormat format = wxPATH_NATIVE) const;
-
- // Replace current path with this one
- void SetPath( const wxString &path, wxPathFormat format = wxPATH_NATIVE );
-
- // Construct full path with name and ext
- wxString GetFullPath( wxPathFormat format = wxPATH_NATIVE ) const;
-
- // Return the short form of the path (returns identity on non-Windows platforms)
- wxString GetShortPath() const;
-
- // Return the long form of the path (returns identity on non-Windows platforms)
- wxString GetLongPath() const;
-
- // Is this a file or directory (not necessarily an existing one)
- bool IsDir() const { return m_name.empty() && m_ext.empty(); }
-
- // various helpers
-
- // get the canonical path format for this platform
- static wxPathFormat GetFormat( wxPathFormat format = wxPATH_NATIVE );
-
- // split a fullpath into the volume, path, (base) name and extension
- // (all of the pointers can be NULL)
- static void SplitPath(const wxString& fullpath,
- wxString *volume,
- wxString *path,
- wxString *name,
- wxString *ext,
- bool *hasExt = NULL,
- wxPathFormat format = wxPATH_NATIVE);
-
- static void SplitPath(const wxString& fullpath,
- wxString *volume,
- wxString *path,
- wxString *name,
- wxString *ext,
- wxPathFormat format)
- {
- SplitPath(fullpath, volume, path, name, ext, NULL, format);
- }
-
- // compatibility version: volume is part of path
- static void SplitPath(const wxString& fullpath,
- wxString *path,
- wxString *name,
- wxString *ext,
- wxPathFormat format = wxPATH_NATIVE);
-
- // split a path into volume and pure path part
- static void SplitVolume(const wxString& fullpathWithVolume,
- wxString *volume,
- wxString *path,
- wxPathFormat format = wxPATH_NATIVE);
-
- // Filesize
-
- // returns the size of the given filename
- wxULongLong GetSize() const;
- static wxULongLong GetSize(const wxString &file);
-
- // returns the size in a human readable form
- wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(_T("Not available")),
- int precision = 1) const;
- static wxString GetHumanReadableSize(const wxULongLong &sz,
- const wxString &nullsize = wxGetTranslation(_T("Not available")),
- int precision = 1);
-
-
- // deprecated methods, don't use any more
- // --------------------------------------
-
-#ifndef __DIGITALMARS__
- wxString GetPath( bool withSep, wxPathFormat format = wxPATH_NATIVE ) const
- { return GetPath(withSep ? wxPATH_GET_SEPARATOR : 0, format); }
-#endif
- wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const
- { return GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR, format); }
-
-private:
- // check whether this dir is valid for Append/Prepend/InsertDir()
- static bool IsValidDirComponent(const wxString& dir);
-
- // the drive/volume/device specification (always empty for Unix)
- wxString m_volume;
-
- // the path components of the file
- wxArrayString m_dirs;
-
- // the file name and extension (empty for directories)
- wxString m_name,
- m_ext;
-
- // when m_dirs is empty it may mean either that we have no path at all or
- // that our path is '/', i.e. the root directory
- //
- // we use m_relative to distinguish between these two cases, it will be
- // true in the former and false in the latter
- //
- // NB: the path is not absolute just because m_relative is false, it still
- // needs the drive (i.e. volume) in some formats (Windows)
- bool m_relative;
-
- // when m_ext is empty, it may be because we don't have any extension or
- // because we have an empty extension
- //
- // the difference is important as file with name "foo" and without
- // extension has full name "foo" while with empty extension it is "foo."
- bool m_hasExt;
-};
-
-#endif // _WX_FILENAME_H_
-
diff --git a/desmume/src/windows/wx/include/wx/filepicker.h b/desmume/src/windows/wx/include/wx/filepicker.h
deleted file mode 100644
index aad2a4f65..000000000
--- a/desmume/src/windows/wx/include/wx/filepicker.h
+++ /dev/null
@@ -1,398 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/filepicker.h
-// Purpose: wxFilePickerCtrl, wxDirPickerCtrl base header
-// Author: Francesco Montorsi
-// Modified by:
-// Created: 14/4/2006
-// Copyright: (c) Francesco Montorsi
-// RCS-ID: $Id: filepicker.h 49804 2007-11-10 01:09:42Z VZ $
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_FILEDIRPICKER_H_BASE_
-#define _WX_FILEDIRPICKER_H_BASE_
-
-#include "wx/defs.h"
-
-#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-
-#include "wx/pickerbase.h"
-
-class WXDLLIMPEXP_FWD_CORE wxDialog;
-class WXDLLIMPEXP_FWD_CORE wxFileDirPickerEvent;
-
-extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetLabel[];
-extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerWidgetNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxFilePickerCtrlNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxFileSelectorPromptStr[];
-
-extern WXDLLEXPORT_DATA(const wxChar) wxDirPickerWidgetLabel[];
-extern WXDLLEXPORT_DATA(const wxChar) wxDirPickerWidgetNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxDirPickerCtrlNameStr[];
-extern WXDLLEXPORT_DATA(const wxChar) wxDirSelectorPromptStr[];
-
-
-// ----------------------------------------------------------------------------
-// wxFileDirPickerWidgetBase: a generic abstract interface which must be
-// implemented by controls used by wxFileDirPickerCtrlBase
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxFileDirPickerWidgetBase
-{
-public:
- wxFileDirPickerWidgetBase() { }
- virtual ~wxFileDirPickerWidgetBase() { }
-
- wxString GetPath() const { return m_path; }
- virtual void SetPath(const wxString &str) { m_path=str; }
-
- // returns the picker widget cast to wxControl
- virtual wxControl *AsControl() = 0;
-
-protected:
- virtual void UpdateDialogPath(wxDialog *) = 0;
- virtual void UpdatePathFromDialog(wxDialog *) = 0;
-
- wxString m_path;
-};
-
-// Styles which must be supported by all controls implementing wxFileDirPickerWidgetBase
-// NB: these styles must be defined to carefully-chosen values to
-// avoid conflicts with wxButton's styles
-
-#define wxFLP_OPEN 0x0400
-#define wxFLP_SAVE 0x0800
-#define wxFLP_OVERWRITE_PROMPT 0x1000
-#define wxFLP_FILE_MUST_EXIST 0x2000
-#define wxFLP_CHANGE_DIR 0x4000
-
-// NOTE: wxMULTIPLE is not supported !
-
-
-#define wxDIRP_DIR_MUST_EXIST 0x0008
-#define wxDIRP_CHANGE_DIR 0x0010
-
-
-// map platform-dependent controls which implement the wxFileDirPickerWidgetBase
-// under the name "wxFilePickerWidget" and "wxDirPickerWidget".
-// NOTE: wxFileDirPickerCtrlBase will allocate a wx{File|Dir}PickerWidget and this
-// requires that all classes being mapped as wx{File|Dir}PickerWidget have the
-// same prototype for the contructor...
-// since GTK >= 2.6, there is GtkFileButton
-#if defined(__WXGTK26__) && !defined(__WXUNIVERSAL__)
- #include "wx/gtk/filepicker.h"
- #define wxFilePickerWidget wxFileButton
- #define wxDirPickerWidget wxDirButton
-#else
- #include "wx/generic/filepickerg.h"
- #define wxFilePickerWidget wxGenericFileButton
- #define wxDirPickerWidget wxGenericDirButton
-#endif
-
-
-
-// ----------------------------------------------------------------------------
-// wxFileDirPickerCtrlBase
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxFileDirPickerCtrlBase : public wxPickerBase
-{
-public:
- wxFileDirPickerCtrlBase() : m_bIgnoreNextTextCtrlUpdate(false) {}
-
-protected:
- // NB: no default values since this function will never be used
- // directly by the user and derived classes wouldn't use them
- bool CreateBase(wxWindow *parent,
- wxWindowID id,
- const wxString& path,
- const wxString &message,
- const wxString &wildcard,
- const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxValidator& validator,
- const wxString& name);
-
-public: // public API
-
- wxString GetPath() const;
- void SetPath(const wxString &str);
-
-public: // internal functions
-
- void UpdatePickerFromTextCtrl();
- void UpdateTextCtrlFromPicker();
-
- // event handler for our picker
- void OnFileDirChange(wxFileDirPickerEvent &);
-
- // Returns TRUE if the current path is a valid one
- // (i.e. a valid file for a wxFilePickerWidget or a valid
- // folder for a wxDirPickerWidget).
- virtual bool CheckPath(const wxString &str) const = 0;
-
- // TRUE if any textctrl change should update the current working directory
- virtual bool IsCwdToUpdate() const = 0;
-
- // Returns the event type sent by this picker
- virtual wxEventType GetEventType() const = 0;
-
- // Returns the filtered value currently placed in the text control (if present).
- virtual wxString GetTextCtrlValue() const = 0;
-
-protected:
- // creates the picker control
- virtual
- wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent,
- const wxString& path,
- const wxString& message,
- const wxString& wildcard) = 0;
-
-protected:
-
- // true if the next UpdateTextCtrl() call is to ignore
- bool m_bIgnoreNextTextCtrlUpdate;
-
- // m_picker object as wxFileDirPickerWidgetBase interface
- wxFileDirPickerWidgetBase *m_pickerIface;
-};
-
-#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-
-
-#if wxUSE_FILEPICKERCTRL
-
-// ----------------------------------------------------------------------------
-// wxFilePickerCtrl: platform-independent class which embeds the
-// platform-dependent wxFilePickerWidget and, if wxFLP_USE_TEXTCTRL style is
-// used, a textctrl next to it.
-// ----------------------------------------------------------------------------
-
-#define wxFLP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
-
-#ifdef __WXGTK__
- // GTK apps usually don't have a textctrl next to the picker
- #define wxFLP_DEFAULT_STYLE (wxFLP_OPEN|wxFLP_FILE_MUST_EXIST)
-#else
- #define wxFLP_DEFAULT_STYLE (wxFLP_USE_TEXTCTRL|wxFLP_OPEN|wxFLP_FILE_MUST_EXIST)
-#endif
-
-class WXDLLIMPEXP_CORE wxFilePickerCtrl : public wxFileDirPickerCtrlBase
-{
-public:
- wxFilePickerCtrl() {}
-
- wxFilePickerCtrl(wxWindow *parent,
- wxWindowID id,
- const wxString& path = wxEmptyString,
- const wxString& message = wxFileSelectorPromptStr,
- const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxFLP_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxFilePickerCtrlNameStr)
- {
- Create(parent, id, path, message, wildcard, pos, size, style,
- validator, name);
- }
-
- bool Create(wxWindow *parent,
- wxWindowID id,
- const wxString& path = wxEmptyString,
- const wxString& message = wxFileSelectorPromptStr,
- const wxString& wildcard = wxFileSelectorDefaultWildcardStr,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxFLP_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxFilePickerCtrlNameStr)
- {
- return wxFileDirPickerCtrlBase::CreateBase(parent, id, path,
- message, wildcard,
- pos, size, style,
- validator, name);
- }
-
-
-public: // overrides
-
- // return true if the given path is valid for this control
- bool CheckPath(const wxString& path) const;
-
- // return the text control value in canonical form
- wxString GetTextCtrlValue() const;
-
- bool IsCwdToUpdate() const
- { return HasFlag(wxFLP_CHANGE_DIR); }
-
- wxEventType GetEventType() const
- { return wxEVT_COMMAND_FILEPICKER_CHANGED; }
-
-protected:
- wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent,
- const wxString& path,
- const wxString& message,
- const wxString& wildcard)
- {
- return new wxFilePickerWidget(parent, wxID_ANY,
- wxFilePickerWidgetLabel,
- path, message, wildcard,
- wxDefaultPosition, wxDefaultSize,
- GetPickerStyle(GetWindowStyle()));
- }
-
- // extracts the style for our picker from wxFileDirPickerCtrlBase's style
- long GetPickerStyle(long style) const
- {
- return (style & (wxFLP_OPEN|wxFLP_SAVE|wxFLP_OVERWRITE_PROMPT|
- wxFLP_FILE_MUST_EXIST|wxFLP_CHANGE_DIR));
- }
-
-private:
- DECLARE_DYNAMIC_CLASS(wxFilePickerCtrl)
-};
-
-#endif // wxUSE_FILEPICKERCTRL
-
-
-#if wxUSE_DIRPICKERCTRL
-
-// ----------------------------------------------------------------------------
-// wxDirPickerCtrl: platform-independent class which embeds the
-// platform-dependent wxDirPickerWidget and eventually a textctrl
-// (see wxDIRP_USE_TEXTCTRL) next to it.
-// ----------------------------------------------------------------------------
-
-#define wxDIRP_USE_TEXTCTRL (wxPB_USE_TEXTCTRL)
-
-#ifdef __WXGTK__
- // GTK apps usually don't have a textctrl next to the picker
- #define wxDIRP_DEFAULT_STYLE (wxDIRP_DIR_MUST_EXIST)
-#else
- #define wxDIRP_DEFAULT_STYLE (wxDIRP_USE_TEXTCTRL|wxDIRP_DIR_MUST_EXIST)
-#endif
-
-class WXDLLIMPEXP_CORE wxDirPickerCtrl : public wxFileDirPickerCtrlBase
-{
-public:
- wxDirPickerCtrl() {}
-
- wxDirPickerCtrl(wxWindow *parent, wxWindowID id,
- const wxString& path = wxEmptyString,
- const wxString& message = wxDirSelectorPromptStr,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDIRP_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxDirPickerCtrlNameStr)
- {
- Create(parent, id, path, message, pos, size, style, validator, name);
- }
-
- bool Create(wxWindow *parent, wxWindowID id,
- const wxString& path = wxEmptyString,
- const wxString& message = wxDirSelectorPromptStr,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxDIRP_DEFAULT_STYLE,
- const wxValidator& validator = wxDefaultValidator,
- const wxString& name = wxDirPickerCtrlNameStr)
- {
- return wxFileDirPickerCtrlBase::CreateBase
- (
- parent, id, path, message, wxEmptyString,
- pos, size, style, validator, name
- );
- }
-
-
-public: // overrides
-
- bool CheckPath(const wxString &path) const;
-
- wxString GetTextCtrlValue() const;
-
- bool IsCwdToUpdate() const
- { return HasFlag(wxDIRP_CHANGE_DIR); }
-
- wxEventType GetEventType() const
- { return wxEVT_COMMAND_DIRPICKER_CHANGED; }
-
-protected:
- wxFileDirPickerWidgetBase *CreatePicker(wxWindow *parent,
- const wxString& path,
- const wxString& message,
- const wxString& WXUNUSED(wildcard))
- {
- return new wxDirPickerWidget(parent, wxID_ANY, wxDirPickerWidgetLabel,
- path, message,
- wxDefaultPosition, wxDefaultSize,
- GetPickerStyle(GetWindowStyle()));
- }
-
- // extracts the style for our picker from wxFileDirPickerCtrlBase's style
- long GetPickerStyle(long style) const
- { return (style & (wxDIRP_DIR_MUST_EXIST|wxDIRP_CHANGE_DIR)); }
-
-private:
- DECLARE_DYNAMIC_CLASS(wxDirPickerCtrl)
-};
-
-#endif // wxUSE_DIRPICKERCTRL
-
-
-#if wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-
-// ----------------------------------------------------------------------------
-// wxFileDirPickerEvent: used by wxFilePickerCtrl and wxDirPickerCtrl only
-// ----------------------------------------------------------------------------
-
-BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, 1102)
- DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, 1103)
-END_DECLARE_EVENT_TYPES()
-
-class WXDLLIMPEXP_CORE wxFileDirPickerEvent : public wxCommandEvent
-{
-public:
- wxFileDirPickerEvent() {}
- wxFileDirPickerEvent(wxEventType type, wxObject *generator, int id, const wxString &path)
- : wxCommandEvent(type, id),
- m_path(path)
- {
- SetEventObject(generator);
- }
-
- wxString GetPath() const { return m_path; }
- void SetPath(const wxString &p) { m_path = p; }
-
- // default copy ctor, assignment operator and dtor are ok
- virtual wxEvent *Clone() const { return new wxFileDirPickerEvent(*this); }
-
-private:
- wxString m_path;
-
- DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileDirPickerEvent)
-};
-
-// ----------------------------------------------------------------------------
-// event types and macros
-// ----------------------------------------------------------------------------
-
-typedef void (wxEvtHandler::*wxFileDirPickerEventFunction)(wxFileDirPickerEvent&);
-
-#define wxFileDirPickerEventHandler(func) \
- (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxFileDirPickerEventFunction, &func)
-
-#define EVT_FILEPICKER_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn))
-#define EVT_DIRPICKER_CHANGED(id, fn) \
- wx__DECLARE_EVT1(wxEVT_COMMAND_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn))
-
-
-#endif // wxUSE_FILEPICKERCTRL || wxUSE_DIRPICKERCTRL
-
-#endif // _WX_FILEDIRPICKER_H_BASE_
-
diff --git a/desmume/src/windows/wx/include/wx/filesys.h b/desmume/src/windows/wx/include/wx/filesys.h
deleted file mode 100644
index 7d1ad27e8..000000000
--- a/desmume/src/windows/wx/include/wx/filesys.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/filesys.h
-// Purpose: class for opening files - virtual file system
-// Author: Vaclav Slavik
-// Copyright: (c) 1999 Vaclav Slavik
-// RCS-ID: $Id: filesys.h 53135 2008-04-12 02:31:04Z VZ $
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __FILESYS_H__
-#define __FILESYS_H__
-
-#include "wx/defs.h"
-
-#if !wxUSE_STREAMS
-#error You cannot compile virtual file systems without wxUSE_STREAMS
-#endif
-
-#if wxUSE_HTML && !wxUSE_FILESYSTEM
-#error You cannot compile wxHTML without virtual file systems
-#endif
-
-#if wxUSE_FILESYSTEM
-
-#include "wx/stream.h"
-#include "wx/datetime.h"
-#include "wx/filename.h"
-#include "wx/hashmap.h"
-
-class WXDLLIMPEXP_FWD_BASE wxFSFile;
-class WXDLLIMPEXP_FWD_BASE wxFileSystemHandler;
-class WXDLLIMPEXP_FWD_BASE wxFileSystem;
-
-//--------------------------------------------------------------------------------
-// wxFSFile
-// This class is a file opened using wxFileSystem. It consists of
-// input stream, location, mime type & optional anchor
-// (in 'index.htm#chapter2', 'chapter2' is anchor)
-//--------------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxFSFile : public wxObject
-{
-public:
- wxFSFile(wxInputStream *stream, const wxString& loc,
- const wxString& mimetype, const wxString& anchor
-#if wxUSE_DATETIME
- , wxDateTime modif
-#endif // wxUSE_DATETIME
- )
- {
- m_Stream = stream;
- m_Location = loc;
- m_MimeType = mimetype; m_MimeType.MakeLower();
- m_Anchor = anchor;
-#if wxUSE_DATETIME
- m_Modif = modif;
-#endif // wxUSE_DATETIME
- }
-
- virtual ~wxFSFile() { delete m_Stream; }
-
- // returns stream. This doesn't give away ownership of the stream object.
- wxInputStream *GetStream() const { return m_Stream; }
-
- // gives away the ownership of the current stream.
- wxInputStream *DetachStream()
- {
- wxInputStream *stream = m_Stream;
- m_Stream = NULL;
- return stream;
- }
-
- // deletes the current stream and takes ownership of another.
- void SetStream(wxInputStream *stream)
- {
- delete m_Stream;
- m_Stream = stream;
- }
-
- // returns file's mime type
- const wxString& GetMimeType() const { return m_MimeType; }
-
- // returns the original location (aka filename) of the file
- const wxString& GetLocation() const { return m_Location; }
-
- const wxString& GetAnchor() const { return m_Anchor; }
-
-#if wxUSE_DATETIME
- wxDateTime GetModificationTime() const { return m_Modif; }
-#endif // wxUSE_DATETIME
-
-private:
- wxInputStream *m_Stream;
- wxString m_Location;
- wxString m_MimeType;
- wxString m_Anchor;
-#if wxUSE_DATETIME
- wxDateTime m_Modif;
-#endif // wxUSE_DATETIME
-
- DECLARE_ABSTRACT_CLASS(wxFSFile)
- DECLARE_NO_COPY_CLASS(wxFSFile)
-};
-
-
-
-
-
-//--------------------------------------------------------------------------------
-// wxFileSystemHandler
-// This class is FS handler for wxFileSystem. It provides
-// interface to access certain
-// kinds of files (HTPP, FTP, local, tar.gz etc..)
-//--------------------------------------------------------------------------------
-
-class WXDLLIMPEXP_BASE wxFileSystemHandler : public wxObject
-{
-public:
- wxFileSystemHandler() : wxObject() {}
-
- // returns true if this handler is able to open given location
- virtual bool CanOpen(const wxString& location) = 0;
-
- // opens given file and returns pointer to input stream.
- // Returns NULL if opening failed.
- // The location is always absolute path.
- virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) = 0;
-
- // Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
- // the query to directories or wxFILE for files only or 0 for either.
- // Returns filename or empty string if no more matching file exists
- virtual wxString FindFirst(const wxString& spec, int flags = 0);
- virtual wxString FindNext();
-
-protected:
- // returns protocol ("file", "http", "tar" etc.) The last (most right)
- // protocol is used:
- // {it returns "tar" for "file:subdir/archive.tar.gz#tar:/README.txt"}
- wxString GetProtocol(const wxString& location) const;
-
- // returns left part of address:
- // {it returns "file:subdir/archive.tar.gz" for "file:subdir/archive.tar.gz#tar:/README.txt"}
- wxString GetLeftLocation(const wxString& location) const;
-
- // returns anchor part of address:
- // {it returns "anchor" for "file:subdir/archive.tar.gz#tar:/README.txt#anchor"}
- // NOTE: anchor is NOT a part of GetLeftLocation()'s return value
- wxString GetAnchor(const wxString& location) const;
-
- // returns right part of address:
- // {it returns "/README.txt" for "file:subdir/archive.tar.gz#tar:/README.txt"}
- wxString GetRightLocation(const wxString& location) const;
-
- // Returns MIME type of the file - w/o need to open it
- // (default behaviour is that it returns type based on extension)
- wxString GetMimeTypeFromExt(const wxString& location);
-
- DECLARE_ABSTRACT_CLASS(wxFileSystemHandler)
-};
-
-
-
-
-//--------------------------------------------------------------------------------
-// wxFileSystem
-// This class provides simple interface for opening various
-// kinds of files (HTPP, FTP, local, tar.gz etc..)
-//--------------------------------------------------------------------------------
-
-// Open Bit Flags
-enum {
- wxFS_READ = 1, // Open for reading
- wxFS_SEEKABLE = 4 // Returned stream will be seekable
-};
-
-WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL(wxFileSystemHandler*, wxFSHandlerHash, class WXDLLIMPEXP_BASE);
-
-class WXDLLIMPEXP_BASE wxFileSystem : public wxObject
-{
-public:
- wxFileSystem() : wxObject() { m_FindFileHandler = NULL;}
- virtual ~wxFileSystem();
-
- // sets the current location. Every call to OpenFile is
- // relative to this location.
- // NOTE !!
- // unless is_dir = true 'location' is *not* the directory but
- // file contained in this directory
- // (so ChangePathTo("dir/subdir/xh.htm") sets m_Path to "dir/subdir/")
- void ChangePathTo(const wxString& location, bool is_dir = false);
-
- wxString GetPath() const {return m_Path;}
-
- // opens given file and returns pointer to input stream.
- // Returns NULL if opening failed.
- // It first tries to open the file in relative scope
- // (based on ChangePathTo()'s value) and then as an absolute
- // path.
- wxFSFile* OpenFile(const wxString& location, int flags = wxFS_READ);
-
- // Finds first/next file that matches spec wildcard. flags can be wxDIR for restricting
- // the query to directories or wxFILE for files only or 0 for either.
- // Returns filename or empty string if no more matching file exists
- wxString FindFirst(const wxString& spec, int flags = 0);
- wxString FindNext();
-
- // find a file in a list of directories, returns false if not found
- bool FindFileInPath(wxString *pStr, const wxChar *path, const wxChar *file);
-
- // Adds FS handler.
- // In fact, this class is only front-end to the FS handlers :-)
- static void AddHandler(wxFileSystemHandler *handler);
-
- // Removes FS handler
- static wxFileSystemHandler* RemoveHandler(wxFileSystemHandler *handler);
-
- // Returns true if there is a handler which can open the given location.
- static bool HasHandlerForPath(const wxString& location);
-
- // remove all items from the m_Handlers list
- static void CleanUpHandlers();
-
- // Returns the native path for a file URL
- static wxFileName URLToFileName(const wxString& url);
-
- // Returns the file URL for a native path
- static wxString FileNameToURL(const wxFileName& filename);
-
-
-protected:
- wxFileSystemHandler *MakeLocal(wxFileSystemHandler *h);
-
- wxString m_Path;
- // the path (location) we are currently in
- // this is path, not file!
- // (so if you opened test/demo.htm, it is
- // "test/", not "test/demo.htm")
- wxString m_LastName;
- // name of last opened file (full path)
- static wxList m_Handlers;
- // list of FS handlers
- wxFileSystemHandler *m_FindFileHandler;
- // handler that succeed in FindFirst query
- wxFSHandlerHash m_LocalHandlers;
- // Handlers local to this instance
-
- DECLARE_DYNAMIC_CLASS(wxFileSystem)
- DECLARE_NO_COPY_CLASS(wxFileSystem)
-};
-
-
-/*
-
-'location' syntax:
-
-To determine FS type, we're using standard KDE notation:
-file:/absolute/path/file.htm
-file:relative_path/xxxxx.html
-/some/path/x.file ('file:' is default)
-http://www.gnome.org
-file:subdir/archive.tar.gz#tar:/README.txt
-
-special characters :
- ':' - FS identificator is before this char
- '#' - separator. It can be either HTML anchor ("index.html#news")
- (in case there is no ':' in the string to the right from it)
- or FS separator
- (example : http://www.wxhtml.org/wxhtml-0.1.tar.gz#tar:/include/wxhtml/filesys.h"
- this would access tgz archive stored on web)
- '/' - directory (path) separator. It is used to determine upper-level path.
- HEY! Don't use \ even if you're on Windows!
-
-*/
-
-
-class WXDLLIMPEXP_BASE wxLocalFSHandler : public wxFileSystemHandler
-{
-public:
- virtual bool CanOpen(const wxString& location);
- virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
- virtual wxString FindFirst(const wxString& spec, int flags = 0);
- virtual wxString FindNext();
-
- // wxLocalFSHandler will prefix all filenames with 'root' before accessing
- // files on disk. This effectively makes 'root' the top-level directory
- // and prevents access to files outside this directory.
- // (This is similar to Unix command 'chroot'.)
- static void Chroot(const wxString& root) { ms_root = root; }
-
-protected:
- static wxString ms_root;
-};
-
-
-
-#endif
- // wxUSE_FILESYSTEM
-
-#endif
- // __FILESYS_H__
diff --git a/desmume/src/windows/wx/include/wx/flags.h b/desmume/src/windows/wx/include/wx/flags.h
deleted file mode 100644
index a266e4dde..000000000
--- a/desmume/src/windows/wx/include/wx/flags.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-// Name: wx/flags.h
-// Purpose: a bitset suited for replacing the current style flags
-// Author: Stefan Csomor
-// Modified by:
-// Created: 27/07/03
-// RCS-ID: $Id: flags.h 35650 2005-09-23 12:56:45Z MR $
-// Copyright: (c) 2003 Stefan Csomor
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_SETH__
-#define _WX_SETH__
-
-// wxBitset should be applied to an enum, then this can be used like
-// bitwise operators but keeps the type safety and information, the
-// enums must be in a sequence , their value determines the bit position
-// that they represent
-// The api is made as close as possible to