forked from AuroraMiddleware/gtk
GTK is a multi-platform toolkit for creating graphical user interfaces.
496f0892fc
gtk_accel_group_query gtk_accel_group_from_accel_closure gtk_accel_label_get_accel_widget gtk_accessible_get_widget gtk_actionable_get_action_name gtk_app_chooser_get_app_info gtk_app_chooser_button_get_heading gtk_app_chooser_dialog_get_heading gtk_application_get_window_by_id gtk_assistant_get_nth_page gtk_binding_set_find gtk_builder_get_object gtk_builder_lookup_callback_symbol gtk_builder_get_application gtk_button_get_image gtk_cell_area_get_focus_from_sibling gtk_cell_renderer_start_editing gtk_cell_view_get_model gtk_cell_view_get_displayed_row gtk_clipboard_get_owner gtk_container_get_focus_child gtk_container_get_focus_vadjustment gtk_container_get_focus_hadjustment gtk_dialog_get_widget_for_response gtk_drag_get_source_widget gtk_drag_dest_get_target_list gtk_drag_source_get_target_list gtk_entry_completion_get_model gtk_entry_completion_compute_prefix gtk_expander_get_label_widget gtk_file_chooser_get_filename gtk_file_chooser_get_current_folder gtk_file_chooser_get_uri gtk_file_chooser_get_current_folder_uri gtk_file_chooser_get_preview_widget gtk_file_chooser_get_preview_file gtk_file_chooser_get_preview_filename gtk_file_chooser_get_preview_uri gtk_file_chooser_get_extra_widget gtk_file_chooser_get_filter gtk_file_chooser_native_get_accept_label gtk_file_chooser_native_get_cancel_label gtk_file_filter_get_name gtk_font_chooser_get_font_family gtk_font_chooser_get_font_face gtk_font_chooser_get_font gtk_font_chooser_get_font_desc gtk_font_chooser_get_font_map gtk_frame_get_label gtk_gesture_get_device gtk_gesture_get_window gtk_gl_area_get_error gtk_header_bar_get_title gtk_header_bar_get_subtitle gtk_header_bar_get_custom_title gtk_icon_info_get_filename gtk_icon_view_get_path_at_pos gtk_icon_view_get_model gtk_image_get_pixbuf gtk_image_get_animation gtk_label_get_mnemonic_widget gtk_label_get_attributes gtk_check_version gtk_menu_button_get_popup gtk_menu_button_get_menu_model gtk_menu_button_get_align_widget gtk_menu_button_get_popover gtk_menu_item_get_submenu gtk_menu_item_get_accel_path gtk_native_dialog_get_title gtk_native_dialog_get_transient_for gtk_notebook_get_nth_page gtk_notebook_get_tab_label_text gtk_notebook_get_menu_label gtk_notebook_get_menu_label_text gtk_notebook_get_group_name gtk_notebook_get_action_widget gtk_offscreen_window_get_surface gtk_offscreen_window_get_pixbuf gtk_paned_get_child1 gtk_paned_get_child2 gtk_places_sidebar_get_location gtk_places_sidebar_get_nth_bookmark gtk_plug_get_socket_window gtk_popover_get_default_widget gtk_progress_bar_get_text gtk_recent_filter_get_name gtk_recent_manager_lookup_item gtk_settings_get_default gtk_socket_get_plug_window gtk_stack_sidebar_get_stack gtk_stack_switcher_get_stack gtk_style_context_get_section gtk_style_context_get_parent gtk_style_context_get_frame_clock gtk_test_find_widget gtk_text_buffer_get_mark gtk_text_tag_table_lookup gtk_text_view_get_tabs gtk_text_view_toggle_cursor_visible gtk_text_view_get_window gtk_toolbar_get_nth_item gtk_tool_button_get_label gtk_tool_button_get_icon_name gtk_tool_button_get_label_widget gtk_tool_button_get_icon_widget gtk_tool_palette_get_drop_item gtk_tool_palette_get_drop_group gtk_tree_model_filter_convert_child_path_to_path gtk_tree_model_filter_convert_path_to_child_path gtk_tree_model_sort_convert_child_path_to_path gtk_tree_model_sort_convert_path_to_child_path gtk_tree_view_get_column gtk_tree_view_get_bin_window gtk_tree_view_column_get_widget gtk_tree_view_column_get_tree_view gtk_widget_get_frame_clock gtk_window_group_get_current_device_grab GtkTextBufferSerializeFunc |
||
---|---|---|
build | ||
demos | ||
docs | ||
examples | ||
gdk | ||
gtk | ||
libgail-util | ||
m4 | ||
m4macros | ||
modules | ||
po | ||
po-properties | ||
tests | ||
testsuite | ||
acinclude.m4 | ||
AUTHORS | ||
autogen.sh | ||
config.h.win32.in | ||
configure.ac | ||
COPYING | ||
gail-3.0.pc.in | ||
gdk-3.0.pc.in | ||
git.mk | ||
gtk-zip.sh.in | ||
gtk+-3.0.pc.in | ||
gtk+-unix-print-3.0.pc.in | ||
gtk+.doap | ||
HACKING | ||
INSTALL.in | ||
MAINTAINERS | ||
make-pot | ||
Makefile.am | ||
Makefile.decl | ||
makefile.msc | ||
NEWS | ||
NEWS.pre-1-0 | ||
README.commits | ||
README.in | ||
README.win32 | ||
sanitize-la.sh |
The Win32 backend in GTK+ is not as stable or correct as the X11 one. For prebuilt runtime and developer packages see http://ftp.gnome.org/pub/gnome/binaries/win32/ Building GTK+ on Win32 ====================== First you obviously need developer packages for the compile-time dependencies: GDK-Pixbuf, Pango, atk, glib, gettext-runtime, libiconv at least. See http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies . For people compiling GTK+ with Visual C++ 2005 or later, it is recommended that the same compiler is used for at least GDK-Pixbuf, Pango, atk and glib so that crashes and errors caused by different CRTs can be avoided. The VS 2008 project files and/or VS Makefiles are either already available or will be available in the next stable release. Unfortunately compiling with Microsoft's compilers versions 2003 or earlier is not supported as compiling the latest stable GLib (which *is* required for building this GTK+ release) requires features from newer compilers and/or Platform SDKs After installing the dependencies, there are two ways to build GTK+ for win32. 1) GNU tools, ./configure && make install ----------------------------------------- This requires you have mingw and MSYS. Use the configure script, and the resulting Makefiles (which use libtool and gcc to do the compilation). I use this myself, but it can be hard to setup correctly. The full script I run to build GTK+ 2.16 unpacked from a source distribution is as below. This is from bulding GTK+ 2.16.5. I don't use any script like this to build the development branch, as I don't distribute any binaries from development branches. # This is a shell script that calls functions and scripts from # tml@iki.fi's personal work envíronment. It is not expected to be # usable unmodified by others, and is included only for reference. MOD=gtk+ VER=2.16.5 REV=1 ARCH=win32 THIS=${MOD}_${VER}-${REV}_${ARCH} RUNZIP=${MOD}_${VER}-${REV}_${ARCH}.zip DEVZIP=${MOD}-dev_${VER}-${REV}_${ARCH}.zip HEX=`echo $THIS | md5sum | cut -d' ' -f1` TARGET=c:/devel/target/$HEX usedev usemsvs6 ( set -x DEPS=`latest --arch=${ARCH} glib atk cairo pango libpng zlib libtiff jpeg` PROXY_LIBINTL=`latest --arch=${ARCH} proxy-libintl` PKG_CONFIG_PATH= for D in $DEPS; do PATH=/devel/dist/${ARCH}/$D/bin:$PATH [ -d /devel/dist/${ARCH}/$D/lib/pkgconfig ] && PKG_CONFIG_PATH=/devel/dist/${ARCH}/$D/lib/pkgconfig:$PKG_CONFIG_PATH done LIBPNG=`latest --arch=${ARCH} libpng` ZLIB=`latest --arch=${ARCH} zlib` LIBTIFF=`latest --arch=${ARCH} libtiff` JPEG=`latest --arch=${ARCH} jpeg` patch -p0 <<'EOF' EOF lt_cv_deplibs_check_method='pass_all' \ CC='gcc -mtune=pentium3 -mthreads' \ CPPFLAGS="-I/devel/dist/${ARCH}/${LIBPNG}/include \ -I/devel/dist/${ARCH}/${ZLIB}/include \ -I/devel/dist/${ARCH}/${LIBTIFF}/include \ -I/devel/dist/${ARCH}/${JPEG}/include \ -I/devel/dist/${ARCH}/${PROXY_LIBINTL}/include" \ LDFLAGS="-L/devel/dist/${ARCH}/${LIBPNG}/lib \ -L/devel/dist/${ARCH}/${ZLIB}/lib \ -L/devel/dist/${ARCH}/${LIBTIFF}/lib \ -L/devel/dist/${ARCH}/${JPEG}/lib \ -L/devel/dist/${ARCH}/${PROXY_LIBINTL}/lib -Wl,--exclude-libs=libintl.a \ -Wl,--enable-auto-image-base" \ LIBS=-lintl \ CFLAGS=-O2 \ ./configure \ --enable-win32-backend \ --disable-gdiplus \ --with-included-immodules \ --without-libjasper \ --enable-debug=yes \ --enable-explicit-deps=no \ --disable-gtk-doc \ --disable-static \ --prefix=$TARGET && libtoolcacheize && rm gtk/gtk.def && (PATH="$PWD/gdk-pixbuf/.libs:/devel/target/$HEX/bin:$PATH" make -j3 install || (rm .libtool-cache* && PATH="/devel/target/$HEX/bin:$PATH" make -j3 install)) && PATH="/devel/target/$HEX/bin:$PATH" gdk-pixbuf-query-loaders >/devel/target/$HEX/etc/gtk-2.0/gdk-pixbuf.loaders && grep -v -E 'Automatically generated|Created by|LoaderDir =' <$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders >$TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp && mv $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders.temp $TARGET/etc/gtk-2.0/gdk-pixbuf.loaders && grep -v -E 'Automatically generated|Created by|ModulesPath =' <$TARGET/etc/gtk-2.0/gtk.immodules >$TARGET/etc/gtk-2.0/gtk.immodules.temp && mv $TARGET/etc/gtk-2.0/gtk.immodules.temp $TARGET/etc/gtk-2.0/gtk.immodules && ./gtk-zip.sh && mv /tmp/${MOD}-${VER}.zip /tmp/$RUNZIP && mv /tmp/${MOD}-dev-${VER}.zip /tmp/$DEVZIP ) 2>&1 | tee /devel/src/tml/packaging/$THIS.log (cd /devel && zip /tmp/$DEVZIP src/tml/packaging/$THIS.{sh,log}) && manifestify /tmp/$RUNZIP /tmp/$DEVZIP You should not just copy the above blindly. There are some things in the script that are very specific to *my* build setup on *my* current machine. For instance the "latest" command, the "usedev" and "usemsvs6" shell functions, the /devel/dist folder. The above script is really just meant for reference, to give an idea. You really need to understand what things like PKG_CONFIG_PATH are and set them up properly after installing the dependencies before building GTK+. As you see above, after running configure, one can just say "make install", like on Unix. A post-build fix is needed, running gdk-pixbuf-query-loaders once more to get a correct gdk-pixbuf.loaders file. For a 64-bit build you need to remove the gtk/gtk.def file and let it be regenerated by the makefilery. This is because the 64-bit GTK dll has a slightly different list of exported function names. This is on purpose and not a bug. The API is the same at the source level, and the same #defines of some function names to actually have a _utf8 suffix is used (just to keep the header simpler). But the corresponding non-suffixed function to maintain ABI stability are not needed in the 64-bit case (because there are no older EXEs around that would require such for ABI stability). 2) Microsoft's tools -------------------- Use the Microsoft compiler, cl and Make, nmake. Say nmake -f makefile.msc in gdk and gtk. Be prepared to manually edit various makefile.msc files, and the makefile snippets in build/win32. There are also VS 2008/2010 solution and project files to build GTK+, which are maintained by Chun-wei Fan. They should build GTK+ out of the box, provided that the afore-mentioned dependencies are installed. They will build GDK with the Win32 backend, GTK+ itself (with GAIL/a11y built in), the GAIL-Util library and the gtk-demo program. Please refer to the following GNOME Live! page for a more detailed ouline on the process of building the GTK+ stack and its dependencies with Visual C++: https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack Alternative 1 also generates Microsoft import libraries (.lib), if you have lib.exe available. It might also work for cross-compilation from Unix. I (Tor) use method 1 myself. Hans Breuer has been taking care of the MSVC makefiles. At times, we disagree a bit about various issues, and for instance the makefile.msc files might not produce identically named DLLs and import libraries as the "autoconfiscated" makefiles and libtool do. If this bothers you, you will have to fix the makefiles. Using GTK+ on Win32 =================== To use GTK+ on Win32, you also need either one of the above mentioned compilers. Other compilers might work, but don't count on it. Look for prebuilt developer packages (DLLs, import libraries, headers) on the above website. Multi-threaded use of GTK+ on Win32 =================================== Multi-threaded GTK+ programs might work on Windows in special simple cases, but not in general. Sorry. If you have all GTK+ and GDK calls in the same thread, it might work. Otherwise, probably not at all. Possible ways to fix this are being investigated. Wintab ====== The tablet support uses the Wintab API. The Wintab development kit is no longer required. The wintab.h header file is bundled with GTK+ sources. Unfortunately it seems that only Wacom tablets come with support for the Wintab API nowadays. --Tor Lillqvist <tml@iki.fi>, <tml@novell.com> --Updated by Fan, Chun-wei <fanc999@yahoo.com.tw>