Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SWT/Devel/Gtk"
m (→SWT GTK Development Articles) |
(→How to identify if your app runs on Wayland as backend) |
||
(13 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | = SWT GTK | + | = Getting started = |
+ | If you are new to or want to learn SWT-GTK development, please see the [[SWT/Devel/Gtk/Dev_guide | comprehensive SWT-GTK development guide]] | ||
− | = | + | = SWT-GTK development articles = |
* [[SWT/Devel/Gtk/Dev_guide | Comprehensive SWT development guide]] | * [[SWT/Devel/Gtk/Dev_guide | Comprehensive SWT development guide]] | ||
− | == GTK | + | == GTK compilation == |
* [[SWT/Devel/Gtk/Compiling_Gtk | Compiling various versions of GTK]] | * [[SWT/Devel/Gtk/Compiling_Gtk | Compiling various versions of GTK]] | ||
* [[SWT/Devel/Gtk/jhbuild | JHBuild : Compile newest GTK+ versions and it's dependencies with with jhbuild]] | * [[SWT/Devel/Gtk/jhbuild | JHBuild : Compile newest GTK+ versions and it's dependencies with with jhbuild]] | ||
Line 10: | Line 11: | ||
* [[SWT/Devel/Gtk/pkg-config_compiled_GTK | Using locally compiled GTK libraries with native GTK snippets]] | * [[SWT/Devel/Gtk/pkg-config_compiled_GTK | Using locally compiled GTK libraries with native GTK snippets]] | ||
− | == SWT JNI | + | == SWT JNI compilation and os_custom development== |
* [[SWT/Devel/Gtk/Sentinel_warning | Eliminating "sentinel" warnings on SWT JNI compilation]] | * [[SWT/Devel/Gtk/Sentinel_warning | Eliminating "sentinel" warnings on SWT JNI compilation]] | ||
− | * [[SWT/Devel/Gtk/os_custom | | + | * [[SWT/Devel/Gtk/os_custom | os_custom development (SwtFixed implementation)]] |
− | == CSS == | + | == GTK CSS == |
* [[SWT/Devel/Gtk/CSS_selector | Avoid "expected valid selector" warnings in console output]] | * [[SWT/Devel/Gtk/CSS_selector | Avoid "expected valid selector" warnings in console output]] | ||
− | |||
== Debugging == | == Debugging == | ||
* [[SWT/Devel/Gtk/crashstack | Getting more information from a jvm crash ]] | * [[SWT/Devel/Gtk/crashstack | Getting more information from a jvm crash ]] | ||
− | |||
− | |||
− | |||
== Accessibility == | == Accessibility == | ||
* [[SWT/Devel/Gtk/Atk | ATK Introduction]] | * [[SWT/Devel/Gtk/Atk | ATK Introduction]] | ||
− | == Equinox | + | == Equinox launcher == |
− | * For | + | * For GTK related Equinox launcher information, refer to the [[Equinox/dev/gtk | Equinox documentation]]. |
== Coding == | == Coding == | ||
Line 35: | Line 32: | ||
== Testing == | == Testing == | ||
* [[SWT/Devel/Gtk/JUnitTests | SWT JUnit tests]] | * [[SWT/Devel/Gtk/JUnitTests | SWT JUnit tests]] | ||
− | * [[SWT/Devel/Gtk/platformTests | Platform | + | * [[SWT/Devel/Gtk/platformTests | Platform UI/JFace tests for SWT developers]] |
− | == Uploading | + | == Uploading your patch == |
* [[SWT/Devel/Gtk/Patch_guidelines | Patch submission guidelines]] | * [[SWT/Devel/Gtk/Patch_guidelines | Patch submission guidelines]] | ||
Line 45: | Line 42: | ||
* [[SWT/Devel/Gtk/GtkPackageFedora | Determining what version of GTK shipped with Fedora]] | * [[SWT/Devel/Gtk/GtkPackageFedora | Determining what version of GTK shipped with Fedora]] | ||
* [https://developer.gnome.org/gtk3/stable/ch25s02.html GNOME documentation on changes from GTK2 to GTK3] | * [https://developer.gnome.org/gtk3/stable/ch25s02.html GNOME documentation on changes from GTK2 to GTK3] | ||
− | |||
* [[SWT/Devel/Gtk/Errors after repository reset | How to fix massive import errors after repository reset]] | * [[SWT/Devel/Gtk/Errors after repository reset | How to fix massive import errors after repository reset]] | ||
* [[SWT/Devel/Gtk/Missing so file errors | Fix "missing gtk-*.so" file errors when launching a child Eclipse]] | * [[SWT/Devel/Gtk/Missing so file errors | Fix "missing gtk-*.so" file errors when launching a child Eclipse]] | ||
− | |||
− | = See | + | = Wayland specific development articles = |
+ | Wayland [https://en.wikipedia.org/wiki/Wayland_(display_server_protocol) (wiki)] is a rendering engine, intended to be a replacement for X Window System [https://en.wikipedia.org/wiki/X_Window_System (wiki)]. | ||
+ | |||
+ | == Launching Wayland == | ||
+ | In Fedora 21+, you can run things on Wayland. There are several ways: | ||
+ | |||
+ | == Log into GNOME Wayland == | ||
+ | Log out and then on the logon screen, click on the gear icon and select "Gnome Wayland". [http://fedoramagazine.org/wp-content/uploads/2014/10/gdm-wayland.png See example screenshot]. As of 4.8 Eclipse is very usable on Wayland full time, barring a few smaller issues. | ||
+ | |||
+ | == Launch Gnome Wayland in other Virtual Console == | ||
+ | Alternatively, you can press Ctl+Alt+F3 etc.. to launch a [https://en.wikipedia.org/wiki/Virtual_Console virtual console]. | ||
+ | You login with your own user. Then run Gnome Wayland via: | ||
+ | |||
+ | gnome-session --session gnome-wayland | ||
+ | |||
+ | == Kill unresponsive Wayland session == | ||
+ | You may find sometimes that Wayland with GNOME becomes unresponsive. In this case, switch back to your original virtual terminal (using Ctlr + Alt + F[1,2,3,4...]). | ||
+ | |||
+ | Running the following command will give you the PID of the process that needs to be killed in order to end the GNOME Wayland session: | ||
+ | ps aux | grep <TTY_NUMBER> | grep "gnome-session --session gnome-wayland" | grep -v dbus | awk '{print $2}' # where <TTY_NUMBER> is the tty Wayland is running on (i.e. tty[1,2,3,4...]) | ||
+ | |||
+ | You can then kill it using: | ||
+ | sudo kill PID # where PID is the PID of process found from the step above | ||
+ | |||
+ | To make this a bit easier I have written a script that does this all in one step. | ||
+ | export PID="$(ps aux | grep $1 | grep "gnome-session --session gnome-wayland" | grep -v dbus | awk '{print $2}')" | ||
+ | kill $PID | ||
+ | |||
+ | Simply run the script using: | ||
+ | kill_gnome_wayland <TTY_NUMBER> # where <TTY_NUMBER> is the tty Wayland is running on (i.e. tty[1,2,3,4...]) | ||
+ | |||
+ | Note: to kill the process you may/may not need to use sudo. | ||
+ | |||
+ | == How to identify if your app runs on Wayland as backend == | ||
+ | Wayland has a notion of XWayland. This is so that you can run GTK2 apps on Wayland. | ||
+ | Since Wayland and X applications look almost the same, it's tricky to tell them apart. | ||
+ | |||
+ | There are several ways to tell. | ||
+ | * Launch Gtk Inspector. Under "General" tab, look under "GDK Backend". | ||
+ | * Launch looking glass "lg", top left click on "Windows" Tab, then click on one of the applications in the list, inspect 'Gtype'. E.g | ||
+ | Gtype:MetaWindowX11 # X11 | ||
+ | Gtype:MetaWindowWayland # Wayland | ||
+ | |||
+ | = Useful Eclipse wiki pages = | ||
These are pages mostly for special interest. | These are pages mostly for special interest. | ||
* Useful tools/shortcuts within Eclipse to make SWT development easier [[SWT/Devel/Gtk/Useful_Eclipse_shortcuts | Useful Eclipse Shortcuts ]] | * Useful tools/shortcuts within Eclipse to make SWT development easier [[SWT/Devel/Gtk/Useful_Eclipse_shortcuts | Useful Eclipse Shortcuts ]] | ||
− | = | + | = Further reading beyond this wiki = |
* SWT tagged posts on Leo's blog: [https://coffeeorientedprogramming.com/category/programming/swt/ CoffeeOrientedProgramming.com ] | * SWT tagged posts on Leo's blog: [https://coffeeorientedprogramming.com/category/programming/swt/ CoffeeOrientedProgramming.com ] | ||
− | + | * How to update Fedora Eclipse to from stable to rawhide [https://coffeeorientedprogramming.wordpress.com/2015/07/27/how-to-update-eclipse-to-bleeding-edge-rawhide/ Eclipse to Rawhide] | |
− | * How to update Eclipse to | + | |
* Introduction to bash scripting [http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html Bash for Beginners Guide] | * Introduction to bash scripting [http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html Bash for Beginners Guide] |
Latest revision as of 15:59, 22 August 2018
Contents
Getting started
If you are new to or want to learn SWT-GTK development, please see the comprehensive SWT-GTK development guide
SWT-GTK development articles
GTK compilation
- Compiling various versions of GTK
- JHBuild : Compile newest GTK+ versions and it's dependencies with with jhbuild
- Defining a version specific GTK macro to prevent compilation errors
- Using locally compiled GTK libraries with native GTK snippets
SWT JNI compilation and os_custom development
- Eliminating "sentinel" warnings on SWT JNI compilation
- os_custom development (SwtFixed implementation)
GTK CSS
Debugging
Accessibility
Equinox launcher
- For GTK related Equinox launcher information, refer to the Equinox documentation.
Coding
Testing
Uploading your patch
Miscellaneous
- Finding which version of GTK your Eclipse runs on
- Enabling icons in menus, buttons, and more in GNOME3
- Determining what version of GTK shipped with Fedora
- GNOME documentation on changes from GTK2 to GTK3
- How to fix massive import errors after repository reset
- Fix "missing gtk-*.so" file errors when launching a child Eclipse
Wayland specific development articles
Wayland (wiki) is a rendering engine, intended to be a replacement for X Window System (wiki).
Launching Wayland
In Fedora 21+, you can run things on Wayland. There are several ways:
Log into GNOME Wayland
Log out and then on the logon screen, click on the gear icon and select "Gnome Wayland". See example screenshot. As of 4.8 Eclipse is very usable on Wayland full time, barring a few smaller issues.
Launch Gnome Wayland in other Virtual Console
Alternatively, you can press Ctl+Alt+F3 etc.. to launch a virtual console. You login with your own user. Then run Gnome Wayland via:
gnome-session --session gnome-wayland
Kill unresponsive Wayland session
You may find sometimes that Wayland with GNOME becomes unresponsive. In this case, switch back to your original virtual terminal (using Ctlr + Alt + F[1,2,3,4...]).
Running the following command will give you the PID of the process that needs to be killed in order to end the GNOME Wayland session:
ps aux | grep <TTY_NUMBER> | grep "gnome-session --session gnome-wayland" | grep -v dbus | awk '{print $2}' # where <TTY_NUMBER> is the tty Wayland is running on (i.e. tty[1,2,3,4...])
You can then kill it using:
sudo kill PID # where PID is the PID of process found from the step above
To make this a bit easier I have written a script that does this all in one step.
export PID="$(ps aux | grep $1 | grep "gnome-session --session gnome-wayland" | grep -v dbus | awk '{print $2}')" kill $PID
Simply run the script using:
kill_gnome_wayland <TTY_NUMBER> # where <TTY_NUMBER> is the tty Wayland is running on (i.e. tty[1,2,3,4...])
Note: to kill the process you may/may not need to use sudo.
How to identify if your app runs on Wayland as backend
Wayland has a notion of XWayland. This is so that you can run GTK2 apps on Wayland. Since Wayland and X applications look almost the same, it's tricky to tell them apart.
There are several ways to tell.
- Launch Gtk Inspector. Under "General" tab, look under "GDK Backend".
- Launch looking glass "lg", top left click on "Windows" Tab, then click on one of the applications in the list, inspect 'Gtype'. E.g
Gtype:MetaWindowX11 # X11 Gtype:MetaWindowWayland # Wayland
Useful Eclipse wiki pages
These are pages mostly for special interest.
- Useful tools/shortcuts within Eclipse to make SWT development easier Useful Eclipse Shortcuts
Further reading beyond this wiki
- SWT tagged posts on Leo's blog: CoffeeOrientedProgramming.com
- How to update Fedora Eclipse to from stable to rawhide Eclipse to Rawhide
- Introduction to bash scripting Bash for Beginners Guide