summaryrefslogtreecommitdiff
path: root/demos
Commit message (Collapse)AuthorAgeFilesLines
* gtk-demo: Simplify transitions demoMatthias Clasen2020-09-281-12/+7
| | | | | We are not using the frame clock anymore, so don't pass it around.
* gtk-demo: Tweak the transition demo textMatthias Clasen2020-09-281-3/+7
| | | | Fix some types, and say a bit more here.
* gsk_gl_shader_format_args: Pass arguments by valueAlexander Larsson2020-09-282-2/+2
| | | | | | Primitive values are now passed by values (although vectors still by pointer). Also since we can now no longer handle missing definitions that is an error.
* gtk-demo: Only use one GskGLShader in fishbowlAlexander Larsson2020-09-282-6/+4
| | | | | | We don't want to use a new shader per paintable, because then we will need to recompile each one. Also remove some leftover unused vars from the cogs glsl.
* snapshot: Drop n_children from push_gl_shader and use custom popAlexander Larsson2020-09-283-12/+7
| | | | | | | | | | We now always assume you pass the right amount of children for the shader, and each such child is followed by gtk_snapshot_gl_shader_pop_texture() and then a final gtk_snapshot_pop(). This means we handle the 0 child case ok, and that we can validate that the number of pops of various types are correct.
* gtk-demo: Add a shader paintable to the fishbowlMatthias Clasen2020-09-251-0/+32
| | | | This gets around 500 instances at 60fps on my system.
* gtk-demo: Add a shader paintable demoMatthias Clasen2020-09-253-7/+266
| | | | | | | Add a shader paintable to the OpenGL transitions demo. This is reusing one of the shadertoy examples, tweaked slightly to work as a standalone fragment shader.
* gtk-demo: Add a shader paintableMatthias Clasen2020-09-255-0/+405
| | | | | | | | | This is a GdkPaintable implementation wrapped around a GskGLShader. It can optionally be hooked up to a frame clock to update a time uniform. The code is set up for this to live as public api in GSK, if we find it useful enough.
* snapshot: Drop the varargs versions of push_gl_shader()Alexander Larsson2020-09-252-11/+14
| | | | | We can now just use gsk_gl_shader_format_args() directly, relying on the transfer-full of the shader args argument.
* GskGLShader: Drop fallback node and add try_compile function to replace itAlexander Larsson2020-09-252-28/+58
| | | | | | | | This removes the fallback node from GskGLShaderNode and adds a new function gsk_gl_shader_try_compile_for() which tries to compile a shader against a renderer. Then you can use the return value of this both as a way to implement the fallback, and as a way to get at the error report in a saner way.
* Rename gl shader snapshot apisMatthias Clasen2020-09-232-12/+11
| | | | | | | | Rename gtk_snapshot_push_glshader and friends to gtk_snapshot_push_gl_shader, following the similar renaming in GSK. Update all callers.
* shadertoy demo: Fix GLSL on GLESAlexander Larsson2020-09-231-2/+4
| | | | I was getting "assignment to varying fragColor" errors
* gtk-demo: Add GskGLShaderNode demoAlexander Larsson2020-09-2312-0/+1127
| | | | | | | | | | | Add adds a demo showing off GskGLShaderNode in various ways. It has a transistion widget, using some examples from gl-transitions.com, with child widgets being both images, a GL area and real widgets (that let you edit the transition shaders themselves. It also has a fancy fire effect on hove on the buttons.
* gtk-demo: Improve the pickers demoMatthias Clasen2020-09-211-5/+75
| | | | | | "Two of every kind..." Add some customized pickers here. This found a number of issues that have been fixed in the preceding commits.
* textbuffer: Redo insert markup a little bitMatthias Clasen2020-09-191-61/+176
| | | | | | | | | Redo the tag insertion function to avoid quadratic behavior, and at the same time, fix handling of alpha for color attributes. Update the copy of this function in gtk4-demo as well.
* gtk-demo: Cosmetic changesMatthias Clasen2020-09-173-12/+24
| | | | Polish the text view demos a little bit.
* gtk-demo: Fix toggle- vs checkbutton confusionMatthias Clasen2020-09-161-2/+2
|
* gtk-demo: Beef up the hypertext demoMatthias Clasen2020-09-161-22/+117
| | | | Its almost a dictionary.
* Merge branch 'wip/sadiq/headerbar-demo' into 'master'Matthias Clasen2020-09-161-0/+1
|\ | | | | | | | | gtk-demo: Add a switch to headerbar demo See merge request GNOME/gtk!2571
| * gtk-demo: Add a switch to headerbar demoMohammed Sadiq2020-09-141-0/+1
| | | | | | | | We don't have any demos with a switch in headerbar.
* | gtk-demo: Add another demoMatthias Clasen2020-09-156-1/+337
| | | | | | | | | | Show how to add a context menu to a custom widget, and how to make a GtkPicture lookalike.
* | Merge branch 'master.win32' into 'master'Matthias Clasen2020-09-151-2/+2
|\ \ | | | | | | | | | | | | | | | | | | Some more fixes for Windows Closes #3157 See merge request GNOME/gtk!2580
| * | demos: Fix minesweeper demos on WindowsChun-wei Fan2020-09-151-2/+2
| | | | | | | | | | | | | | | | | | Make sure the callback functions in the .ui files are exported, so that those functions can be recognized at runtime so that things run properly.
* | | Merge branch 'matthiasc/for-master' into 'master'Matthias Clasen2020-09-155-19/+59
|\ \ \ | | | | | | | | | | | | | | | | Matthiasc/for master See merge request GNOME/gtk!2582
| * | | gtk-demo: Add more detail to the dnd demo textMatthias Clasen2020-09-141-0/+4
| | | |
| * | | gtk-demo: Add some keywordsMatthias Clasen2020-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | Make the builder demo show up in searches for toolbar and menubar.
| * | | gtk-demo: Improve the builder demoMatthias Clasen2020-09-142-10/+42
| | | | | | | | | | | | | | | | Make the keyboard shortcuts work.
| * | | gtk-demo: Improve the builder demoMatthias Clasen2020-09-141-0/+3
| | | | | | | | | | | | | | | | Make the toolbar look right.
| * | | gtk-demo: More spaceMatthias Clasen2020-09-141-2/+3
| | | | | | | | | | | | | | | | | | | | Increase the inter-paragraph spacing in the info text, to make paragraphs more clearly separated.
| * | | gtk-demo: Cosmetic changeMatthias Clasen2020-09-141-6/+4
| | | |
| * | | gtk-demo: Add some detailsMatthias Clasen2020-09-141-1/+2
| |/ /
* | | sizegroup demo: Fix a checkbutton/togglebutton mixupTimm Bäder2020-09-151-3/+3
|/ /
* | widget-factory: Fix the toggle buttons on page 3Matthias Clasen2020-09-141-1/+0
| | | | | | | | They should not both be active initially.
* | icon-browser: use content-viewJakub Steiner2020-09-141-0/+3
|/ | | | - make content prominent by using content-view style for the main grid.
* gtk-demo: Improve the scrolling demoMatthias Clasen2020-09-132-0/+38
| | | | Add an fps label to the scrolling demo.
* gtk-demo: Impove the fishbowl demoMatthias Clasen2020-09-131-0/+3
| | | | Use tnum for the fps label to avoid jiggling.
* gtk-demo: Use gdk_frame_clock_get_fpsMatthias Clasen2020-09-132-72/+6
| | | | | Remove another copy of this code in the theme switching benchmark.
* gtk-demo: Don't offer to run titlesMatthias Clasen2020-09-131-7/+9
| | | | | | When a group is selected (such as 'Benchmark'), make the run button insensitive - there is nothing to run.
* Demo thyselfMatthias Clasen2020-09-132-1/+31
| | | | Make gtk-demo show itself as a useful example.
* gtk-demo: Add keywords to demosMatthias Clasen2020-09-1346-21/+55
| | | | | | | | | Add the names of the main widgets as keywords to our demos, but also things like "game". This helps finding relevant demos in our growing list. You can now for example type "label", and find the "error states" and "links" demos showing GtkLabel features.
* gtk-demo: Support keywords for searchMatthias Clasen2020-09-132-17/+66
| | | | | | | | Filter the sidebar on keywords that can be provided by the demos. We extract keywords from the doc comment at the top of each demo source by looking for words that look like class names. We also allow to specify keywords explicitly.
* gtk-demo: Ignore some lines in infoMatthias Clasen2020-09-131-0/+3
| | | | | | Ignore lines starting with # in the info comment at the top of source files. This will be used to add keywords for search in following commits.
* gtk-demo: Add another demoMatthias Clasen2020-09-134-0/+287
| | | | | | This one is a more or less direct copy of the settings dialog from widget-factory, demonstrating error states and builder scopes.
* gtk-demo: Make F11 toggle fullscreenMatthias Clasen2020-09-131-0/+28
| | | | | | | In the video player demo, we have a button to make the window fullscreen, but no easy way back. Add the usual F11 keybinding, to make things at least somewhat recoverable.
* gtk-demo: Add some example videosMatthias Clasen2020-09-133-4/+46
| | | | | Add buttons to show the gtk-logo animation and the Big Buck Bunny trailer.
* widget-factory: Fix error states demoMatthias Clasen2020-09-131-0/+1
| | | | | Fix a corner case of input validation in the settings dialog.
* gtk-demo: Don't refer to removed demosMatthias Clasen2020-09-131-1/+2
| | | | | | The animated background demos was referring to the pixbuf demo that was removed a while ago. Reword the text accordingly.
* gtk-demo: Add an emblem demoMatthias Clasen2020-09-113-0/+188
| | | | | Add a simple demo for adding emblems to icons using GdkPaintable.
* gtk-demo: Tweak the animated paintableMatthias Clasen2020-09-116-14/+28
| | | | | | | | Make it possible to have no background in the animated paintable. This will be used in a future demo. Update all users.
* gtk-demo: Fix a few crashMatthias Clasen2020-09-112-0/+2
| | | | | The paintable demos were forgetting to clear their window variable.