Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple viewports on Wayland platform #675

Merged
merged 3 commits into from
Nov 27, 2023

Commits on Nov 27, 2023

  1. wl: Shell handles many viewports

    Add new functions in the CogShell API for handling multiple Viewports:
    
    * GPtrArray   *cog_shell_get_viewports(CogShell *shell);
    * void         cog_shell_add_viewport(CogShell *shell, CogViewport *viewport);
    * void         cog_shell_remove_viewport(CogShell *shell, CogViewport *viewport);
    * gsize        cog_shell_get_n_viewports(CogShell *shell);
    * CogViewport *cog_shell_get_nth_viewport(CogShell *shell, gsize index);
    
    Also added the CogShell::create-viewport signal. This signal is
    emitted when the shell creates a new CogViewport. With handling this
    signal is possible to customize the required actions to be done during
    the creation of a new viewport.
    
    This change modifies the 'cog_shell_get_viewport()'. Now it creates a
    default viewport in order to keep the current behavior. The creation
    of the default viewport is lazy and it is delayed until the invocation
    of the 'cog_shell_get_viewport()'.
    psaavedra committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    3dab0b8 View commit details
    Browse the repository at this point in the history
  2. wl: Ensure destroying the previous popup

    ... and reset the reference in the Platform if the destroyed popup
    is the same.
    psaavedra committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    6568884 View commit details
    Browse the repository at this point in the history
  3. examples: Add multiple viewports example program

    Add a new multiple viewports example program which shows how to attach
    2 viewports to the CogShell. Each viewport iterates over a couple
    of views.
    psaavedra committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    4b04bd6 View commit details
    Browse the repository at this point in the history