Ignore:
Timestamp:
Dec 10, 2006, 10:16:55 AM (19 years ago)
Author:
cinc
Message:

Some menu improvememnts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/class_c/wpobject.c

    r143 r152  
    4747
    4848#include <string.h>
     49#include <gtk/gtk.h>
     50#include <nomguitk.h>
    4951#include "desktoptypes.h"
     52
     53/* We have to declare this here to make PNOMFolderWindow known
     54   to wpDisplayMenu(). */
     55#ifndef NOMFolderWindow
     56typedef struct NOMFolderWindow_struct {
     57  struct nomMethodTabStruct  *mtab;
     58  gulong body[1];
     59} NOMFolderWindowObj;
     60#define NOMFolderWindow NOMFolderWindowObj
     61typedef NOMFolderWindow *PNOMFolderWindow;
     62#endif
     63
    5064#include "wpobject.ih"
    5165
     66#include "nomfolderwindow.h"
    5267
    5368NOM_Scope gpointer NOMLINK impl_WPObject_wpAllocMem(WPObject* nomSelf, const CORBA_unsigned_long cbBytes,
     
    235250}
    236251
     252NOM_Scope PNOMMenu NOMLINK impl_WPObject_wpDisplayMenu(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     253                                                       const gpointer gReserved, const CORBA_unsigned_long ulMenuType,
     254                                                       const CORBA_unsigned_long ulReserved, CORBA_Environment *ev)
     255{
     256/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     257  PNOMMenu nomMenu=NOMMenuNew();
     258
     259  /* Let classes insert menu items now */
     260  WPObject_wpModifyMenu(nomSelf, nomFolder, nomMenu, ulMenuType, ev);
     261
     262  /* Let classes filter menu items now */
     263  WPObject_wpFilterMenu(nomSelf, nomFolder, nomMenu, ulMenuType, 0, ev);
     264
     265  /* And finally show it */
     266  gtk_menu_popup(GTK_MENU(NOMMenu_getMenuHandle(nomMenu,ev)), NULL, NULL, NULL, NULL, 0,
     267                 gtk_get_current_event_time());
     268  return nomMenu;
     269}
     270
     271NOM_Scope void NOMLINK impl_WPObject_wpModifyMenu(WPObject* nomSelf, const PNOMFolderWindow nomFolder, const PNOMMenu nomMenu, const CORBA_unsigned_long ulMenuType, CORBA_Environment *ev)
     272{
     273/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     274
     275}
     276
     277NOM_Scope void NOMLINK impl_WPObject_wpFilterMenu(WPObject* nomSelf, const PNOMFolderWindow nomFolder, const PNOMMenu nomMenu, const CORBA_unsigned_long ulMenuType, const CORBA_unsigned_long ulFlags, CORBA_Environment *ev)
     278{
     279/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     280
     281}
     282
     283NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpMenuItemSelected(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     284                                                                 const PNOMMenu nomMenu,
     285                                                                 const CORBA_unsigned_long ulMenuType,
     286                                                                 CORBA_Environment *ev)
     287{
     288/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     289  CORBA_boolean nomRetval;
     290
     291  return nomRetval;
     292}
     293
     294NOM_Scope void NOMLINK impl_WPObject_wpInsertMenuItem(WPObject* nomSelf, const PNOMMenu nomMenu,
     295                                                      const CORBA_unsigned_long ulId, CORBA_Environment *ev)
     296{
     297/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     298
     299}
Note: See TracChangeset for help on using the changeset viewer.