summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Add a README to examples/helloMatthias Clasen2023-05-131-0/+7
| | | | | Just so nobody wonders why there's a meson.build in this subdirectory.
* examples: Update for deprecationsMatthias Clasen2023-04-021-4/+3
| | | | Stop using gdk_surface_create_similar_surface here.
* Fix compile_resources present source directoryWilliam Roy2023-03-079-9/+9
| | | | | | | | | In certain scenarios, address the issue where gnome.compile_resources fails to transmit the present source directory. This is most notably visible with MSBuild.
* Fix a deprecation warningMatthias Clasen2023-02-021-1/+1
|
* examples: Stop using gtk_widget_show/hideMatthias Clasen2022-12-1310-13/+12
|
* Deprecate GtkDialogMatthias Clasen2022-10-291-0/+2
| | | | | GtkDialog is too flexible in terms of UI (headerbars vs action bar, etc), and has archaic APIs. It is time to retire it.
* examples: Port to async dialog APIMatthias Clasen2022-10-291-12/+4
|
* bloatpad: Stop using a comboboxMatthias Clasen2022-10-211-10/+11
| | | | Replace GtkComboBoxText with GtkDropDown+GtkStringList.
* demos and examples: Ignore deprecationsMatthias Clasen2022-10-111-0/+2
| | | | | | For now, just ignore deprecations. Eventually, we will have to go through, drop demos that are for wholly deprecated widgets, and update others.
* examples: Use textures over pixbufsBenjamin Otte2021-09-171-2/+2
|
* Add a simple Javascript exampleMatthias Clasen2021-07-051-0/+50
| | | | | | | This shows how to use a layout manager in a widget, implemented in javascript. The example sets up the environment for running from the toplevel dir, assuming that the build dir is called 'build'.
* CosmeticsMatthias Clasen2021-07-031-1/+1
| | | | | | Amend LD_PRELOAD instead of replacing it, so you can just point it at the right libgtk-4.so while running squares.py from elsewhere.
* Add a simple python exampleMatthias Clasen2021-07-021-0/+61
| | | | | | | This shows how to do custom drawing in a widget, implemented in python. The example sets up the environment for running from the toplevel dir, assuming that the build dir is called 'build'.
* Update hello-world.cMatthias Clasen2021-06-291-5/+5
| | | | | Simplify the code a bit and make the window match the existing screenshot.
* bloatpad: Add icons as resourcesMatthias Clasen2021-06-166-0/+5
| | | | | This can serve as a useful example for how to add themed icons as resources.
* bloatpad: Give the toolbar a faceliftMatthias Clasen2021-06-161-10/+18
| | | | Make it look more like a toolbar.
* bloatpad: Improve accel dialogMatthias Clasen2021-06-161-4/+37
| | | | Make this dialog a bit less of an eyesore.
* examples: Use existing iconsMatthias Clasen2021-06-161-2/+2
| | | | The sunny icon doesn't exist anymore.
* examples: Drop a redundant frameMatthias Clasen2021-06-161-5/+1
| | | | | The frame in the drawing example adds nothing and looks wrong.
* Make a standalone hello worldMatthias Clasen2021-06-083-1/+10
| | | | | We want to test building against the installed GTK in ci, so lets add a standalone project.
* bloatpad: Bring back the menubarMatthias Clasen2021-06-051-5/+6
| | | | This was lost at some point.
* Remove a forgotten fileMatthias Clasen2021-01-311-293/+0
| | | | | The example series only has 9 steps now. Remove remnants of step 10.
* examples: Remove requires from ui filesMatthias Clasen2020-11-101-1/+0
| | | | | No need to check requires for things that are shipped with GTK.
* Use GtkApplication in the examplesEmmanuele Bassi2020-10-211-26/+26
| | | | | | | | Some people read the "Getting Started" section as a series of incremental lessons, and having the examples go from GtkApplication to the old style "init / spin the main loop" confuses them. We should be using GtkApplication everywhere in our examples.
* Clean up uses of gtk_toggle_button_get/set_activeMatthias Clasen2020-08-301-2/+2
| | | | | Replace all uses on check buttons by the corresponding check button api.
* examples: Fix multiple small problemsMatthias Clasen2020-08-136-6/+17
| | | | | | | Add a paragraph about running the example apps uninstalled in the README, and verify that the standalone Makefiles actually work. Hint: some didn't.
* grid layout: Rename some propertiesMatthias Clasen2020-08-025-38/+38
| | | | | | | Rename GtkGridLayoutChild:left-attach/top-attach to GtkGridLayoutChild:column/row. Update all users. Fixes: #2967
* Replace "gdouble" with "double"Benjamin Otte2020-07-251-2/+2
|
* Replace "gchar" with "char"Benjamin Otte2020-07-2522-76/+76
|
* Replace "gint" with "int"Benjamin Otte2020-07-2513-22/+22
|
* headerbar: Show title buttons by defaultAlexander Mikhaylenko2020-07-028-8/+0
| | | | | Most of the time show-title-buttons is set to TRUE. Go ahead and make that the default.
* scrolledwindow: Don't take adjustments in new()Matthias Clasen2020-06-2411-11/+11
| | | | | | | In 99.9% of all cases, these are just NULL, NULL. So just do away with these arguments, people can use the setters for the rare cases where they want the scrolled window to use a different adjustment.
* examples: Stop using appmenu apisMatthias Clasen2020-05-222-38/+43
| | | | The appmenu-related GtkApplication apis are going away.
* bloatpad: Pass common_cflags to the buildTimm Bäder2020-05-192-1/+2
|
* bloatpad: Avoid a few theoretical compiler warningsTimm Bäder2020-05-181-7/+6
|
* examples: Add common_cflags to executablesTimm Bäder2020-05-189-9/+18
|
* Replace most remaining uses of container apiMatthias Clasen2020-05-116-23/+312
| | | | These are all on GtkBox or enumerating children.
* Use gtk_window_destroyMatthias Clasen2020-05-116-7/+7
| | | | | Replace calls to gtk_widget_destroy on windows with gtk_window_destroy.
* Refresh the tutorial examplesMatthias Clasen2020-05-1161-1035/+263
| | | | | | | | | Redo this series of examples from 2013, and adapt it to modern way of doing things. The biggest differences are that we use a headerbar right from the start, and don't mention the app menu. Fixes: #2730
* examples: Use GtkDrawingArea::resizeMatthias Clasen2020-05-061-6/+5
| | | | | This signal is a replacement for this (ab)use of the ::size-allocate signal, which is going away.
* Use gtk_overlay_set_child throughoutMatthias Clasen2020-05-041-1/+1
| | | | | Replace all uses of gtk_container_add on overlays by gtk_overlay_set_child.
* Use gtk_search_bar_set_child throughoutMatthias Clasen2020-05-041-1/+1
|
* Use gtk_window_set_child throughoutMatthias Clasen2020-05-048-8/+8
| | | | | Replace all uses of gtk_container_add on windows by gtk_window_set_child.
* Use gtk_scrolled_window_set_child throughoutMatthias Clasen2020-05-0411-20/+20
| | | | | Replace all uses of gtk_container_add on popovers by gtk_scrolled_window_set_child.
* Use gtk_frame_set_child throughoutMatthias Clasen2020-05-041-1/+1
| | | | | Replace all uses of gtk_container_add for frames with gtk_frame_set_child.
* headerbar: Remove user-settable titleAlexander Mikhaylenko2020-05-011-2/+0
| | | | | | | | Use window title, or custom title widget if it's set. Remove 'title' property. Update demos and tests to set the title on the window instead of headerbar.
* frame: Drop shadow-typeMatthias Clasen2020-04-171-1/+0
| | | | | Frames that don't draw frames are not very useful, so just drop the shadow-type property.
* Replace most uses of <Primary> with <Control>Matthias Clasen2020-04-061-8/+8
| | | | | | The only place where we are still using <Primary> is in tests, to ensure we keep parsing it. Otherwise, <Control> is now the preferred syntax.
* examples: Add common_cflags to buildTimm Bäder2020-03-063-5/+7
| | | | | | And fix all the warnings and errors generated by doing so. See #2491
* Drop the margin propertyMatthias Clasen2020-02-255-5/+20
| | | | Replace it with margin-start, -end, -top, -bottom throughout.