Common Desktop Environment: Programmer's Overview

Desktop Naming Conventions

The Common Desktop Environment uses naming conventions similar to those used by X and Motif. Desktop clients, desktop libraries, and other desktop components share a common prefix for externally visible names: dt, Dt, or DT. Private desktop structures, functions, and defines (found in the Common Desktop Environment code; not for developer use) have an _dt, _Dt, or _DT prefix. Table 3-1 lists the desktop naming conventions.

Table 3-1 Desktop Naming Conventions

Name  

Prefix 

Example 

Desktop clients and utilities 

dt

dthelpview

Resource names and classes 

Dt

DtNhelpType, DtCHelpType

Library names 

Dt

libDtHelp

Include references 

Dt

#include <Dt/Help.h>

Public function names 

Dt

DtCreateHelpDialog

Public data structure names 

Dt

DtHelpDialogCallbackStruct

Constant names 

Dt

DtHELP_NEW_WINDOW

Environment variables 

DT

DTHELPSEARCHPATH

Private desktop symbols (structures, functions, defines) 

_dt, _Dt, _DT

_DtHelpFunction, _DtHELP_DEFINE

Table 3-2 lists the exceptions to the preceding naming conventions.

Table 3-2 Exceptions to Desktop Naming Conventions

Name 

Prefix 

Example 

Common Desktop Environment Motif

Xm

XmCreateLabel

dtksh Convenience Functions

Dtksh

DtkshAddButtons

ToolTalk Messaging Service

tt (for functions)

Tt (for typedefs) 

TT (for constants) 

tt_open

Tt_message 

TT_NOTICE 

X11R5

X, Xt

XOpenDisplay, XtCreateWidget


Caution - Caution -

Do not use the prefixes dt, Dt, DT, _dt, _Dt, _DT, Xm, tt, Tt, TT, X, or Xt to define new symbols in your application code. If you do, you might define one that has already been defined--or might be defined in the future--in the Common Desktop Environment, ToolTalk, X11R5, or Motif code.