Add Test for Gtkmm4

This commit is contained in:
daleclack 2021-07-03 21:53:48 +08:00
parent 3ceb8d0269
commit ab66fbd7bf
10 changed files with 581 additions and 3 deletions

View File

@ -1,4 +1,3 @@
cd build_mingw
mingw32-make
gtk87
pause
gtk89

View File

@ -1,3 +1,3 @@
cd build_mingw
mingw32-make
gtk85
gtk90

View File

@ -0,0 +1,26 @@
set(CMAKE_CXX_STANDARD 17)
cmake_minimum_required(VERSION 3.0.0)
project(gtk91 VERSION 0.1.0)
include(CTest)
enable_testing()
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
include_directories(..)
find_package (PkgConfig REQUIRED)
pkg_check_modules (GTKMM4 REQUIRED gtkmm-4.0)
include_directories (${GTKMM4_INCLUDE_DIRS})
link_directories (${GTKMM4_LIBRARY_DIRS})
add_executable(gtk91 src/main.cc src/resources.cpp)
IF(WIN32)
SET(CMAKE_EXE_LINKER_FLAGS -mwindows)
ENDIF(WIN32)
add_definitions (${GTKMM4_CFLAGS_OTHER})
target_link_libraries (${PROJECT_NAME} ${GTKMM4_LIBRARIES})

View File

@ -0,0 +1,3 @@
cd build_mingw
mingw32-make
gtk91

View File

@ -0,0 +1 @@
glib-compile-resources gtk89.resource.xml --target=../src/resources.cpp --generate-source

View File

@ -0,0 +1,52 @@
@import url("resource://css_accordion/reset.css");
* {
transition-property: color, background-color, border-color, background-image, padding, border-width;
transition-duration: 1s;
font: 20px Cantarell;
}
window {
background: linear-gradient(153deg, #151515, #151515 5px, transparent 5px) 0 0,
linear-gradient(333deg, #151515, #151515 5px, transparent 5px) 10px 5px,
linear-gradient(153deg, #222, #222 5px, transparent 5px) 0 5px,
linear-gradient(333deg, #222, #222 5px, transparent 5px) 10px 10px,
linear-gradient(90deg, #1b1b1b, #1b1b1b 10px, transparent 10px),
linear-gradient(#1d1d1d, #1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
background-color: #131313;
background-size: 20px 20px;
}
button {
color: black;
background-color: #bbb;
border-style: solid;
border-width: 2px 0 2px 2px;
border-color: #333;
padding: 12px 4px;
}
button:first-child {
border-radius: 5px 0 0 5px;
}
button:last-child {
border-radius: 0 5px 5px 0;
border-width: 2px;
}
button:hover {
padding: 12px 48px;
background-color: #4870bc;
}
button *:hover {
color: white;
}
button:hover:active,
button:active {
background-color: #993401;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/css_accordion">
<file>css_accordion.css</file>
<file>reset.css</file>
</gresource>
</gresources>

View File

@ -0,0 +1,11 @@
/* @import this colorsheet to get the default values for every property.
* This is useful when writing special CSS tests that should not be
* inluenced by themes - not even the default ones.
* Keep in mind that the output will be very ugly and not look like
* anything GTK.
* Also, when adding new style properties, please add them here.
*/
* {
all: unset;
}

View File

@ -0,0 +1,65 @@
#include <gtkmm.h>
class MyWin : public Gtk::Window{
public:
MyWin()
:main_box(Gtk::Orientation::HORIZONTAL,0)
{
//Initalize window
set_title("CSS Accordion");
set_default_size(600,300);
set_icon_name("org.gtk.daleclack");
//Initalize Box
main_box.set_halign(Gtk::Align::CENTER);
main_box.set_valign(Gtk::Align::CENTER);
//Add Buttons
btn1.set_label("This");
main_box.append(btn1);
btn2.set_label("Is");
main_box.append(btn2);
btn3.set_label("A");
main_box.append(btn3);
btn4.set_label("CSS");
main_box.append(btn4);
btn5.set_label("Accordion");
main_box.append(btn5);
btn6.set_label(":-)");
main_box.append(btn6);
set_child(main_box);
//Apply css theme
provider=Gtk::CssProvider::create();
provider->load_from_resource("/css_accordion/css_accordion.css");
style=get_style_context();
style->add_provider(provider,G_MAXUINT);
for(child = main_box.get_first_child();
child != NULL;
child = child->get_next_sibling()){
apply_css(*child);
}
}
private:
//Child Widgets
Gtk::Box main_box;
Gtk::Button btn1,btn2,btn3,btn4,btn5,btn6;
Gtk::Widget * child;
Glib::RefPtr<Gtk::CssProvider> provider;
Glib::RefPtr<Gtk::StyleContext> style;
//Apply CSS for each widget
void apply_css(Gtk::Widget &widget){
auto style1=widget.get_style_context();
style1->add_provider(provider,G_MAXUINT);
}
};
int main(int argc,char **argv){
auto app=Gtk::Application::create("org.gtk.daleclack");
return app->make_window_and_run<MyWin>(argc,argv);
}

View File

@ -0,0 +1,414 @@
#include <gio/gio.h>
#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
# define SECTION __attribute__ ((section (".gresource.gtk89"), aligned (8)))
#else
# define SECTION
#endif
#ifdef _MSC_VER
static const SECTION union { const guint8 data[1945]; const double alignment; void * const ptr;} gtk89_resource_data = { {
0107, 0126, 0141, 0162, 0151, 0141, 0156, 0164, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0000,
0030, 0000, 0000, 0000, 0220, 0000, 0000, 0000, 0000, 0000, 0000, 0050, 0004, 0000, 0000, 0000,
0000, 0000, 0000, 0000, 0001, 0000, 0000, 0000, 0002, 0000, 0000, 0000, 0003, 0000, 0000, 0000,
0324, 0265, 0002, 0000, 0377, 0377, 0377, 0377, 0220, 0000, 0000, 0000, 0001, 0000, 0114, 0000,
0224, 0000, 0000, 0000, 0230, 0000, 0000, 0000, 0275, 0234, 0323, 0002, 0000, 0000, 0000, 0000,
0230, 0000, 0000, 0000, 0016, 0000, 0114, 0000, 0250, 0000, 0000, 0000, 0260, 0000, 0000, 0000,
0256, 0235, 0205, 0135, 0001, 0000, 0000, 0000, 0260, 0000, 0000, 0000, 0021, 0000, 0166, 0000,
0310, 0000, 0000, 0000, 0011, 0006, 0000, 0000, 0027, 0353, 0043, 0352, 0001, 0000, 0000, 0000,
0011, 0006, 0000, 0000, 0011, 0000, 0166, 0000, 0030, 0006, 0000, 0000, 0230, 0007, 0000, 0000,
0057, 0000, 0000, 0000, 0001, 0000, 0000, 0000, 0143, 0163, 0163, 0137, 0141, 0143, 0143, 0157,
0162, 0144, 0151, 0157, 0156, 0057, 0000, 0000, 0002, 0000, 0000, 0000, 0003, 0000, 0000, 0000,
0143, 0163, 0163, 0137, 0141, 0143, 0143, 0157, 0162, 0144, 0151, 0157, 0156, 0056, 0143, 0163,
0163, 0000, 0000, 0000, 0000, 0000, 0000, 0000, 0061, 0005, 0000, 0000, 0000, 0000, 0000, 0000,
0100, 0151, 0155, 0160, 0157, 0162, 0164, 0040, 0165, 0162, 0154, 0050, 0042, 0162, 0145, 0163,
0157, 0165, 0162, 0143, 0145, 0072, 0057, 0057, 0143, 0163, 0163, 0137, 0141, 0143, 0143, 0157,
0162, 0144, 0151, 0157, 0156, 0057, 0162, 0145, 0163, 0145, 0164, 0056, 0143, 0163, 0163, 0042,
0051, 0073, 0012, 0012, 0052, 0040, 0173, 0012, 0040, 0040, 0040, 0040, 0164, 0162, 0141, 0156,
0163, 0151, 0164, 0151, 0157, 0156, 0055, 0160, 0162, 0157, 0160, 0145, 0162, 0164, 0171, 0072,
0040, 0143, 0157, 0154, 0157, 0162, 0054, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165,
0156, 0144, 0055, 0143, 0157, 0154, 0157, 0162, 0054, 0040, 0142, 0157, 0162, 0144, 0145, 0162,
0055, 0143, 0157, 0154, 0157, 0162, 0054, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165,
0156, 0144, 0055, 0151, 0155, 0141, 0147, 0145, 0054, 0040, 0160, 0141, 0144, 0144, 0151, 0156,
0147, 0054, 0040, 0142, 0157, 0162, 0144, 0145, 0162, 0055, 0167, 0151, 0144, 0164, 0150, 0073,
0012, 0040, 0040, 0040, 0040, 0164, 0162, 0141, 0156, 0163, 0151, 0164, 0151, 0157, 0156, 0055,
0144, 0165, 0162, 0141, 0164, 0151, 0157, 0156, 0072, 0040, 0061, 0163, 0073, 0012, 0012, 0040,
0040, 0040, 0040, 0146, 0157, 0156, 0164, 0072, 0040, 0062, 0060, 0160, 0170, 0040, 0103, 0141,
0156, 0164, 0141, 0162, 0145, 0154, 0154, 0073, 0012, 0175, 0012, 0012, 0167, 0151, 0156, 0144,
0157, 0167, 0040, 0173, 0012, 0040, 0040, 0040, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157,
0165, 0156, 0144, 0072, 0040, 0154, 0151, 0156, 0145, 0141, 0162, 0055, 0147, 0162, 0141, 0144,
0151, 0145, 0156, 0164, 0050, 0061, 0065, 0063, 0144, 0145, 0147, 0054, 0040, 0043, 0061, 0065,
0061, 0065, 0061, 0065, 0054, 0040, 0043, 0061, 0065, 0061, 0065, 0061, 0065, 0040, 0065, 0160,
0170, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160, 0141, 0162, 0145, 0156, 0164, 0040, 0065,
0160, 0170, 0051, 0040, 0060, 0040, 0060, 0054, 0012, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0154, 0151, 0156, 0145, 0141, 0162, 0055,
0147, 0162, 0141, 0144, 0151, 0145, 0156, 0164, 0050, 0063, 0063, 0063, 0144, 0145, 0147, 0054,
0040, 0043, 0061, 0065, 0061, 0065, 0061, 0065, 0054, 0040, 0043, 0061, 0065, 0061, 0065, 0061,
0065, 0040, 0065, 0160, 0170, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160, 0141, 0162, 0145,
0156, 0164, 0040, 0065, 0160, 0170, 0051, 0040, 0061, 0060, 0160, 0170, 0040, 0065, 0160, 0170,
0054, 0012, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0040, 0154, 0151, 0156, 0145, 0141, 0162, 0055, 0147, 0162, 0141, 0144, 0151, 0145, 0156,
0164, 0050, 0061, 0065, 0063, 0144, 0145, 0147, 0054, 0040, 0043, 0062, 0062, 0062, 0054, 0040,
0043, 0062, 0062, 0062, 0040, 0065, 0160, 0170, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160,
0141, 0162, 0145, 0156, 0164, 0040, 0065, 0160, 0170, 0051, 0040, 0060, 0040, 0065, 0160, 0170,
0054, 0012, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0040, 0154, 0151, 0156, 0145, 0141, 0162, 0055, 0147, 0162, 0141, 0144, 0151, 0145, 0156,
0164, 0050, 0063, 0063, 0063, 0144, 0145, 0147, 0054, 0040, 0043, 0062, 0062, 0062, 0054, 0040,
0043, 0062, 0062, 0062, 0040, 0065, 0160, 0170, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160,
0141, 0162, 0145, 0156, 0164, 0040, 0065, 0160, 0170, 0051, 0040, 0061, 0060, 0160, 0170, 0040,
0061, 0060, 0160, 0170, 0054, 0012, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0040, 0040, 0040, 0040, 0040, 0154, 0151, 0156, 0145, 0141, 0162, 0055, 0147, 0162, 0141,
0144, 0151, 0145, 0156, 0164, 0050, 0071, 0060, 0144, 0145, 0147, 0054, 0040, 0043, 0061, 0142,
0061, 0142, 0061, 0142, 0054, 0040, 0043, 0061, 0142, 0061, 0142, 0061, 0142, 0040, 0061, 0060,
0160, 0170, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160, 0141, 0162, 0145, 0156, 0164, 0040,
0061, 0060, 0160, 0170, 0051, 0054, 0012, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040, 0040,
0040, 0040, 0040, 0040, 0040, 0040, 0040, 0154, 0151, 0156, 0145, 0141, 0162, 0055, 0147, 0162,
0141, 0144, 0151, 0145, 0156, 0164, 0050, 0043, 0061, 0144, 0061, 0144, 0061, 0144, 0054, 0040,
0043, 0061, 0144, 0061, 0144, 0061, 0144, 0040, 0062, 0065, 0045, 0054, 0040, 0043, 0061, 0141,
0061, 0141, 0061, 0141, 0040, 0062, 0065, 0045, 0054, 0040, 0043, 0061, 0141, 0061, 0141, 0061,
0141, 0040, 0065, 0060, 0045, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160, 0141, 0162, 0145,
0156, 0164, 0040, 0065, 0060, 0045, 0054, 0040, 0164, 0162, 0141, 0156, 0163, 0160, 0141, 0162,
0145, 0156, 0164, 0040, 0067, 0065, 0045, 0054, 0040, 0043, 0062, 0064, 0062, 0064, 0062, 0064,
0040, 0067, 0065, 0045, 0054, 0040, 0043, 0062, 0064, 0062, 0064, 0062, 0064, 0051, 0073, 0012,
0040, 0040, 0040, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165, 0156, 0144, 0055, 0143,
0157, 0154, 0157, 0162, 0072, 0040, 0043, 0061, 0063, 0061, 0063, 0061, 0063, 0073, 0012, 0040,
0040, 0040, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165, 0156, 0144, 0055, 0163, 0151,
0172, 0145, 0072, 0040, 0062, 0060, 0160, 0170, 0040, 0062, 0060, 0160, 0170, 0073, 0012, 0175,
0012, 0012, 0142, 0165, 0164, 0164, 0157, 0156, 0040, 0173, 0012, 0040, 0040, 0040, 0040, 0143,
0157, 0154, 0157, 0162, 0072, 0040, 0142, 0154, 0141, 0143, 0153, 0073, 0012, 0040, 0040, 0040,
0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165, 0156, 0144, 0055, 0143, 0157, 0154, 0157,
0162, 0072, 0040, 0043, 0142, 0142, 0142, 0073, 0012, 0040, 0040, 0040, 0040, 0142, 0157, 0162,
0144, 0145, 0162, 0055, 0163, 0164, 0171, 0154, 0145, 0072, 0040, 0163, 0157, 0154, 0151, 0144,
0073, 0012, 0040, 0040, 0040, 0040, 0142, 0157, 0162, 0144, 0145, 0162, 0055, 0167, 0151, 0144,
0164, 0150, 0072, 0040, 0062, 0160, 0170, 0040, 0060, 0040, 0062, 0160, 0170, 0040, 0062, 0160,
0170, 0073, 0012, 0040, 0040, 0040, 0040, 0142, 0157, 0162, 0144, 0145, 0162, 0055, 0143, 0157,
0154, 0157, 0162, 0072, 0040, 0043, 0063, 0063, 0063, 0073, 0012, 0012, 0040, 0040, 0040, 0040,
0160, 0141, 0144, 0144, 0151, 0156, 0147, 0072, 0040, 0061, 0062, 0160, 0170, 0040, 0064, 0160,
0170, 0073, 0012, 0175, 0012, 0012, 0142, 0165, 0164, 0164, 0157, 0156, 0072, 0146, 0151, 0162,
0163, 0164, 0055, 0143, 0150, 0151, 0154, 0144, 0040, 0173, 0012, 0040, 0040, 0040, 0040, 0142,
0157, 0162, 0144, 0145, 0162, 0055, 0162, 0141, 0144, 0151, 0165, 0163, 0072, 0040, 0065, 0160,
0170, 0040, 0060, 0040, 0060, 0040, 0065, 0160, 0170, 0073, 0012, 0175, 0012, 0012, 0142, 0165,
0164, 0164, 0157, 0156, 0072, 0154, 0141, 0163, 0164, 0055, 0143, 0150, 0151, 0154, 0144, 0040,
0173, 0012, 0040, 0040, 0040, 0040, 0142, 0157, 0162, 0144, 0145, 0162, 0055, 0162, 0141, 0144,
0151, 0165, 0163, 0072, 0040, 0060, 0040, 0065, 0160, 0170, 0040, 0065, 0160, 0170, 0040, 0060,
0073, 0012, 0040, 0040, 0040, 0040, 0142, 0157, 0162, 0144, 0145, 0162, 0055, 0167, 0151, 0144,
0164, 0150, 0072, 0040, 0062, 0160, 0170, 0073, 0012, 0175, 0012, 0012, 0142, 0165, 0164, 0164,
0157, 0156, 0072, 0150, 0157, 0166, 0145, 0162, 0040, 0173, 0012, 0040, 0040, 0040, 0040, 0160,
0141, 0144, 0144, 0151, 0156, 0147, 0072, 0040, 0061, 0062, 0160, 0170, 0040, 0064, 0070, 0160,
0170, 0073, 0012, 0040, 0040, 0040, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165, 0156,
0144, 0055, 0143, 0157, 0154, 0157, 0162, 0072, 0040, 0043, 0064, 0070, 0067, 0060, 0142, 0143,
0073, 0012, 0175, 0012, 0012, 0142, 0165, 0164, 0164, 0157, 0156, 0040, 0052, 0072, 0150, 0157,
0166, 0145, 0162, 0040, 0173, 0012, 0040, 0040, 0040, 0040, 0143, 0157, 0154, 0157, 0162, 0072,
0040, 0167, 0150, 0151, 0164, 0145, 0073, 0012, 0175, 0012, 0012, 0142, 0165, 0164, 0164, 0157,
0156, 0072, 0150, 0157, 0166, 0145, 0162, 0072, 0141, 0143, 0164, 0151, 0166, 0145, 0054, 0012,
0142, 0165, 0164, 0164, 0157, 0156, 0072, 0141, 0143, 0164, 0151, 0166, 0145, 0040, 0173, 0012,
0040, 0040, 0040, 0040, 0142, 0141, 0143, 0153, 0147, 0162, 0157, 0165, 0156, 0144, 0055, 0143,
0157, 0154, 0157, 0162, 0072, 0040, 0043, 0071, 0071, 0063, 0064, 0060, 0061, 0073, 0012, 0175,
0012, 0000, 0000, 0050, 0165, 0165, 0141, 0171, 0051, 0162, 0145, 0163, 0145, 0164, 0056, 0143,
0163, 0163, 0000, 0000, 0000, 0000, 0000, 0000, 0160, 0001, 0000, 0000, 0000, 0000, 0000, 0000,
0057, 0052, 0040, 0100, 0151, 0155, 0160, 0157, 0162, 0164, 0040, 0164, 0150, 0151, 0163, 0040,
0143, 0157, 0154, 0157, 0162, 0163, 0150, 0145, 0145, 0164, 0040, 0164, 0157, 0040, 0147, 0145,
0164, 0040, 0164, 0150, 0145, 0040, 0144, 0145, 0146, 0141, 0165, 0154, 0164, 0040, 0166, 0141,
0154, 0165, 0145, 0163, 0040, 0146, 0157, 0162, 0040, 0145, 0166, 0145, 0162, 0171, 0040, 0160,
0162, 0157, 0160, 0145, 0162, 0164, 0171, 0056, 0012, 0040, 0052, 0040, 0124, 0150, 0151, 0163,
0040, 0151, 0163, 0040, 0165, 0163, 0145, 0146, 0165, 0154, 0040, 0167, 0150, 0145, 0156, 0040,
0167, 0162, 0151, 0164, 0151, 0156, 0147, 0040, 0163, 0160, 0145, 0143, 0151, 0141, 0154, 0040,
0103, 0123, 0123, 0040, 0164, 0145, 0163, 0164, 0163, 0040, 0164, 0150, 0141, 0164, 0040, 0163,
0150, 0157, 0165, 0154, 0144, 0040, 0156, 0157, 0164, 0040, 0142, 0145, 0012, 0040, 0052, 0040,
0151, 0156, 0154, 0165, 0145, 0156, 0143, 0145, 0144, 0040, 0142, 0171, 0040, 0164, 0150, 0145,
0155, 0145, 0163, 0040, 0055, 0040, 0156, 0157, 0164, 0040, 0145, 0166, 0145, 0156, 0040, 0164,
0150, 0145, 0040, 0144, 0145, 0146, 0141, 0165, 0154, 0164, 0040, 0157, 0156, 0145, 0163, 0056,
0012, 0040, 0052, 0040, 0113, 0145, 0145, 0160, 0040, 0151, 0156, 0040, 0155, 0151, 0156, 0144,
0040, 0164, 0150, 0141, 0164, 0040, 0164, 0150, 0145, 0040, 0157, 0165, 0164, 0160, 0165, 0164,
0040, 0167, 0151, 0154, 0154, 0040, 0142, 0145, 0040, 0166, 0145, 0162, 0171, 0040, 0165, 0147,
0154, 0171, 0040, 0141, 0156, 0144, 0040, 0156, 0157, 0164, 0040, 0154, 0157, 0157, 0153, 0040,
0154, 0151, 0153, 0145, 0012, 0040, 0052, 0040, 0141, 0156, 0171, 0164, 0150, 0151, 0156, 0147,
0040, 0107, 0124, 0113, 0056, 0012, 0040, 0052, 0040, 0101, 0154, 0163, 0157, 0054, 0040, 0167,
0150, 0145, 0156, 0040, 0141, 0144, 0144, 0151, 0156, 0147, 0040, 0156, 0145, 0167, 0040, 0163,
0164, 0171, 0154, 0145, 0040, 0160, 0162, 0157, 0160, 0145, 0162, 0164, 0151, 0145, 0163, 0054,
0040, 0160, 0154, 0145, 0141, 0163, 0145, 0040, 0141, 0144, 0144, 0040, 0164, 0150, 0145, 0155,
0040, 0150, 0145, 0162, 0145, 0056, 0012, 0040, 0052, 0057, 0012, 0012, 0052, 0040, 0173, 0012,
0040, 0040, 0141, 0154, 0154, 0072, 0040, 0165, 0156, 0163, 0145, 0164, 0073, 0012, 0175, 0012,
0000, 0000, 0050, 0165, 0165, 0141, 0171, 0051
} };
#else /* _MSC_VER */
static const SECTION union { const guint8 data[1945]; const double alignment; void * const ptr;} gtk89_resource_data = {
"\107\126\141\162\151\141\156\164\000\000\000\000\000\000\000\000"
"\030\000\000\000\220\000\000\000\000\000\000\050\004\000\000\000"
"\000\000\000\000\001\000\000\000\002\000\000\000\003\000\000\000"
"\324\265\002\000\377\377\377\377\220\000\000\000\001\000\114\000"
"\224\000\000\000\230\000\000\000\275\234\323\002\000\000\000\000"
"\230\000\000\000\016\000\114\000\250\000\000\000\260\000\000\000"
"\256\235\205\135\001\000\000\000\260\000\000\000\021\000\166\000"
"\310\000\000\000\011\006\000\000\027\353\043\352\001\000\000\000"
"\011\006\000\000\011\000\166\000\030\006\000\000\230\007\000\000"
"\057\000\000\000\001\000\000\000\143\163\163\137\141\143\143\157"
"\162\144\151\157\156\057\000\000\002\000\000\000\003\000\000\000"
"\143\163\163\137\141\143\143\157\162\144\151\157\156\056\143\163"
"\163\000\000\000\000\000\000\000\061\005\000\000\000\000\000\000"
"\100\151\155\160\157\162\164\040\165\162\154\050\042\162\145\163"
"\157\165\162\143\145\072\057\057\143\163\163\137\141\143\143\157"
"\162\144\151\157\156\057\162\145\163\145\164\056\143\163\163\042"
"\051\073\012\012\052\040\173\012\040\040\040\040\164\162\141\156"
"\163\151\164\151\157\156\055\160\162\157\160\145\162\164\171\072"
"\040\143\157\154\157\162\054\040\142\141\143\153\147\162\157\165"
"\156\144\055\143\157\154\157\162\054\040\142\157\162\144\145\162"
"\055\143\157\154\157\162\054\040\142\141\143\153\147\162\157\165"
"\156\144\055\151\155\141\147\145\054\040\160\141\144\144\151\156"
"\147\054\040\142\157\162\144\145\162\055\167\151\144\164\150\073"
"\012\040\040\040\040\164\162\141\156\163\151\164\151\157\156\055"
"\144\165\162\141\164\151\157\156\072\040\061\163\073\012\012\040"
"\040\040\040\146\157\156\164\072\040\062\060\160\170\040\103\141"
"\156\164\141\162\145\154\154\073\012\175\012\012\167\151\156\144"
"\157\167\040\173\012\040\040\040\040\142\141\143\153\147\162\157"
"\165\156\144\072\040\154\151\156\145\141\162\055\147\162\141\144"
"\151\145\156\164\050\061\065\063\144\145\147\054\040\043\061\065"
"\061\065\061\065\054\040\043\061\065\061\065\061\065\040\065\160"
"\170\054\040\164\162\141\156\163\160\141\162\145\156\164\040\065"
"\160\170\051\040\060\040\060\054\012\040\040\040\040\040\040\040"
"\040\040\040\040\040\040\040\040\040\154\151\156\145\141\162\055"
"\147\162\141\144\151\145\156\164\050\063\063\063\144\145\147\054"
"\040\043\061\065\061\065\061\065\054\040\043\061\065\061\065\061"
"\065\040\065\160\170\054\040\164\162\141\156\163\160\141\162\145"
"\156\164\040\065\160\170\051\040\061\060\160\170\040\065\160\170"
"\054\012\040\040\040\040\040\040\040\040\040\040\040\040\040\040"
"\040\040\154\151\156\145\141\162\055\147\162\141\144\151\145\156"
"\164\050\061\065\063\144\145\147\054\040\043\062\062\062\054\040"
"\043\062\062\062\040\065\160\170\054\040\164\162\141\156\163\160"
"\141\162\145\156\164\040\065\160\170\051\040\060\040\065\160\170"
"\054\012\040\040\040\040\040\040\040\040\040\040\040\040\040\040"
"\040\040\154\151\156\145\141\162\055\147\162\141\144\151\145\156"
"\164\050\063\063\063\144\145\147\054\040\043\062\062\062\054\040"
"\043\062\062\062\040\065\160\170\054\040\164\162\141\156\163\160"
"\141\162\145\156\164\040\065\160\170\051\040\061\060\160\170\040"
"\061\060\160\170\054\012\040\040\040\040\040\040\040\040\040\040"
"\040\040\040\040\040\040\154\151\156\145\141\162\055\147\162\141"
"\144\151\145\156\164\050\071\060\144\145\147\054\040\043\061\142"
"\061\142\061\142\054\040\043\061\142\061\142\061\142\040\061\060"
"\160\170\054\040\164\162\141\156\163\160\141\162\145\156\164\040"
"\061\060\160\170\051\054\012\040\040\040\040\040\040\040\040\040"
"\040\040\040\040\040\040\040\154\151\156\145\141\162\055\147\162"
"\141\144\151\145\156\164\050\043\061\144\061\144\061\144\054\040"
"\043\061\144\061\144\061\144\040\062\065\045\054\040\043\061\141"
"\061\141\061\141\040\062\065\045\054\040\043\061\141\061\141\061"
"\141\040\065\060\045\054\040\164\162\141\156\163\160\141\162\145"
"\156\164\040\065\060\045\054\040\164\162\141\156\163\160\141\162"
"\145\156\164\040\067\065\045\054\040\043\062\064\062\064\062\064"
"\040\067\065\045\054\040\043\062\064\062\064\062\064\051\073\012"
"\040\040\040\040\142\141\143\153\147\162\157\165\156\144\055\143"
"\157\154\157\162\072\040\043\061\063\061\063\061\063\073\012\040"
"\040\040\040\142\141\143\153\147\162\157\165\156\144\055\163\151"
"\172\145\072\040\062\060\160\170\040\062\060\160\170\073\012\175"
"\012\012\142\165\164\164\157\156\040\173\012\040\040\040\040\143"
"\157\154\157\162\072\040\142\154\141\143\153\073\012\040\040\040"
"\040\142\141\143\153\147\162\157\165\156\144\055\143\157\154\157"
"\162\072\040\043\142\142\142\073\012\040\040\040\040\142\157\162"
"\144\145\162\055\163\164\171\154\145\072\040\163\157\154\151\144"
"\073\012\040\040\040\040\142\157\162\144\145\162\055\167\151\144"
"\164\150\072\040\062\160\170\040\060\040\062\160\170\040\062\160"
"\170\073\012\040\040\040\040\142\157\162\144\145\162\055\143\157"
"\154\157\162\072\040\043\063\063\063\073\012\012\040\040\040\040"
"\160\141\144\144\151\156\147\072\040\061\062\160\170\040\064\160"
"\170\073\012\175\012\012\142\165\164\164\157\156\072\146\151\162"
"\163\164\055\143\150\151\154\144\040\173\012\040\040\040\040\142"
"\157\162\144\145\162\055\162\141\144\151\165\163\072\040\065\160"
"\170\040\060\040\060\040\065\160\170\073\012\175\012\012\142\165"
"\164\164\157\156\072\154\141\163\164\055\143\150\151\154\144\040"
"\173\012\040\040\040\040\142\157\162\144\145\162\055\162\141\144"
"\151\165\163\072\040\060\040\065\160\170\040\065\160\170\040\060"
"\073\012\040\040\040\040\142\157\162\144\145\162\055\167\151\144"
"\164\150\072\040\062\160\170\073\012\175\012\012\142\165\164\164"
"\157\156\072\150\157\166\145\162\040\173\012\040\040\040\040\160"
"\141\144\144\151\156\147\072\040\061\062\160\170\040\064\070\160"
"\170\073\012\040\040\040\040\142\141\143\153\147\162\157\165\156"
"\144\055\143\157\154\157\162\072\040\043\064\070\067\060\142\143"
"\073\012\175\012\012\142\165\164\164\157\156\040\052\072\150\157"
"\166\145\162\040\173\012\040\040\040\040\143\157\154\157\162\072"
"\040\167\150\151\164\145\073\012\175\012\012\142\165\164\164\157"
"\156\072\150\157\166\145\162\072\141\143\164\151\166\145\054\012"
"\142\165\164\164\157\156\072\141\143\164\151\166\145\040\173\012"
"\040\040\040\040\142\141\143\153\147\162\157\165\156\144\055\143"
"\157\154\157\162\072\040\043\071\071\063\064\060\061\073\012\175"
"\012\000\000\050\165\165\141\171\051\162\145\163\145\164\056\143"
"\163\163\000\000\000\000\000\000\160\001\000\000\000\000\000\000"
"\057\052\040\100\151\155\160\157\162\164\040\164\150\151\163\040"
"\143\157\154\157\162\163\150\145\145\164\040\164\157\040\147\145"
"\164\040\164\150\145\040\144\145\146\141\165\154\164\040\166\141"
"\154\165\145\163\040\146\157\162\040\145\166\145\162\171\040\160"
"\162\157\160\145\162\164\171\056\012\040\052\040\124\150\151\163"
"\040\151\163\040\165\163\145\146\165\154\040\167\150\145\156\040"
"\167\162\151\164\151\156\147\040\163\160\145\143\151\141\154\040"
"\103\123\123\040\164\145\163\164\163\040\164\150\141\164\040\163"
"\150\157\165\154\144\040\156\157\164\040\142\145\012\040\052\040"
"\151\156\154\165\145\156\143\145\144\040\142\171\040\164\150\145"
"\155\145\163\040\055\040\156\157\164\040\145\166\145\156\040\164"
"\150\145\040\144\145\146\141\165\154\164\040\157\156\145\163\056"
"\012\040\052\040\113\145\145\160\040\151\156\040\155\151\156\144"
"\040\164\150\141\164\040\164\150\145\040\157\165\164\160\165\164"
"\040\167\151\154\154\040\142\145\040\166\145\162\171\040\165\147"
"\154\171\040\141\156\144\040\156\157\164\040\154\157\157\153\040"
"\154\151\153\145\012\040\052\040\141\156\171\164\150\151\156\147"
"\040\107\124\113\056\012\040\052\040\101\154\163\157\054\040\167"
"\150\145\156\040\141\144\144\151\156\147\040\156\145\167\040\163"
"\164\171\154\145\040\160\162\157\160\145\162\164\151\145\163\054"
"\040\160\154\145\141\163\145\040\141\144\144\040\164\150\145\155"
"\040\150\145\162\145\056\012\040\052\057\012\012\052\040\173\012"
"\040\040\141\154\154\072\040\165\156\163\145\164\073\012\175\012"
"\000\000\050\165\165\141\171\051" };
#endif /* !_MSC_VER */
static GStaticResource static_resource = { gtk89_resource_data.data, sizeof (gtk89_resource_data.data) - 1 /* nul terminator */, NULL, NULL, NULL };
G_MODULE_EXPORT
GResource *gtk89_get_resource (void);
GResource *gtk89_get_resource (void)
{
return g_static_resource_get_resource (&static_resource);
}
/*
If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and
destructors, in a usable way, including e.g. on library unload. If not you're on
your own.
Some compilers need #pragma to handle this, which does not work with macros,
so the way you need to use this is (for constructors):
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
#endif
G_DEFINE_CONSTRUCTOR(my_constructor)
static void my_constructor(void) {
...
}
*/
#ifndef __GTK_DOC_IGNORE__
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
#define G_HAS_CONSTRUCTORS 1
#define G_DEFINE_CONSTRUCTOR(_func) static void __attribute__((constructor)) _func (void);
#define G_DEFINE_DESTRUCTOR(_func) static void __attribute__((destructor)) _func (void);
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
/* Visual studio 2008 and later has _Pragma */
#include <stdlib.h>
#define G_HAS_CONSTRUCTORS 1
/* We do some weird things to avoid the constructors being optimized
* away on VS2015 if WholeProgramOptimization is enabled. First we
* make a reference to the array from the wrapper to make sure its
* references. Then we use a pragma to make sure the wrapper function
* symbol is always included at the link stage. Also, the symbols
* need to be extern (but not dllexport), even though they are not
* really used from another object file.
*/
/* We need to account for differences between the mangling of symbols
* for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
* with an underscore but symbols on x64/ARM/ARM64 are not.
*/
#ifdef _M_IX86
#define G_MSVC_SYMBOL_PREFIX "_"
#else
#define G_MSVC_SYMBOL_PREFIX ""
#endif
#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
#define G_DEFINE_DESTRUCTOR(_func) G_MSVC_DTOR (_func, G_MSVC_SYMBOL_PREFIX)
#define G_MSVC_CTOR(_func,_sym_prefix) \
static void _func(void); \
extern int (* _array ## _func)(void); \
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
__pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
__pragma(section(".CRT$XCU",read)) \
__declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _wrapper;
#define G_MSVC_DTOR(_func,_sym_prefix) \
static void _func(void); \
extern int (* _array ## _func)(void); \
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
__pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
__pragma(section(".CRT$XCU",read)) \
__declspec(allocate(".CRT$XCU")) int (* _array ## _func)(void) = _func ## _constructor;
#elif defined (_MSC_VER)
#define G_HAS_CONSTRUCTORS 1
/* Pre Visual studio 2008 must use #pragma section */
#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
section(".CRT$XCU",read)
#define G_DEFINE_CONSTRUCTOR(_func) \
static void _func(void); \
static int _func ## _wrapper(void) { _func(); return 0; } \
__declspec(allocate(".CRT$XCU")) static int (*p)(void) = _func ## _wrapper;
#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
section(".CRT$XCU",read)
#define G_DEFINE_DESTRUCTOR(_func) \
static void _func(void); \
static int _func ## _constructor(void) { atexit (_func); return 0; } \
__declspec(allocate(".CRT$XCU")) static int (* _array ## _func)(void) = _func ## _constructor;
#elif defined(__SUNPRO_C)
/* This is not tested, but i believe it should work, based on:
* http://opensource.apple.com/source/OpenSSL098/OpenSSL098-35/src/fips/fips_premain.c
*/
#define G_HAS_CONSTRUCTORS 1
#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
init(_func)
#define G_DEFINE_CONSTRUCTOR(_func) \
static void _func(void);
#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
fini(_func)
#define G_DEFINE_DESTRUCTOR(_func) \
static void _func(void);
#else
/* constructors not supported for this compiler */
#endif
#endif /* __GTK_DOC_IGNORE__ */
#ifdef G_HAS_CONSTRUCTORS
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(resource_constructor)
#endif
G_DEFINE_CONSTRUCTOR(resource_constructor)
#ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(resource_destructor)
#endif
G_DEFINE_DESTRUCTOR(resource_destructor)
#else
#warning "Constructor not supported on this compiler, linking in resources will not work"
#endif
static void resource_constructor (void)
{
g_static_resource_init (&static_resource);
}
static void resource_destructor (void)
{
g_static_resource_fini (&static_resource);
}