~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to intern/ghost/intern/GHOST_C-api.cpp

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * $Id: GHOST_C-api.cpp 29935 2010-07-04 15:35:23Z elubie $
 
1
/*
3
2
 * ***** BEGIN GPL LICENSE BLOCK *****
4
3
 *
5
4
 * This program is free software; you can redistribute it and/or
26
25
 * ***** END GPL LICENSE BLOCK *****
27
26
 */
28
27
 
 
28
/** \file ghost/intern/GHOST_C-api.cpp
 
29
 *  \ingroup GHOST
 
30
 */
 
31
 
 
32
 
29
33
/*
30
34
 
31
35
 * GHOST_C-Api.cpp
32
36
 *
33
37
 * C Api for GHOST
34
38
 *
35
 
 * Version: $Id: GHOST_C-api.cpp 29935 2010-07-04 15:35:23Z elubie $
36
39
 */
37
40
 
38
41
#include <stdlib.h>
62
65
}
63
66
 
64
67
 
65
 
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata)
 
68
GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
 
69
                                                    GHOST_TUserDataPtr userdata)
66
70
{
67
71
        return (GHOST_EventConsumerHandle) new GHOST_CallbackEventConsumer (eventCallback, userdata);
68
72
}
129
133
 
130
134
 
131
135
GHOST_WindowHandle GHOST_CreateWindow(GHOST_SystemHandle systemhandle,
132
 
                                                                          char* title,
 
136
                                                                          const char* title,
133
137
                                                                          GHOST_TInt32 left,
134
138
                                                                          GHOST_TInt32 top,
135
139
                                                                          GHOST_TUns32 width,
248
252
        return system->addEventConsumer((GHOST_CallbackEventConsumer*)consumerhandle);
249
253
}
250
254
 
 
255
GHOST_TSuccess GHOST_RemoveEventConsumer(GHOST_SystemHandle systemhandle, GHOST_EventConsumerHandle consumerhandle)
 
256
{
 
257
        GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
 
258
 
 
259
        return system->removeEventConsumer((GHOST_CallbackEventConsumer*)consumerhandle);
 
260
}
 
261
 
251
262
GHOST_TSuccess GHOST_SetProgressBar(GHOST_WindowHandle windowhandle,float progress)
252
263
{
253
264
        GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
263
274
}
264
275
 
265
276
 
266
 
int GHOST_OpenNDOF(GHOST_SystemHandle systemhandle, GHOST_WindowHandle windowhandle,
267
 
   GHOST_NDOFLibraryInit_fp setNdofLibraryInit, 
268
 
    GHOST_NDOFLibraryShutdown_fp setNdofLibraryShutdown,
269
 
    GHOST_NDOFDeviceOpen_fp setNdofDeviceOpen)
270
 
  //original patch only
271
 
  /*  GHOST_NDOFEventHandler_fp setNdofEventHandler)*/
272
 
{
273
 
        GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
274
 
 
275
 
    return system->openNDOF((GHOST_IWindow*) windowhandle,
276
 
        setNdofLibraryInit, setNdofLibraryShutdown, setNdofDeviceOpen);
277
 
//      original patch
278
 
//        setNdofLibraryInit, setNdofLibraryShutdown, setNdofDeviceOpen, setNdofEventHandler);
279
 
}
280
 
 
281
 
 
282
 
 
283
277
GHOST_TStandardCursor GHOST_GetCursorShape(GHOST_WindowHandle windowhandle)
284
278
{
285
279
        GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
391
385
{
392
386
        GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
393
387
        GHOST_TSuccess result;
394
 
        bool isdown;
 
388
        bool isdown= false;
395
389
        
396
390
        result = system->getModifierKeyState(mask, isdown);
397
391
        *isDown = (int) isdown;
407
401
{
408
402
        GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
409
403
        GHOST_TSuccess result;
410
 
        bool isdown;
 
404
        bool isdown= false;
411
405
        
412
406
        result = system->getButtonState(mask, isdown);
413
407
        *isDown = (int) isdown;
525
519
 
526
520
 
527
521
void GHOST_SetTitle(GHOST_WindowHandle windowhandle,
528
 
                                        char* title)
 
522
                                        const char* title)
529
523
{
530
524
        GHOST_IWindow* window = (GHOST_IWindow*) windowhandle;
531
525
        
865
859
        GHOST_ISystem* system = GHOST_ISystem::getSystem();
866
860
        system->putClipboard(buffer, selection);
867
861
}
 
862
 
 
863
int GHOST_toggleConsole(int action)
 
864
{
 
865
        GHOST_ISystem* system = GHOST_ISystem::getSystem();
 
866
        return system->toggleConsole(action);
 
867
}
 
868
 
 
869
 
 
870
int GHOST_confirmQuit(GHOST_WindowHandle windowhandle){
 
871
        GHOST_ISystem* system = GHOST_ISystem::getSystem();
 
872
        return system->confirmQuit((GHOST_IWindow*) windowhandle);
 
873
}