WsmP.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: WsmP.h /main/8 1996/05/20 16:08:59 drk $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. **
  27. ** File: WsmP.h
  28. **
  29. ** Project: DT Workspace Manager
  30. **
  31. ** Description: Defines PRIVATE properties, structures, and
  32. ** parameters used for communication with the
  33. ** workspace manager. This also includes some
  34. ** backward compatibility stuff for HP_VUE.
  35. **
  36. ** (c) Copyright 1996 Digital Equipment Corporation.
  37. ** (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
  38. ** (c) Copyright 1993,1994,1996 International Business Machines Corp.
  39. ** (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
  40. ** (c) Copyright 1993,1994,1996 Novell, Inc.
  41. ** (c) Copyright 1996 FUJITSU LIMITED.
  42. ** (c) Copyright 1996 Hitachi.
  43. **
  44. ****************************************************************************
  45. ************************************<+>*************************************/
  46. #ifndef _Dt_WsmP_h
  47. #define _Dt_WsmP_h
  48. #include <Dt/Wsm.h>
  49. #include <X11/Intrinsic.h>
  50. #include <Dt/Service.h>
  51. #include <Tt/tt_c.h>
  52. /**********************************************************************
  53. * Workspace atom names
  54. **********************************************************************/
  55. #define _XA_DT_MARQUEE_SELECTION "_DT_MARQUEE_SELECTION"
  56. #define _XA_DT_WORKSPACE_EMBEDDED_CLIENTS \
  57. "_DT_WORKSPACE_EMBEDDED_CLIENTS"
  58. #define _XA_DT_WM_REQUEST "_DT_WM_REQUEST"
  59. #define _XA_DT_WORKSPACE_HINTS "_DT_WORKSPACE_HINTS"
  60. #define _XA_DT_WORKSPACE_PRESENCE "_DT_WORKSPACE_PRESENCE"
  61. #define _XA_DT_WORKSPACE_INFO "_DT_WORKSPACE_INFO"
  62. #define _XA_DT_WM_HINTS "_DT_WM_HINTS"
  63. #define _XA_DT_WORKSPACE_LIST "_DT_WORKSPACE_LIST"
  64. #define _XA_DT_WORKSPACE_CURRENT "_DT_WORKSPACE_CURRENT"
  65. /**********************************************************************
  66. * Name to request ``all'' workspaces (for a persistent window)
  67. **********************************************************************/
  68. #define _XA_DT_WORKSPACE_ALL "all"
  69. /**********************************************************************
  70. * Workspace function definitions
  71. **********************************************************************/
  72. #define DtWM_FUNC_OCCUPY_WS DtWM_FUNCTION_OCCUPY_WS
  73. #define DtWM_FUNC_ALL DtWM_FUNC_OCCUPY_WS
  74. /**********************************************************************
  75. * Workspace property information
  76. **********************************************************************/
  77. /*
  78. *
  79. * NOTE: The "(client -> dtwm)" indication calls out the direction
  80. * of information flow. In this case, the client writes the
  81. * property and dtwm reads the property.
  82. *
  83. *
  84. * _DT_WORKSPACE_HINTS (client -> dtwm)
  85. *
  86. * This property is a list of atoms placed by a client on its
  87. * top level window(s). Each atom is an "interned" string name
  88. * for a workspace. The workspace manager looks at this property
  89. * when it manages the window (e.g. when the window is mapped)
  90. * and will place the window in the workspaces listed.
  91. *
  92. * _DT_WORKSPACE_PRESENCE (dtwm -> client)
  93. *
  94. * This property is a list of atoms placed on a client by dtwm.
  95. * Each atom is an "interned" string name for a workspace. This
  96. * property lists the workspaces that this client lives in.
  97. *
  98. * _DT_WORKSPACE_LIST (dtwm -> clients)
  99. *
  100. * This property is a list of atoms. Each atom represents a
  101. * name of a workspace. The list is in "order" such that
  102. * the first element is for the first workspace and so on.
  103. * This proeprty is placed on the mwm ("wmWindow") window.
  104. *
  105. * _DT_WORKSPACE_CURRENT (dtwm -> clients)
  106. *
  107. * This property is a single atom, representing the current
  108. * workspace. It is updated each time the workspace changes.
  109. * This proeprty is placed on the mwm window.
  110. *
  111. * _DT_WORKSPACE_INFO_<name> (dtwm -> clients)
  112. *
  113. * There is one property of this form for each workspace in
  114. * _DT_WORKSPACE_LIST. This property is a sequence of ISO-LATIN1
  115. * NULL-terminated strings representing the elements in a
  116. * structure. This information was formerly in _DT_WORKSPACE_INFO
  117. * but was broken out to allow for extensibility.
  118. * This proeprty is placed on the mwm window.
  119. *
  120. * _DT_WM_HINTS (client -> dtwm)
  121. *
  122. * This property requests specific window/workspace management behavior.
  123. * The functions member of the property allows a client to enable or
  124. * disable workspace management functions. The behavior member is
  125. * used to indicate front panels and slide-ups.
  126. *
  127. */
  128. /**********************************************************************
  129. * Property structures
  130. **********************************************************************/
  131. typedef struct _DtWmHints
  132. {
  133. long flags; /* marks valid fields */
  134. long functions; /* special dtwm functions */
  135. long behaviors; /* special dtwm behaviors */
  136. Window attachWindow; /* (reserved) */
  137. } DtWmHints;
  138. /* DtWmHints "flags" definitions */
  139. #define DtWM_HINTS_FUNCTIONS (1L << 0)
  140. #define DtWM_HINTS_BEHAVIORS (1L << 1)
  141. #define DtWM_HINTS_ATTACH_WINDOW (1L << 2) /* (reserved) */
  142. /* DtWmHints "functions" definitions */
  143. #define DtWM_FUNCTION_ALL (1L << 0)
  144. #define DtWM_FUNCTION_OCCUPY_WS (1L << 16)
  145. /* DtWmHints "behaviors" definitions */
  146. #define DtWM_BEHAVIOR_PANEL (1L << 1)
  147. #define DtWM_BEHAVIOR_SUBPANEL (1L << 2)
  148. #define DtWM_BEHAVIOR_SUB_RESTORED (1L << 3)
  149. #ifdef HP_VUE
  150. /*
  151. * For Compatibility with some old HP VUE clients
  152. */
  153. #define _XA_VUE_WORKSPACE_INFO "_VUE_WORKSPACE_INFO"
  154. #define _XA_VUE_WORKSPACE_HINTS "_VUE_WORKSPACE_HINTS"
  155. #define _XA_VUE_WORKSPACE_PRESENCE "_VUE_WORKSPACE_PRESENCE"
  156. #define _XA_VUE_WM_REQUEST "_VUE_WM_REQUEST"
  157. #define _XA_VUE_WM_HINTS "_VUE_WM_HINTS"
  158. #endif /* HP_VUE */
  159. /**********************************************************************
  160. * Session atom names
  161. **********************************************************************/
  162. #define _XA_DT_SESSION_HINTS "_DT_SESSION_HINTS"
  163. #define _XA_DT_SAVE_MODE "_DT_SAVE_MODE"
  164. #define _XA_DT_RESTORE_MODE "_DT_RESTORE_MODE"
  165. #define _XA_DT_RESTORE_DIR "_DT_RESTORE_DIR"
  166. #define _XA_DT_SM_WM_PROTOCOL "_DT_SM_WM_PROTOCOL"
  167. #define _XA_DT_SM_START_ACK_WINDOWS "_DT_SM_START_ACK_WINDOWS"
  168. #define _XA_DT_SM_STOP_ACK_WINDOWS "_DT_SM_STOP_ACK_WINDOWS"
  169. #define _XA_DT_WM_WINDOW_ACK "_DT_WM_WINDOW_ACK"
  170. #define _XA_DT_WM_EXIT_SESSION "_DT_WM_EXIT_SESSION"
  171. #define _XA_DT_WM_LOCK_DISPLAY "_DT_WM_LOCK_DISPLAY"
  172. #define _XA_DT_WM_READY "_DT_WM_READY"
  173. /**********************************************************************
  174. * Workspace special character definitions
  175. **********************************************************************/
  176. #define DTWM_CH_ESC_NEXT "\\"
  177. /**********************************************************************
  178. * Marquee selection callback prototype
  179. **********************************************************************/
  180. typedef void (*DtWsmMarqueeSelectionProc) ();
  181. /*
  182. Widget widget;
  183. int type;
  184. Position x, y;
  185. Dimension width, height;
  186. XtPointer client_data;
  187. */
  188. /**********************************************************************
  189. * Marquee Select
  190. **********************************************************************/
  191. #define DT_WSM_MARQUEE_SELECTION_TYPE_BEGIN 1
  192. #define DT_WSM_MARQUEE_SELECTION_TYPE_CONTINUE 2
  193. #define DT_WSM_MARQUEE_SELECTION_TYPE_END 3
  194. #define DT_WSM_MARQUEE_SELECTION_TYPE_CANCEL 4
  195. /**********************************************************************
  196. * Workspace request definitions
  197. *
  198. * NOTE: These functions do not necessarily match the other
  199. * window manager f.* functions!
  200. **********************************************************************/
  201. #define DTWM_REQ_CHANGE_BACKDROP "f.change_backdrop"
  202. #define DTWM_REQ_RESTART "f.restart"
  203. /**********************************************************************
  204. * Workspace request parameter definitions
  205. **********************************************************************/
  206. #define DTWM_REQP_BACKDROP_NONE "NoBackdrop"
  207. #define DTWM_REQP_NO_CONFIRM "-noconfirm"
  208. /**********************************************************************
  209. * Resource converter definitions
  210. *
  211. * NOTE: This has been lifted from mwm.
  212. * Please keep syncronized with the current version of mwm/dtwm.
  213. * (See WmGlobal.h)
  214. **********************************************************************/
  215. /* icon placement values (iconPlacement, ...): */
  216. #define ICON_PLACE_LEFT_PRIMARY (1L << 0)
  217. #define ICON_PLACE_RIGHT_PRIMARY (1L << 1)
  218. #define ICON_PLACE_TOP_PRIMARY (1L << 2)
  219. #define ICON_PLACE_BOTTOM_PRIMARY (1L << 3)
  220. #define ICON_PLACE_LEFT_SECONDARY (1L << 4)
  221. #define ICON_PLACE_RIGHT_SECONDARY (1L << 5)
  222. #define ICON_PLACE_TOP_SECONDARY (1L << 6)
  223. #define ICON_PLACE_BOTTOM_SECONDARY (1L << 7)
  224. #define ICON_PLACE_EDGE (1L << 8)
  225. #define ICON_PLACE_TIGHT (1L << 9)
  226. #define ICON_PLACE_RESERVE (1L << 10)
  227. /**********************************************************************
  228. * Workspace property information
  229. **********************************************************************/
  230. /*
  231. *
  232. * NOTE: The "(client -> dtwm)" indication calls out the direction
  233. * of information flow. In this case, the client writes the
  234. * property and dtwm reads the property.
  235. *
  236. */
  237. #ifdef HP_VUE
  238. /*
  239. * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  240. * % _VUE_WORKSPACE_INFO is obsolete, but maintained for %
  241. * % backward compatiblity. Its function has been %
  242. * % replaced by %
  243. * % _DT_WORKSPACE_LIST %
  244. * % _DT_WORKSPACE_INFO_<name> %
  245. * %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  246. * _VUE_WORKSPACE_INFO (dtwm -> client)
  247. *
  248. * This property is a list of structures that contain information
  249. * on each workspace. Each structure contains the atom representing
  250. * the workspace string name and the window id of the background
  251. * window for the workspace (if any). The first workspace in the
  252. * list is the "active" workspace for the screen. This property is
  253. * placed on the window identified by the "wmWindow" member of
  254. * the _MOTIF_WM_INFO property.
  255. */
  256. #endif /* HP_VUE */
  257. /*
  258. *
  259. * _DT_WM_REQUEST (client -> dtwm)
  260. *
  261. * This property of type string that is used to communication
  262. * function requests to dtwm. This property is placed on the mwm
  263. * window. Dtwm listens for changes to this property and dequeues
  264. * requests off the top of the list. Requests are NULL-terminated
  265. * strings in the format:
  266. *
  267. * <req_type> <req_parms>
  268. *
  269. * Each request ends with a literal '\0' character to insure
  270. * separation from the next request.
  271. *
  272. * Clients must always add requests to the end of the property
  273. * (mode=PropModeAppend). Use of convenience routines is
  274. * recommended since they take care of proper formatting of the
  275. * requests.
  276. *
  277. */
  278. /**********************************************************************
  279. * Property structures
  280. **********************************************************************/
  281. /* Internal form of this property */
  282. typedef struct _DtWorkspaceHints
  283. {
  284. long version; /* indicates structure changes */
  285. long flags; /* marks valid fields */
  286. long wsflags; /* special workspace information */
  287. long numWorkspaces; /* number of workspaces */
  288. Atom * pWorkspaces; /* list of atoms for workspaces */
  289. } DtWorkspaceHints;
  290. /* DtWorkspaceHints "flags" definitions */
  291. #define DT_WORKSPACE_HINTS_WSFLAGS (1L << 0)
  292. /* The following definitions enables both the numWorkspaces
  293. and pWorkspaces fields */
  294. #define DT_WORKSPACE_HINTS_WORKSPACES (1L << 1)
  295. /* DtWorkspaceHints "wsflags" definitions */
  296. #define DT_WORKSPACE_FLAGS_OCCUPY_ALL (1L << 0)
  297. #ifdef HP_VUE
  298. /*
  299. * Obsolete WorkspaceInfo structure
  300. */
  301. typedef struct _WorkspaceInfo
  302. {
  303. Atom workspace; /* workspace "name" */
  304. Window backgroundWindow; /* backdrop window ID (if any) */
  305. unsigned long bg; /* backdrop background pixel */
  306. unsigned long fg; /* backdrop foreground pixel */
  307. Atom backdropName; /* atomized name for backdrop */
  308. } WorkspaceInfo;
  309. #endif /* HP_VUE */
  310. /**********************************************************************
  311. * Marquee Selection Structures
  312. **********************************************************************/
  313. typedef struct _DtMarqueeSelectData
  314. {
  315. long state; /* current property state */
  316. Position x; /* NW corner of select area */
  317. Position y; /* NW corner of select area */
  318. Dimension width; /* size of select area */
  319. Dimension height; /* size of select area */
  320. } DtMarqueeSelectData;
  321. typedef struct _DtMarqueeSelectProp
  322. {
  323. long state; /* current property state */
  324. long x; /* NW corner of select area */
  325. long y; /* NW corner of select area */
  326. long width; /* size of select area */
  327. long height; /* size of select area */
  328. } DtMarqueeSelectProperty;
  329. /**********************************************************************
  330. * Marquee Selection Definitions
  331. **********************************************************************/
  332. #define DT_MARQUEE_SELECT_BEGIN 1
  333. #define DT_MARQUEE_SELECT_CONTINUE 2
  334. #define DT_MARQUEE_SELECT_END 3
  335. #define DT_MARQUEE_SELECT_CANCEL 4
  336. /**********************************************************************
  337. * Workspace change callback context (opaque)
  338. **********************************************************************/
  339. typedef void (*DtWsmCBProc) ();
  340. struct _DtWsmCBContext
  341. {
  342. Tt_pattern pattern;
  343. Widget widget;
  344. DtWsmCBProc ws_cb;
  345. XtPointer client_data;
  346. XtPointer nested_context;
  347. };
  348. /**********************************************************************
  349. * Convenience Routines
  350. **********************************************************************/
  351. #ifdef HP_VUE
  352. /*************************************<->*************************************
  353. *
  354. * Status DtGetWorkspaceInfo (display, root, ppWsInfo, pNumInfo)
  355. *
  356. *
  357. * Description:
  358. * -----------
  359. * Get the contents of the _DT_WORKSPACE_INFO property on a window
  360. *
  361. *
  362. * Inputs:
  363. * ------
  364. * display - display
  365. * root - root window of screen being managed
  366. * ppWsInfo - pointer to a pointer (to be returned)
  367. * pNumInfo - pointer to a number (to be returned)
  368. *
  369. * Outputs:
  370. * -------
  371. * *ppWsInfo - pointer to a list of workspace info structures
  372. * *pNumInfo - number of workspace info structures in list
  373. * Return - Success if property fetched ok.
  374. * Failure returns are from XGetWindowProperty
  375. *
  376. *************************************<->***********************************/
  377. extern Status
  378. DtGetWorkspaceInfo(
  379. Display *display,
  380. Window root,
  381. WorkspaceInfo **ppWsInfo,
  382. unsigned long *pNumInfo) ;
  383. #endif /* HP_VUE */
  384. /*************************************<->*************************************
  385. *
  386. * int _DtGetMwmWindow (display, root, pMwmWindow)
  387. *
  388. *
  389. * Description:
  390. * -----------
  391. * Get the Motif Window manager window
  392. *
  393. *
  394. * Inputs:
  395. * ------
  396. * display - display
  397. * root - root window of screen
  398. * pMwmWindow - pointer to a window (to be returned)
  399. *
  400. * Outputs:
  401. * --------
  402. * *pMwmWindow - mwm window id, if successful
  403. * Return - status from XGetWindowProperty
  404. *
  405. * Comments:
  406. * --------
  407. * This can fail if mwm is not managing the screen for the root window
  408. * passed in.
  409. *
  410. *************************************<->***********************************/
  411. extern int
  412. _DtGetMwmWindow(
  413. Display *display,
  414. Window root,
  415. Window *pMwmWindow) ;
  416. /*************************************<->*************************************
  417. *
  418. * int _DtGetEmbeddedClients (display, root, ppEmbeddedClients,
  419. * pNumEmbeddedClients)
  420. *
  421. *
  422. * Description:
  423. * -----------
  424. * Get the contents of the _DT_WORKSPACE_EMBEDDED_CLIENTS property
  425. * from a root window. This is a list (array) of top-level windows that
  426. * are embedded in the front panel of the window manager. They would
  427. * not be picked up ordinarily by a session manager in a normal
  428. * search for top-level windows because they are reparented to
  429. * the front panel which itself is a top-level window.
  430. *
  431. *
  432. * Inputs:
  433. * ------
  434. * display - display
  435. * root - root window to get info from
  436. * ppEmbeddedClients - pointer to a pointer (to be returned)
  437. * pNumEmbeddedClients - pointer to a number (to be returned)
  438. *
  439. * Outputs:
  440. * -------
  441. * *ppEmbeddedClients - pointer to a array of window IDs (top-level
  442. * windows for embedded clients)
  443. * (NOTE: This should be freed using XFree)
  444. * *pNumEmbeddedClients- number of window IDs in array
  445. * Return - Success if property fetched ok.
  446. * Failure returns are from XGetWindowProperty
  447. *
  448. * Comments:
  449. * --------
  450. * Use XFree to free the returned data.
  451. *
  452. *************************************<->***********************************/
  453. extern int
  454. _DtGetEmbeddedClients(
  455. Display *display,
  456. Window root,
  457. Atom **ppEmbeddedClients,
  458. unsigned long *pNumEmbeddedClients );
  459. /*************************************<->*************************************
  460. *
  461. * int _DtWmRestart (display, root)
  462. *
  463. *
  464. * Description:
  465. * -----------
  466. * Requests the window manager to restart itself
  467. *
  468. *
  469. * Inputs:
  470. * ------
  471. * display - display
  472. * root - root window for screen
  473. *
  474. * Returns:
  475. * --------
  476. * Success if request was sent
  477. *
  478. * Comments:
  479. * ---------
  480. *
  481. *************************************<->***********************************/
  482. extern int
  483. _DtWmRestart(
  484. Display *display,
  485. Window root) ;
  486. /*************************************<->*************************************
  487. *
  488. * int _DtWsmChangeBackdrop (display, root, path, pixmap)
  489. *
  490. *
  491. * Description:
  492. * -----------
  493. * Request the HP DT workspace manager to change the backdrop
  494. *
  495. *
  496. * Inputs:
  497. * ------
  498. * display - display
  499. * root - root window of screen
  500. * path - file path to bitmap file
  501. * pixmap - pixmap id of backdrop pixmap
  502. *
  503. * Returns:
  504. * --------
  505. * Success if request sent
  506. *
  507. *************************************<->***********************************/
  508. extern int
  509. _DtWsmChangeBackdrop (
  510. Display *display,
  511. Window root,
  512. char *path,
  513. Pixmap pixmap);
  514. /*************************************<->*************************************
  515. *
  516. * _DtWmCvtStringToIPlace (args, numArgs, fromVal, toVal)
  517. *
  518. *
  519. * Description:
  520. * -----------
  521. * This function converts a string to an icon placement scheme description.
  522. *
  523. *
  524. * Inputs:
  525. * ------
  526. * args = NULL (don't care)
  527. *
  528. * numArgs = 0 (don't care)
  529. *
  530. * fromVal = resource value to convert
  531. *
  532. *
  533. * Outputs:
  534. * -------
  535. * toVal = descriptor to use to return converted value
  536. *
  537. *************************************<->***********************************/
  538. extern void
  539. _DtWmCvtStringToIPlace (
  540. XrmValue *args,
  541. Cardinal numArgs,
  542. XrmValue *fromVal,
  543. XrmValue *toVal);
  544. /*************************************<->*************************************
  545. *
  546. * Boolean _DtWsmIsBackdropWindow (display, screen_num, window)
  547. *
  548. *
  549. * Description:
  550. * -----------
  551. * Returns true if the window passed in is a backdrop window.
  552. *
  553. *
  554. * Inputs:
  555. * ------
  556. * display - display
  557. * screen_num - number of screen we're interested in
  558. * window - window we want to test
  559. *
  560. * Outputs:
  561. * -------
  562. * Return - True if window is a backdrop window
  563. * False otherwise.
  564. *
  565. * Comments:
  566. * --------
  567. *
  568. *************************************<->***********************************/
  569. Boolean
  570. _DtWsmIsBackdropWindow(
  571. Display *display,
  572. int screen_num,
  573. Window window );
  574. /*************************************<->*************************************
  575. *
  576. * int DtWsmSetWorkspaceTitle (widget, aWs, pchNewName)
  577. *
  578. *
  579. * Description:
  580. * -----------
  581. * Rename a workspace
  582. *
  583. *
  584. * Inputs:
  585. * ------
  586. * widget - a widget
  587. * aWs - atom of workspace
  588. * pchNewName - new name for the workspace
  589. *
  590. * Outputs:
  591. * --------
  592. * Return - 1 (*not* Success) if communication to workspace manager
  593. * was successful.
  594. *
  595. * Comments:
  596. * ---------
  597. * The odd-ball successful return value is a CDE 1.0 bug being
  598. * preserved for backward compatibility.
  599. *
  600. *************************************<->***********************************/
  601. int
  602. _DtWsmSetWorkspaceTitle (
  603. Widget widget,
  604. Atom aWs,
  605. char * pchNewName);
  606. /*************************************<->*************************************
  607. *
  608. * int _DtWsmDeleteWorkspace (widget, aWs)
  609. *
  610. *
  611. * Description:
  612. * -----------
  613. * Delete a workspace
  614. *
  615. *
  616. * Inputs:
  617. * ------
  618. * widget - a widget (with a window!)
  619. * aWs - atom of workspace to delete
  620. *
  621. * Outputs:
  622. * --------
  623. * Return - 1 (*not* Success) if communication to workspace manager
  624. * was successful.
  625. *
  626. * Comments:
  627. * ---------
  628. * The odd-ball successful return value is a CDE 1.0 bug being
  629. * preserved for backward compatibility.
  630. *
  631. *************************************<->***********************************/
  632. int
  633. _DtWsmDeleteWorkspace (
  634. Widget widget,
  635. Atom aWs);
  636. /*************************************<->*************************************
  637. *
  638. * int _DtWsmCreateWorkspace (widget, pchTitle)
  639. *
  640. *
  641. * Description:
  642. * -----------
  643. * Add a workspace
  644. *
  645. *
  646. * Inputs:
  647. * ------
  648. * widget - a widget (with a window!)
  649. * pchTitle - user-visible title of the workspace
  650. *
  651. * Outputs:
  652. * --------
  653. * Return - 1 (*not* Success) if communication to workspace manager
  654. * was successful.
  655. *
  656. * Comments:
  657. * ---------
  658. * The odd-ball successful return value is a CDE 1.0 bug being
  659. * preserved for backward compatibility.
  660. *
  661. *************************************<->***********************************/
  662. int
  663. _DtWsmCreateWorkspace (Widget widget, char * pchTitle);
  664. /*************************************<->*************************************
  665. *
  666. * _DtWsmSetWorkspaceHints (display, window, pWsHints)
  667. *
  668. *
  669. * Description:
  670. * -----------
  671. * Set the contents of the _DT_WORKSPACE_HINTS property on a window
  672. *
  673. *
  674. * Inputs:
  675. * ------
  676. * display - display
  677. * window - window to get hints from
  678. * pWsHints - pointer to workspace hints
  679. *
  680. * Comments:
  681. * ---------
  682. * The internal form of the property is a structure. The structure
  683. * must be unwound and turned into a simple array of "long"s before
  684. * being written out.
  685. *
  686. * This function currently only deals with version 1 of the property
  687. * structure. The passed in pWsHints->version is ignored.
  688. *
  689. *************************************<->***********************************/
  690. extern void
  691. _DtWsmSetWorkspaceHints(
  692. Display *display,
  693. Window window,
  694. DtWorkspaceHints *pWsHints);
  695. /*************************************<->*************************************
  696. *
  697. * int _DtWsmGetWorkspaceHints (display, window, ppWsHints)
  698. *
  699. *
  700. * Description:
  701. * -----------
  702. * Get the contents of the _DT_WORKSPACE_HINTS property from a window
  703. *
  704. *
  705. * Inputs:
  706. * ------
  707. * display - display
  708. * window - window to get hints from
  709. * ppWsHints - pointer to pointer to workspace hints
  710. *
  711. * Outputs:
  712. * *ppWsHints - allocated workspace hints data.
  713. *
  714. * Comments:
  715. * ---------
  716. * The internal form of the property is a structure. The property
  717. * is read in and packed into data allocated for the structure.
  718. * Free the workspace hints by calling _DtWsmFreeWorkspaceHints.
  719. *
  720. * This function currently only deals with version 1 of the property
  721. * structure.
  722. *
  723. *************************************<->***********************************/
  724. extern int
  725. _DtWsmGetWorkspaceHints(
  726. Display *display,
  727. Window window,
  728. DtWorkspaceHints **ppWsHints);
  729. /*************************************<->*************************************
  730. *
  731. * _DtWsmFreeWorkspaceHints (pWsHints)
  732. *
  733. *
  734. * Description:
  735. * -----------
  736. * Free a workspace hints structure returned from _DtWsmGetWorkspaceHints
  737. *
  738. * Inputs:
  739. * ------
  740. * pWsHints - pointer to workspace hints
  741. *
  742. * Outputs:
  743. *
  744. * Comments:
  745. * ---------
  746. *************************************<->***********************************/
  747. extern void
  748. _DtWsmFreeWorkspaceHints(
  749. DtWorkspaceHints *pWsHints);
  750. /*************************************<->*************************************
  751. *
  752. * DtWsmCBContext * _DtWsmAddMarqueeSelectionCallback (widget,
  753. * marquee_select,
  754. * client_data)
  755. *
  756. *
  757. * Description:
  758. * -----------
  759. * Register a function to be called when a marquee selection is made
  760. *
  761. *
  762. * Inputs:
  763. * ------
  764. * widget - widget for this client
  765. * marquee_select - function to call for marquee select
  766. * client_data - additional data to pass back to client when called.
  767. *
  768. * Outputs:
  769. * --------
  770. * Return - ptr to callback context data (opaque)
  771. *
  772. * Comments:
  773. * ---------
  774. * The callback context data ptr should be saved if you intend to
  775. * removed this callback at some point in the future.
  776. *
  777. *************************************<->***********************************/
  778. DtWsmCBContext
  779. _DtWsmAddMarqueeSelectionCallback (
  780. Widget widget,
  781. DtWsmMarqueeSelectionProc marquee_select,
  782. XtPointer client_data);
  783. /*************************************<->*************************************
  784. *
  785. * _DtWsmSetDtWmHints (display, window, pHints)
  786. *
  787. *
  788. * Description:
  789. * -----------
  790. * Set the contents of the _DT_WM_HINTS property on a window
  791. *
  792. *
  793. * Inputs:
  794. * ------
  795. * display - display
  796. * window - window to set hints on
  797. * pHints - pointer the hints to set
  798. *
  799. * Comments:
  800. * ---------
  801. * No error checking
  802. *
  803. *************************************<->***********************************/
  804. extern void
  805. _DtWsmSetDtWmHints( Display *display,
  806. Window window,
  807. DtWmHints *pHints);
  808. /*************************************<->*************************************
  809. *
  810. * int _DtWsmGetDtWmHints (display, window, ppDtWmHints)
  811. *
  812. *
  813. * Description:
  814. * -----------
  815. * Get the contents of the _DT_WM_HINTS property on a window
  816. *
  817. *
  818. * Inputs:
  819. * ------
  820. * display - display
  821. * window - window to get hints from
  822. * ppDtWmHints - pointer to a pointer to return
  823. *
  824. * Outputs:
  825. * --------
  826. * *ppDtWmHints-points to the DtWmHints structure retrieved from
  827. * the window (NOTE: This should be freed using XFree)
  828. *
  829. * Comments:
  830. * ---------
  831. *
  832. *************************************<->***********************************/
  833. extern int
  834. _DtWsmGetDtWmHints(
  835. Display *display,
  836. Window window,
  837. DtWmHints **ppDtWmHints);
  838. /*************************************<->*************************************
  839. *
  840. * _DtWsmSelectionNameForScreen (scr)
  841. *
  842. * Description:
  843. * -----------
  844. * Returns a string containing the selection name used for
  845. * communication with the workspace manager on this screen
  846. *
  847. *
  848. * Inputs:
  849. * ------
  850. * scr - number of screen
  851. *
  852. * Outputs:
  853. * --------
  854. * Return - ptr to string with selection name (free with XtFree)
  855. *
  856. * Comments:
  857. * ---------
  858. * Assumes the screen number is < 1000.
  859. *
  860. *************************************<->***********************************/
  861. extern String
  862. _DtWsmSelectionNameForScreen (int scr);
  863. extern Tt_callback_action
  864. _DtWsmConsumeReply (
  865. Tt_message msg,
  866. Tt_pattern pat );
  867. #endif /* _Dt_WsmP_h */
  868. /* Do not add anything after this endif. */