Changeset 176
- Timestamp:
- Jan 6, 2007, 1:10:17 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpdatafile.c
r122 r176 47 47 #include "nomtk.h" 48 48 49 #include "wpdatafile.ih" 49 #include <gtk/gtk.h> 50 #include "nomguitk.h" 50 51 #include "helper.h" 51 52 #include "desktop.h" 53 #include "nomwindow.h" 54 #include "desktoptypes.h" 55 56 /* wpdatafile.ih includes some WPObject stuff and that needs these 57 includes. */ 58 #include "nomfolderwindow.h" 59 60 #include "wpdatafile.ih" 52 61 53 62 NOM_Scope CORBA_long NOMLINK impl_WPDataFile_wpQueryFileSize(WPDataFile* nomSelf, CORBA_Environment *ev) -
trunk/desktop/class_c/wpnotebook.c
r172 r176 43 43 #include <gtk/gtk.h> 44 44 #include <nomguitk.h> 45 #include "nomwindow.h" 46 #include "desktoptypes.h" 45 47 48 #include "nomfolderwindow.h" 46 49 #include "wpnotebook.ih" 47 50 … … 61 64 } 62 65 66 67 NOM_Scope void NOMLINK impl_WPNoteBook_wpSetWPObject(WPNoteBook* nomSelf, const PWPObject wpObject, 68 CORBA_Environment *ev) 69 { 70 WPNoteBookData* nomThis=WPNoteBookGetData(nomSelf); 71 _wpObject=wpObject; 72 73 } 74 75 76 NOM_Scope PWPObject NOMLINK impl_WPNoteBook_wpQueryWPObject(WPNoteBook* nomSelf, CORBA_Environment *ev) 77 { 78 WPNoteBookData* nomThis=WPNoteBookGetData(nomSelf); 79 80 return _wpObject; 81 } 82 83 84 85 63 86 NOM_Scope void NOMLINK impl_WPNoteBook_nomInit(WPNoteBook* nomSelf, CORBA_Environment *ev) 64 87 { 88 /* WPNoteBookData* nomThis=WPNoteBookGetData(nomSelf); */ 65 89 GtkWidget* gtkWindow; 66 90 NOMNoteBook* nomNoteBook; 67 68 WPNoteBookData* nomThis=WPNoteBookGetData(nomSelf);69 91 70 92 WPNoteBook_nomInit_parent((NOMObject*)nomSelf, ev); -
trunk/desktop/class_c/wpobject.c
r175 r176 61 61 #endif 62 62 63 #ifndef WPObject64 typedef struct WPObject_struct {65 struct nomMethodTabStruct *mtab;66 gulong body[1];67 } WPObjectObj;68 #define WPObject WPObjectObj69 typedef WPObject *PWPObject;70 #endif71 72 63 #include "nomwindow.h" 73 64 #include "desktoptypes.h" … … 138 129 WPObject_nomInit_parent((NOMObject*) nomSelf, ev); 139 130 140 nomPrintf(" Entering %s with nomSelf: 0x%x. nomSelf is: %s.\n",141 131 //nomPrintf(" Entering %s with nomSelf: 0x%x. nomSelf is: %s.\n", 132 // __FUNCTION__, nomSelf , nomSelf->mtab->nomClassName); 142 133 143 134 /* Initialize important data before letting subclasses do their stuff */ … … 181 172 } 182 173 174 static 175 gboolean defaultWPWindowDeleteHandler(GtkWidget* gtkWidget, GdkEvent* gdkEvent, gpointer pData) 176 { 177 WPObject* wpObject; 178 WPNoteBook* wpNoteBook; 179 PUSEITEM pUseItem=(PUSEITEM) pData; 180 181 wpNoteBook=(WPNoteBook*)g_object_get_data(G_OBJECT(gtkWidget), NOMOBJECT_KEY_STRING); 182 183 g_return_val_if_fail(NULLHANDLE!=wpNoteBook, FALSE); 184 185 wpObject=WPNoteBook_wpQueryWPObject(wpNoteBook, NULLHANDLE); 186 187 g_return_val_if_fail(NULLHANDLE!=wpObject, FALSE); 188 189 WPObject_wpDeleteFromObjUseList(wpObject, pUseItem, NULLHANDLE); 190 191 return FALSE; /* Let other handlers run */ 192 } 183 193 184 194 NOM_Scope gpointer NOMLINK impl_WPObject_wpOpen(WPObject* nomSelf, const PNOMFolderWindow nomFolder, … … 196 206 WPNoteBook* wpNoteBook; 197 207 wpNoteBook=WPNoteBookNew(); 208 WPNoteBook_wpSetWPObject(wpNoteBook, nomSelf, NULLHANDLE); 209 198 210 _wpAddSettingsPages(nomSelf, wpNoteBook, ev); 199 211 … … 207 219 ((VIEWITEM*)pui)->ulView=VIEW_SETTINGS; 208 220 ((VIEWITEM*)pui)->nomWindow=(NOMWindow*)wpNoteBook; 209 g_message(" in %s viewItem: %x wpNoteBook 0x%04X", __FUNCTION__, pui, wpNoteBook);210 221 pui--; 211 222 //g_message(" in %s wpNoteBook: %lx pui %lx", __FUNCTION__, wpNoteBook, pui); 223 g_signal_connect(G_OBJECT(NOMWindow_queryWindowHandle((NOMWindow*)wpNoteBook, NULLHANDLE)),"delete-event", 224 G_CALLBACK(defaultWPWindowDeleteHandler), (gpointer) pui); 212 225 WPObject_wpAddToObjUseList(nomSelf, pui, ev); 213 226 WPNoteBook_show(wpNoteBook, ev); … … 228 241 229 242 230 if((nomRetval=WPObject_wpSwitchTo(nomSelf, ulView, ev))!=NULLHANDLE){ 231 /* Bring the window to the foreground */ 232 // NOMWindow_show((NOMWindow*)nomRetval , ev); 243 if((nomRetval=WPObject_wpSwitchTo(nomSelf, ulView, ev))!=NULLHANDLE) 233 244 return nomRetval; 234 } 235 236 g_message(" in %s with ulViev 0x%04X", __FUNCTION__, ulView); 245 237 246 return WPObject_wpOpen(nomSelf, nomFolder, ulView, pParam, ev); 238 247 } … … 242 251 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 243 252 PVIEWITEM pViewItem; 244 245 g_message(" in %s with ulViev 0x%04X", __FUNCTION__, ulView);246 253 247 254 switch(ulView) … … 249 256 case OPEN_SETTINGS: 250 257 { 251 g_message(" in %s : OPEN_SETTINGS", __FUNCTION__);252 258 pViewItem=WPObject_wpFindViewItem(nomSelf, VIEW_SETTINGS, NULLHANDLE, ev); 253 259 if(pViewItem){ 254 g_message(" in %s : OPEN_SETTINGS returning %x %x ...", __FUNCTION__, pViewItem, pViewItem->nomWindow); 255 NOMWindow_show(pViewItem->nomWindow, ev); 256 return (gpointer)pViewItem->nomWindow; 260 //g_message(" in %s : OPEN_SETTINGS returning %x %x ...", __FUNCTION__, pViewItem, pViewItem->nomWindow); 261 /* Bring the window to the foreground */ 262 NOMWindow_present(pViewItem->nomWindow, ev); 263 return (gpointer)pViewItem->nomWindow; 257 264 } 258 265 break; … … 282 289 return FALSE; 283 290 284 g_message(" in %s : %x", __FUNCTION__, pUseItem);291 //g_message(" in %s : %x", __FUNCTION__, pUseItem); 285 292 286 293 WPObject_wpRequestObjectMutexSem(nomSelf, 0,ev); … … 302 309 303 310 WPObject_wpRequestObjectMutexSem(nomSelf, 0,ev); 304 311 //g_message(" in %s %lx", __FUNCTION__, pUseItem); 305 312 _glstObjectInUse=g_slist_remove( _glstObjectInUse, (gpointer)pUseItem); 306 313 … … 322 329 323 330 WPObject_wpRequestObjectMutexSem(nomSelf, 0,ev); 324 g_message(" in %s %d", __FUNCTION__, ulType); 331 325 332 if(NULLHANDLE==pCurrentUseItem) 326 333 tmpList=_glstObjectInUse; … … 334 341 pUseItem=(PUSEITEM)tmpList->data; 335 342 336 g_message(" a in %s type: %d", __FUNCTION__, pUseItem->type); 337 343 //g_message(" a in %s type: %d", __FUNCTION__, pUseItem->type); 338 344 if(pUseItem && ulType==pUseItem->type) 339 345 break; 340 g_message(" b in %s type: %d", __FUNCTION__, pUseItem->type); 346 341 347 tmpList=g_slist_next(tmpList); 342 348 pUseItem=NULLHANDLE; … … 358 364 if(!flViews) 359 365 return NULLHANDLE; 360 g_message(" in %s %d", __FUNCTION__, flViews); 366 361 367 if(NULLHANDLE==pCurrentItem) 362 368 pUseItem=WPObject_wpFindUseItem(nomSelf, USAGE_OPENVIEW, NULLHANDLE, ev); … … 371 377 pViewItem=(PVIEWITEM)pUseItem; 372 378 pUseItem--; 373 g_message(" a in %s %d", __FUNCTION__, flViews);379 //g_message(" a in %s %d", __FUNCTION__, flViews); 374 380 if(pViewItem->ulView & flViews) 375 381 break; 376 g_message(" b in %s %d", __FUNCTION__, flViews); 382 377 383 pUseItem=WPObject_wpFindUseItem(nomSelf, USAGE_OPENVIEW, pUseItem, ev); 378 384 pViewItem=NULLHANDLE; -
trunk/desktop/idl/wpnotebook.idl
r167 r176 36 36 #define WPNOTEBOOK_IDL_INCLUDED 37 37 38 #if 0 39 #ifndef WPObject_defined 40 #define WPObject_defined 41 native PWPObject; 42 #endif 43 #endif 44 45 #include <nomobj.idl> 46 47 NOMCLASSNAME(WPNoteBook); 48 49 #include "wpobject.idl" 38 50 #include "nomnotebook.idl" 39 51 40 NOMCLASSNAME(WPNoteBook);41 52 42 53 interface WPNoteBook : NOMWindow … … 46 57 PNOMNoteBook wpQueryNoteBookObject(); 47 58 void wpSetNoteBookObject(in PNOMNoteBook nomNBook); 59 void wpSetWPObject(in PWPObject wpObject); 60 PWPObject wpQueryWPObject(); 48 61 49 62 NOMOVERRIDE(nomInit); 50 63 51 64 NOMINSTANCEVAR(PNOMNoteBook nomNoteBook); 65 NOMINSTANCEVAR(PWPObject wpObject); 66 52 67 }; 53 68 -
trunk/desktop/idl/wpobject.idl
r175 r176 42 42 #include "nommenu.idl" 43 43 #include "nommenuitem.idl" 44 #include "wpnotebook.idl"45 44 #include "nomwindow.idl" 46 45 … … 51 50 52 51 NOMCLASSNAME(WPObject); 52 53 #include "wpnotebook.idl" 53 54 54 55 interface WPObject : NOMObject -
trunk/desktop/include/desktoptypes.h
r175 r176 12 12 gpointer ptrUserinfo; /* Pointer to more menu item info for the user */ 13 13 }wpMenuItemInfo; 14 15 #ifndef WPObject 16 typedef struct WPObject_struct { 17 struct nomMethodTabStruct *mtab; 18 gulong body[1]; 19 } WPObjectObj; 20 #define WPObject WPObjectObj 21 typedef WPObject *PWPObject; 22 #endif 14 23 15 24 /* Inuse lists */ … … 68 77 69 78 #endif /* DESKTOPTYPES_H_INCLUDED */ 79 -
trunk/emx-wrapper/voyager-desktop.c
r134 r176 41 41 #include <stdio.h> 42 42 43 void * pMemInExe; 44 43 45 int main( int argc, 44 46 char *argv[] ) … … 51 53 PFN proc; 52 54 55 56 fprintf(stderr, "%s: Memaddress for GC: %x\n", __FUNCTION__, (UINT)&pMemInExe); 53 57 /* 54 58 Initialize the garbage collector. … … 69 73 } 70 74 fprintf(stderr, " Proc address for nomInitGarbageCollection() is: 0x%x\n", (int)proc); 71 proc( );75 proc(&pMemInExe); 72 76 73 77 /* -
trunk/gui/class_c/nomwindow.c
r163 r176 73 73 { 74 74 /* NOMWindowData* nomThis=NOMWindowGetData(nomSelf); */ 75 gtk_widget_hide(NOMWindow_queryWindowHandle(nomSelf, NULLHANDLE));75 gtk_widget_hide(NOMWindow_queryWindowHandle(nomSelf, ev)); 76 76 } 77 77 78 NOM_Scope void NOMLINK impl_NOMWindow_present(NOMWindow* nomSelf, CORBA_Environment *ev) 79 { 80 /* NOMWindowData* nomThis=NOMWindowGetData(nomSelf); */ 81 82 gtk_window_present(GTK_WINDOW(NOMWindow_queryWindowHandle(nomSelf, ev))); 83 } 84 -
trunk/gui/idl/nomwindow.idl
r173 r176 54 54 void show(); 55 55 void hide(); 56 void present(); 57 56 58 NOMINSTANCEVAR(PGtkWidget _pgWindowHandle); 57 59 };
Note:
See TracChangeset
for help on using the changeset viewer.