VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/VBoxClient/display-helper.h@ 93375

最後變更 在這個檔案從93375是 93375,由 vboxsync 提交於 3 年 前

Additions: Linux: scm fixes, bugref:10134.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.0 KB
 
1/* $Id: display-helper.h 93375 2022-01-20 18:11:54Z vboxsync $ */
2/** @file
3 *
4 * Definitions for Desktop Environment helpers.
5 */
6
7/*
8 * Copyright (C) 2006-2022 Oracle Corporation
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.alldomusa.eu.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 */
18
19#ifndef GA_INCLUDED_SRC_x11_VBoxClient_display_helper_h
20#define GA_INCLUDED_SRC_x11_VBoxClient_display_helper_h
21#ifndef RT_WITHOUT_PRAGMA_ONCE
22# pragma once
23#endif
24
25#include "display-ipc.h"
26
27/** Environment variable which contains information about currently running Desktop Environment. */
28#define VBCL_HLP_ENV_XDG_CURRENT_DESKTOP "XDG_CURRENT_DESKTOP"
29/** Environment variable which is exported when in Wayland Desktop Environment. */
30#define VBCL_HLP_ENV_WAYLAND_DISPLAY "WAYLAND_DISPLAY"
31
32/**
33 * Display offsets change notification callback.
34 *
35 * @returns IPRT status code.
36 * @param cOffsets Number of displays which have changed their offset.
37 * @param paOffsets Displays offset data.
38 */
39typedef DECLCALLBACKTYPE(int, FNDISPLAYOFFSETCHANGE, (uint32_t cOffsets, struct RTPOINT *paOffsets));
40
41/**
42 * Desktop Environment helper definition structure.
43 */
44typedef struct
45{
46 /** A short helper name. 16 chars maximum (RTTHREAD_NAME_LEN). */
47 const char *pszName;
48
49 /**
50 * Probing callback.
51 *
52 * Called in attempt to detect if user is currently running Desktop Environment
53 * which is compatible with the helper.
54 *
55 * @returns IPRT status code.
56 */
57 DECLCALLBACKMEMBER(int, pfnProbe, (void));
58
59 /**
60 * Initialization callback.
61 *
62 * @returns IPRT status code.
63 */
64 DECLCALLBACKMEMBER(int, pfnInit, (void));
65
66 /**
67 * Termination callback.
68 *
69 * @returns IPRT status code.
70 */
71 DECLCALLBACKMEMBER(int, pfnTerm, (void));
72
73 /**
74 * Set primary display in Desktop Environment specific way.
75 *
76 * @returns IPRT status code.
77 * @param idDisplay Display ID which should be set as primary.
78 */
79 DECLCALLBACKMEMBER(int, pfnSetPrimaryDisplay, (uint32_t idDisplay));
80
81 /**
82 * Register notification callback for display offsets change event.
83 *
84 * @param pfnNotificationCallback Notification callback.
85 */
86 DECLCALLBACKMEMBER(void, pfnSubscribeDisplayOffsetChangeNotification, (FNDISPLAYOFFSETCHANGE *pfnNotificationCallback));
87
88 /**
89 * Unregister notification callback for display offsets change event.
90 *
91 * @param pfnNotificationCallback Notification callback.
92 */
93 DECLCALLBACKMEMBER(void, pfnUnsubscribeDisplayOffsetChangeNotification, (void));
94
95} VBCLDISPLAYHELPER;
96
97/**
98 * Initialization callback for generic Desktop Environment helper.
99 *
100 * @returns IPRT status code.
101 */
102RTDECL(int) vbcl_hlp_generic_init(void);
103
104/**
105 * Termination callback for generic Desktop Environment helper.
106 *
107 * @returns IPRT status code.
108 */
109RTDECL(int) vbcl_hlp_generic_term(void);
110
111/**
112 * Subscribe to display offset change notifications emitted by Generic Desktop Environment helper.
113 *
114 * @returns IPRT status code.
115 * @param pfnCb A pointer to callback function which will be triggered when event arrives.
116 */
117RTDECL(void) vbcl_hlp_generic_subscribe_display_offset_changed(FNDISPLAYOFFSETCHANGE *pfnCb);
118
119/**
120 * Unsubscribe from display offset change notifications emitted by Generic Desktop Environment helper.
121 *
122 * @returns IPRT status code.
123 */
124RTDECL(void) vbcl_hlp_generic_unsubscribe_display_offset_changed(void);
125
126/** GNOME3 helper private data. */
127extern const VBCLDISPLAYHELPER g_DisplayHelperGnome3;
128/** Generic helper private data. */
129extern const VBCLDISPLAYHELPER g_DisplayHelperGeneric;
130
131#endif /* !GA_INCLUDED_SRC_x11_VBoxClient_display_helper_h */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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