VirtualBox

Changeset 106771 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Oct 29, 2024 1:38:58 PM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165660
Message:

Additions: Linux/Wayland: More naming separation between clipboard and dnd callbacks, bugref:10796.

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-dcp.cpp

    r106765 r106771  
    181181static vbox_wl_dcp_ctx_t g_DcpCtx;
    182182
    183 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_hg_clip_report_join2_cb(vbcl_wl_session_type_t enmSessionType, void *pvUser);
    184 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_hg_clip_report_join3_cb(vbcl_wl_session_type_t enmSessionType, void *pvUser);
     183static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_hg_report_join2_cb(vbcl_wl_session_type_t enmSessionType, void *pvUser);
     184static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_hg_report_join3_cb(vbcl_wl_session_type_t enmSessionType, void *pvUser);
    185185
    186186
     
    10201020
    10211021    rc = vbcl_wayland_session_join(&pCtx->Session.Base,
    1022                                    &vbcl_wayland_hlp_dcp_hg_clip_report_join3_cb,
     1022                                   &vbcl_wayland_hlp_dcp_clip_hg_report_join3_cb,
    10231023                                   &priv);
    10241024
     
    12141214                {
    12151215                    rc = vbcl_wayland_session_join(&pCtx->Session.Base,
    1216                                                    &vbcl_wayland_hlp_dcp_hg_clip_report_join2_cb,
     1216                                                   &vbcl_wayland_hlp_dcp_clip_hg_report_join2_cb,
    12171217                                                   NULL);
    12181218                }
     
    12701270 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnInit}
    12711271 */
    1272 RTDECL(int) vbcl_wayland_hlp_dcp_init(void)
     1272RTDECL(int) vbcl_wayland_hlp_dcp_clip_init(void)
    12731273{
    12741274    vbcl_wayland_hlp_dcp_reset_ctx(&g_DcpCtx, false /* fShutdown */);
     
    12811281 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnTerm}
    12821282 */
    1283 RTDECL(int) vbcl_wayland_hlp_dcp_term(void)
     1283RTDECL(int) vbcl_wayland_hlp_dcp_clip_term(void)
    12841284{
    12851285    int rc;
     
    13031303 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnSetClipboardCtx}
    13041304 */
    1305 static DECLCALLBACK(void) vbcl_wayland_hlp_dcp_set_clipboard_ctx(PVBGLR3SHCLCMDCTX pCtx)
     1305static DECLCALLBACK(void) vbcl_wayland_hlp_dcp_clip_set_ctx(PVBGLR3SHCLCMDCTX pCtx)
    13061306{
    13071307    g_DcpCtx.pClipboardCtx = pCtx;
     
    13111311 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnPopup}
    13121312 */
    1313 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_popup(void)
     1313static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_popup(void)
    13141314{
    13151315    return VINF_SUCCESS;
     
    13341334 * @param   pvUser              User data (Wayland I/O context).
    13351335 */
    1336 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_hg_clip_report_join3_cb(
     1336static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_hg_report_join3_cb(
    13371337    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    13381338{
     
    14161416 * other Wayland clients (this is needed in order to avoid feedback
    14171417 * loop from our own advertisements), (2) waits for the list of clipboard
    1418  * formats available on the host side (set by vbcl_wayland_hlp_dcp_hg_clip_report_join_cb),
     1418 * formats available on the host side (set by vbcl_wayland_hlp_dcp_clip_hg_report_join_cb),
    14191419 * and (3) sends data offers for available host clipboard to other clients.
    14201420 *
     
    14241424 * @param   pvUser              User data (unused).
    14251425 */
    1426 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_hg_clip_report_join2_cb(
     1426static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_hg_report_join2_cb(
    14271427    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    14281428{
     
    14831483 * @param   pvUser              User data (host clipboard formats).
    14841484 */
    1485 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_hg_clip_report_join_cb(
     1485static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_hg_report_join_cb(
    14861486    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    14871487{
     
    15311531 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnHGClipReport}
    15321532 */
    1533 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_hg_clip_report(SHCLFORMATS fFormats)
     1533static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_hg_report(SHCLFORMATS fFormats)
    15341534{
    15351535    int rc = VERR_NO_DATA;
     
    15491549            if (RT_SUCCESS(rc))
    15501550                rc = vbcl_wayland_session_join(&g_DcpCtx.Session.Base,
    1551                                                vbcl_wayland_hlp_dcp_hg_clip_report_join_cb,
     1551                                               vbcl_wayland_hlp_dcp_clip_hg_report_join_cb,
    15521552                                               &fFormats);
    15531553        }
     
    15751575 * @param   pvUser              User data (requested format).
    15761576 */
    1577 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_gh_clip_read_join_cb(
     1577static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_gh_read_join_cb(
    15781578    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    15791579{
     
    16131613 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnGHClipRead}
    16141614 */
    1615 static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_gh_clip_read(SHCLFORMAT uFmt)
     1615static DECLCALLBACK(int) vbcl_wayland_hlp_dcp_clip_gh_read(SHCLFORMAT uFmt)
    16161616{
    16171617    int rc;
     
    16201620
    16211621    rc = vbcl_wayland_session_join(&g_DcpCtx.Session.Base,
    1622                                    &vbcl_wayland_hlp_dcp_gh_clip_read_join_cb,
     1622                                   &vbcl_wayland_hlp_dcp_clip_gh_read_join_cb,
    16231623                                   &uFmt);
    16241624    return rc;
     
    16271627static const VBCLWAYLANDHELPER_CLIPBOARD g_WaylandHelperDcpClip =
    16281628{
    1629     vbcl_wayland_hlp_dcp_init,                  /* .pfnInit */
    1630     vbcl_wayland_hlp_dcp_term,                  /* .pfnTerm */
    1631     vbcl_wayland_hlp_dcp_set_clipboard_ctx,     /* .pfnSetClipboardCtx */
    1632     vbcl_wayland_hlp_dcp_popup,                 /* .pfnPopup */
    1633     vbcl_wayland_hlp_dcp_hg_clip_report,        /* .pfnHGClipReport */
    1634     vbcl_wayland_hlp_dcp_gh_clip_read,          /* .pfnGHClipRead */
     1629    vbcl_wayland_hlp_dcp_clip_init,             /* .pfnInit */
     1630    vbcl_wayland_hlp_dcp_clip_term,             /* .pfnTerm */
     1631    vbcl_wayland_hlp_dcp_clip_set_ctx,          /* .pfnSetClipboardCtx */
     1632    vbcl_wayland_hlp_dcp_clip_popup,            /* .pfnPopup */
     1633    vbcl_wayland_hlp_dcp_clip_hg_report,        /* .pfnHGClipReport */
     1634    vbcl_wayland_hlp_dcp_clip_gh_read,          /* .pfnGHClipRead */
    16351635};
    16361636
  • trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-gtk.cpp

    r106765 r106771  
    404404 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnInit}
    405405 */
    406 RTDECL(int) vbcl_wayland_hlp_gtk_init(void)
     406RTDECL(int) vbcl_wayland_hlp_gtk_clip_init(void)
    407407{
    408408    VBCL_LOG_CALLBACK;
     
    416416 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnTerm}
    417417 */
    418 RTDECL(int) vbcl_wayland_hlp_gtk_term(void)
     418RTDECL(int) vbcl_wayland_hlp_gtk_clip_term(void)
    419419{
    420420    int rc;
     
    444444 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnSetClipboardCtx}
    445445 */
    446 static DECLCALLBACK(void) vbcl_wayland_hlp_gtk_set_clipboard_ctx(PVBGLR3SHCLCMDCTX pCtx)
     446static DECLCALLBACK(void) vbcl_wayland_hlp_gtk_clip_set_ctx(PVBGLR3SHCLCMDCTX pCtx)
    447447{
    448448    g_GtkCtx.pClipboardCtx = pCtx;
     
    461461 * @param   pvUser              User data (unused).
    462462 */
    463 static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_popup_join_cb(
     463static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_clip_popup_join_cb(
    464464    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    465465{
     
    486486 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnPopup}
    487487 */
    488 static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_popup(void)
     488static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_clip_popup(void)
    489489{
    490490    int rc;
     
    499499    {
    500500        rc = vbcl_wayland_session_join(&g_GtkCtx.Session.Base,
    501                                        &vbcl_wayland_hlp_gtk_popup_join_cb,
     501                                       &vbcl_wayland_hlp_gtk_clip_popup_join_cb,
    502502                                       NULL);
    503503    }
     
    523523 * @param   pvUser              User data (host clipboard formats).
    524524 */
    525 static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_hg_clip_report_join_cb(
     525static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_clip_hg_report_join_cb(
    526526    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    527527{
     
    563563 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnHGClipReport}
    564564 */
    565 static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_hg_clip_report(SHCLFORMATS fFormats)
     565static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_clip_hg_report(SHCLFORMATS fFormats)
    566566{
    567567    int rc = VERR_NO_DATA;
     
    578578        {
    579579            rc = vbcl_wayland_session_join(&g_GtkCtx.Session.Base,
    580                                            &vbcl_wayland_hlp_gtk_hg_clip_report_join_cb,
     580                                           &vbcl_wayland_hlp_gtk_clip_hg_report_join_cb,
    581581                                           &fFormats);
    582582        }
     
    602602 * @param   pvUser              User data (requested format).
    603603 */
    604 static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_gh_clip_read_join_cb(
     604static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_clip_gh_read_join_cb(
    605605    vbcl_wl_session_type_t enmSessionType, void *pvUser)
    606606{
     
    641641 * @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnGHClipRead}
    642642 */
    643 static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_gh_clip_read(SHCLFORMAT uFmt)
     643static DECLCALLBACK(int) vbcl_wayland_hlp_gtk_clip_gh_read(SHCLFORMAT uFmt)
    644644{
    645645    int rc = VINF_SUCCESS;
     
    678678        {
    679679            rc = vbcl_wayland_session_join(&g_GtkCtx.Session.Base,
    680                                            &vbcl_wayland_hlp_gtk_gh_clip_read_join_cb,
     680                                           &vbcl_wayland_hlp_gtk_clip_gh_read_join_cb,
    681681                                           &uFmt);
    682682        }
    683683    }
    684684
    685     VBClLogVerbose(2, "vbcl_wayland_hlp_gtk_gh_clip_read ended rc=%Rrc\n", rc);
     685    VBClLogVerbose(2, "vbcl_wayland_hlp_gtk_clip_gh_read ended rc=%Rrc\n", rc);
    686686
    687687    return rc;
     
    716716static const VBCLWAYLANDHELPER_CLIPBOARD g_WaylandHelperGtkClip =
    717717{
    718     vbcl_wayland_hlp_gtk_init,                  /* .pfnInit */
    719     vbcl_wayland_hlp_gtk_term,                  /* .pfnTerm */
    720     vbcl_wayland_hlp_gtk_set_clipboard_ctx,     /* .pfnSetClipboardCtx */
    721     vbcl_wayland_hlp_gtk_popup,                 /* .pfnPopup */
    722     vbcl_wayland_hlp_gtk_hg_clip_report,        /* .pfnHGClipReport */
    723     vbcl_wayland_hlp_gtk_gh_clip_read,          /* .pfnGHClipRead */
     718    vbcl_wayland_hlp_gtk_clip_init,             /* .pfnInit */
     719    vbcl_wayland_hlp_gtk_clip_term,             /* .pfnTerm */
     720    vbcl_wayland_hlp_gtk_clip_set_ctx,          /* .pfnSetClipboardCtx */
     721    vbcl_wayland_hlp_gtk_clip_popup,            /* .pfnPopup */
     722    vbcl_wayland_hlp_gtk_clip_hg_report,        /* .pfnHGClipReport */
     723    vbcl_wayland_hlp_gtk_clip_gh_read,          /* .pfnGHClipRead */
    724724};
    725725
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette