Gnome Developers' Information
<<< Previous | LibGnorba Documentation | Next >>>

# ORBit-Gtk

## Author(s)

Elliot Lee <sopwith@redhat.com>

## Description

Routines for making ORBit work nicely with gtk, and starting/retrieving the name service object for a GNOME session.

## gnome_CORBA_init initialize ORBit and GNOME for use in a program.

`CORBA_ORB `gnome_CORBA_init``(char *`app_id`, struct argp *`app_parser`, int *`argc`, char **`argv`, unsigned int `flags` , int *`arg_index`, CORBA_Environment *`ev`);

### Description

This routine initializes gnome (by calling `gnome_init`). A few items are set up to allow ORBit and gtk to interact well, and finally it initializes ORBit and returns the CORBA_ORB reference to the new ORB.

### Usage

    int main(int argc, char *argv)
    {
    	CORBA_ORB my_orb;
    	CORBA_Environment ev;

    	CORBA_exception_init(&ev);
    	my_orb = gnome_CORBA_init("myapp", NULL, &argc, &argv, 0, NULL, &ev);
    	if(ev._major != CORBA_NO_EXCEPTION)
    	    exit(1); /* error initializing ORB */

    	/* insert killer app code here */
    }

### Parameters

- char *`app_id`

  An alphanumeric application ID string (the application's name is a good choice).

- struct argp *`app_parser`

  See the (non-existent) argp docs for help.

- int *`argc`

  A pointer to the number of arguments.

- char **`argv`

  The array of argument strings.

- unsigned int `flags`

  See the (non-existent) argp docs for help.

- int *`arg_index`

  See the (non-existent) argp docs for help.

- CORBA_Environment *`ev`

  Pointer to a CORBA exception information structure, to allow the ORB initialization functions to signal any errors that occur.

## gnome_name_service_get - retrieves an object reference to the root name service context for the current GNOME session

`CORBA_Object `gnome_name_service_get``(void);

### Description

This routine is used to get access to the top naming context for the current GNOME session. If a naming server is not running, one will be started.

This function assumes that both gtk and ORBit have been initialized.

### Usage

    CORBA_Object ns;

    ns = gnome_name_service_get();

<<< Previous | Home | Next >>>
LibGnorba Documentation | Up | gnome-plugins