forked from bartvdbraak/blender
Some notes for those who try to follow this :)
- first work on getting area/screen handling back - added structure for where to put stuff, is still under review, wait a bit for docs? Campbell is working on removing every bad level include from sources, so we can safely rebuild the src/ directory.
This commit is contained in:
parent
58bf29e389
commit
372ee054c0
@ -230,6 +230,7 @@ PULIB += $(OCGDIR)/blender/readblenfile/$(DEBUG_DIR)libreadblenfile.a
|
||||
PULIB += $(OCGDIR)/blender/windowmanager/$(DEBUG_DIR)libwindowmanager.a
|
||||
PULIB += $(OCGDIR)/blender/ed_datafiles/libed_datafiles.a
|
||||
PULIB += $(OCGDIR)/blender/ed_screen/libed_screen.a
|
||||
PULIB += $(OCGDIR)/blender/ed_area/libed_area.a
|
||||
|
||||
ifeq ($(NAN_NO_KETSJI),true)
|
||||
PULIB += $(NAN_MOTO)/lib/libmoto.a
|
||||
|
@ -54,7 +54,6 @@ int BKE_read_file(struct bContext *C, char *dir, void *type_r);
|
||||
int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, void *type_r);
|
||||
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile);
|
||||
|
||||
void duplicatelist(struct ListBase *list1, struct ListBase *list2);
|
||||
void free_blender(void);
|
||||
void initglobals(void);
|
||||
|
||||
|
@ -187,7 +187,7 @@ bAction *copy_action (bAction *src)
|
||||
if (!src) return NULL;
|
||||
|
||||
dst= copy_libblock(src);
|
||||
duplicatelist(&(dst->chanbase), &(src->chanbase));
|
||||
BLI_duplicatelist(&(dst->chanbase), &(src->chanbase));
|
||||
|
||||
for (dchan=dst->chanbase.first, schan=src->chanbase.first; dchan; dchan=dchan->next, schan=schan->next){
|
||||
dchan->ipo = copy_ipo(dchan->ipo);
|
||||
@ -268,7 +268,7 @@ void copy_pose(bPose **dst, bPose *src, int copycon)
|
||||
|
||||
outPose= MEM_callocN(sizeof(bPose), "pose");
|
||||
|
||||
duplicatelist (&outPose->chanbase, &src->chanbase);
|
||||
BLI_duplicatelist (&outPose->chanbase, &src->chanbase);
|
||||
|
||||
if (copycon) {
|
||||
for (pchan=outPose->chanbase.first; pchan; pchan=pchan->next) {
|
||||
|
@ -178,7 +178,7 @@ static void copy_bonechildren (Bone* newBone, Bone* oldBone)
|
||||
Bone *curBone, *newChildBone;
|
||||
|
||||
/* Copy this bone's list*/
|
||||
duplicatelist (&newBone->childbase, &oldBone->childbase);
|
||||
BLI_duplicatelist (&newBone->childbase, &oldBone->childbase);
|
||||
|
||||
/* For each child in the list, update it's children*/
|
||||
newChildBone=newBone->childbase.first;
|
||||
@ -195,7 +195,7 @@ bArmature *copy_armature(bArmature *arm)
|
||||
Bone *oldBone, *newBone;
|
||||
|
||||
newArm= copy_libblock (arm);
|
||||
duplicatelist(&newArm->bonebase, &arm->bonebase);
|
||||
BLI_duplicatelist(&newArm->bonebase, &arm->bonebase);
|
||||
|
||||
/* Duplicate the childrens' lists*/
|
||||
newBone=newArm->bonebase.first;
|
||||
|
@ -177,22 +177,6 @@ void free_blender(void)
|
||||
free_nodesystem();
|
||||
}
|
||||
|
||||
void duplicatelist(ListBase *list1, ListBase *list2) /* copy from 2 to 1 */
|
||||
{
|
||||
struct Link *link1, *link2;
|
||||
|
||||
list1->first= list1->last= 0;
|
||||
|
||||
link2= list2->first;
|
||||
while(link2) {
|
||||
|
||||
link1= MEM_dupallocN(link2);
|
||||
BLI_addtail(list1, link1);
|
||||
|
||||
link2= link2->next;
|
||||
}
|
||||
}
|
||||
|
||||
static EditMesh theEditMesh;
|
||||
|
||||
void initglobals(void)
|
||||
|
@ -111,7 +111,7 @@ void copy_constraint_channels (ListBase *dst, ListBase *src)
|
||||
bConstraintChannel *dchan, *schan;
|
||||
|
||||
dst->first = dst->last = NULL;
|
||||
duplicatelist(dst, src);
|
||||
BLI_duplicatelist(dst, src);
|
||||
|
||||
for (dchan=dst->first, schan=src->first; dchan; dchan=dchan->next, schan=schan->next) {
|
||||
dchan->ipo = copy_ipo(schan->ipo);
|
||||
@ -126,7 +126,7 @@ void clone_constraint_channels (ListBase *dst, ListBase *src)
|
||||
bConstraintChannel *dchan, *schan;
|
||||
|
||||
dst->first = dst->last = NULL;
|
||||
duplicatelist(dst, src);
|
||||
BLI_duplicatelist(dst, src);
|
||||
|
||||
for (dchan=dst->first, schan=src->first; dchan; dchan=dchan->next, schan=schan->next) {
|
||||
id_us_plus((ID *)dchan->ipo);
|
||||
@ -1854,7 +1854,7 @@ static void pycon_copy (bConstraint *con, bConstraint *srccon)
|
||||
bPythonConstraint *opycon = (bPythonConstraint *)srccon->data;
|
||||
|
||||
pycon->prop = IDP_CopyProperty(opycon->prop);
|
||||
duplicatelist(&pycon->targets, &opycon->targets);
|
||||
BLI_duplicatelist(&pycon->targets, &opycon->targets);
|
||||
}
|
||||
|
||||
static void pycon_new_data (void *cdata)
|
||||
@ -3230,7 +3230,7 @@ void copy_constraints (ListBase *dst, ListBase *src)
|
||||
bConstraint *con, *srccon;
|
||||
|
||||
dst->first= dst->last= NULL;
|
||||
duplicatelist(dst, src);
|
||||
BLI_duplicatelist(dst, src);
|
||||
|
||||
for (con=dst->first, srccon=src->first; con; srccon=srccon->next, con=con->next) {
|
||||
bConstraintTypeInfo *cti= constraint_get_typeinfo(con);
|
||||
|
@ -283,7 +283,7 @@ Ipo *copy_ipo(Ipo *ipo)
|
||||
|
||||
ipon= copy_libblock(ipo);
|
||||
|
||||
duplicatelist(&(ipon->curve), &(ipo->curve));
|
||||
BLI_duplicatelist(&(ipon->curve), &(ipo->curve));
|
||||
|
||||
for(icu= ipo->curve.first; icu; icu= icu->next) {
|
||||
icu->bezt= MEM_dupallocN(icu->bezt);
|
||||
|
@ -154,7 +154,7 @@ Key *copy_key(Key *key)
|
||||
|
||||
keyn->ipo= copy_ipo(key->ipo);
|
||||
|
||||
duplicatelist(&keyn->block, &key->block);
|
||||
BLI_duplicatelist(&keyn->block, &key->block);
|
||||
|
||||
kb= key->block.first;
|
||||
kbn= keyn->block.first;
|
||||
|
@ -122,7 +122,7 @@ MetaBall *copy_mball(MetaBall *mb)
|
||||
|
||||
mbn= copy_libblock(mb);
|
||||
|
||||
duplicatelist(&mbn->elems, &mb->elems);
|
||||
BLI_duplicatelist(&mbn->elems, &mb->elems);
|
||||
|
||||
mbn->mat= MEM_dupallocN(mb->mat);
|
||||
for(a=0; a<mbn->totcol; a++) {
|
||||
|
@ -76,7 +76,7 @@ void copy_actionstrip (bActionStrip **dst, bActionStrip **src){
|
||||
dstrip->ipo->id.us++;
|
||||
|
||||
if (dstrip->modifiers.first) {
|
||||
duplicatelist (&dstrip->modifiers, &sstrip->modifiers);
|
||||
BLI_duplicatelist (&dstrip->modifiers, &sstrip->modifiers);
|
||||
}
|
||||
|
||||
}
|
||||
@ -87,7 +87,7 @@ void copy_nlastrips (ListBase *dst, ListBase *src)
|
||||
|
||||
dst->first=dst->last=NULL;
|
||||
|
||||
duplicatelist (dst, src);
|
||||
BLI_duplicatelist (dst, src);
|
||||
|
||||
/* Update specific data */
|
||||
if (!dst->first)
|
||||
@ -100,7 +100,7 @@ void copy_nlastrips (ListBase *dst, ListBase *src)
|
||||
strip->ipo->id.us++;
|
||||
if (strip->modifiers.first) {
|
||||
ListBase listb;
|
||||
duplicatelist (&listb, &strip->modifiers);
|
||||
BLI_duplicatelist (&listb, &strip->modifiers);
|
||||
strip->modifiers= listb;
|
||||
}
|
||||
}
|
||||
|
@ -806,11 +806,11 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
|
||||
*nnode= *node;
|
||||
BLI_addtail(&ntree->nodes, nnode);
|
||||
|
||||
duplicatelist(&nnode->inputs, &node->inputs);
|
||||
BLI_duplicatelist(&nnode->inputs, &node->inputs);
|
||||
for(sock= nnode->inputs.first; sock; sock= sock->next)
|
||||
sock->own_index= 0;
|
||||
|
||||
duplicatelist(&nnode->outputs, &node->outputs);
|
||||
BLI_duplicatelist(&nnode->outputs, &node->outputs);
|
||||
for(sock= nnode->outputs.first; sock; sock= sock->next) {
|
||||
sock->own_index= 0;
|
||||
sock->stack_index= 0;
|
||||
|
@ -117,6 +117,9 @@ void BLI_sortlist(struct ListBase *listbase, int (*cmp)(void *, void *));
|
||||
void BLI_freelist(struct ListBase *listbase);
|
||||
int BLI_countlist(struct ListBase *listbase);
|
||||
void BLI_freelinkN(ListBase *listbase, void *vlink);
|
||||
void BLI_duplicatelist(ListBase *list1, ListBase *list2); /* copy from 2 to 1 */
|
||||
|
||||
|
||||
void BLI_splitdirstring(char *di,char *fi);
|
||||
|
||||
struct DynamicList *BLI_dlist_from_listbase(struct ListBase *lb);
|
||||
|
@ -498,6 +498,23 @@ int BLI_findindex(ListBase *listbase, void *vlink)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void BLI_duplicatelist(ListBase *list1, ListBase *list2) /* copy from 2 to 1 */
|
||||
{
|
||||
struct Link *link1, *link2;
|
||||
|
||||
list1->first= list1->last= 0;
|
||||
|
||||
link2= list2->first;
|
||||
while(link2) {
|
||||
|
||||
link1= MEM_dupallocN(link2);
|
||||
BLI_addtail(list1, link1);
|
||||
|
||||
link2= link2->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*=====================================================================================*/
|
||||
/* Methods for access array (realloc) */
|
||||
/*=====================================================================================*/
|
||||
|
@ -38,10 +38,12 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
|
||||
CPPFLAGS += -I$(OPENGL_HEADERS)
|
||||
|
||||
# not very neat....
|
||||
CPPFLAGS += -I../../../blenkernel
|
||||
CPPFLAGS += -I../../../blenlib
|
||||
CPPFLAGS += -I../../../makesdna
|
||||
CPPFLAGS += -I../../../imbuf
|
||||
CPPFLAGS += -I../../windowmanager
|
||||
CPPFLAGS += -I../../blenloader
|
||||
CPPFLAGS += -I../../blenkernel
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../imbuf
|
||||
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
|
||||
|
||||
# own include
|
||||
|
246
source/blender/editors/area/space.c
Normal file
246
source/blender/editors/area/space.c
Normal file
@ -0,0 +1,246 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2007 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_arithb.h"
|
||||
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_colortools.h"
|
||||
|
||||
#include "BLO_readfile.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
|
||||
#include "ED_area.h"
|
||||
#include "ED_screen.h"
|
||||
|
||||
void freespacelist(ScrArea *sa)
|
||||
{
|
||||
SpaceLink *sl;
|
||||
|
||||
for (sl= sa->spacedata.first; sl; sl= sl->next) {
|
||||
if(sl->spacetype==SPACE_FILE) {
|
||||
SpaceFile *sfile= (SpaceFile*) sl;
|
||||
if(sfile->libfiledata)
|
||||
BLO_blendhandle_close(sfile->libfiledata);
|
||||
if(sfile->filelist)
|
||||
; // XXX freefilelist(sfile);
|
||||
if(sfile->pupmenu)
|
||||
MEM_freeN(sfile->pupmenu);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_BUTS) {
|
||||
SpaceButs *buts= (SpaceButs*) sl;
|
||||
// if(buts->ri) {
|
||||
// if (buts->ri->rect) MEM_freeN(buts->ri->rect);
|
||||
// MEM_freeN(buts->ri);
|
||||
// XXX }
|
||||
if(G.buts==buts) G.buts= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IPO) {
|
||||
SpaceIpo *si= (SpaceIpo*) sl;
|
||||
if(si->editipo) MEM_freeN(si->editipo);
|
||||
// XXX free_ipokey(&si->ipokey);
|
||||
if(G.sipo==si) G.sipo= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_VIEW3D) {
|
||||
View3D *vd= (View3D*) sl;
|
||||
if(vd->bgpic) {
|
||||
if(vd->bgpic->ima) vd->bgpic->ima->id.us--;
|
||||
MEM_freeN(vd->bgpic);
|
||||
}
|
||||
if(vd->localvd) MEM_freeN(vd->localvd);
|
||||
if(vd->clipbb) MEM_freeN(vd->clipbb);
|
||||
if(vd->depths) {
|
||||
// XXX if(vd->depths->depths) MEM_freeN(vd->depths->depths);
|
||||
MEM_freeN(vd->depths);
|
||||
vd->depths= NULL;
|
||||
}
|
||||
// XXX retopo_free_view_data(vd);
|
||||
if(vd->properties_storage) MEM_freeN(vd->properties_storage);
|
||||
if(G.vd==vd) G.vd= NULL;
|
||||
if(vd->ri) {
|
||||
// XXX BIF_view3d_previewrender_free(vd);
|
||||
}
|
||||
}
|
||||
else if(sl->spacetype==SPACE_OOPS) {
|
||||
// XXX SpaceOops *so= (SpaceOops *) sl;
|
||||
// XXX free_oopspace(so);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMASEL) {
|
||||
// XXX SpaceImaSel *simasel= (SpaceImaSel*) sl;
|
||||
// XXX free_imasel(simasel);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_ACTION) {
|
||||
// XXX free_actionspace((SpaceAction*)sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_NLA){
|
||||
/* free_nlaspace((SpaceNla*)sl); */
|
||||
}
|
||||
else if(sl->spacetype==SPACE_TEXT) {
|
||||
// XXX free_textspace((SpaceText *)sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_SCRIPT) {
|
||||
// XXX free_scriptspace((SpaceScript *)sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_SOUND) {
|
||||
// XXX free_soundspace((SpaceSound *)sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMAGE) {
|
||||
SpaceImage *sima= (SpaceImage *)sl;
|
||||
if(sima->cumap)
|
||||
curvemapping_free(sima->cumap);
|
||||
if(sima->info_str)
|
||||
MEM_freeN(sima->info_str);
|
||||
if(sima->info_spare)
|
||||
MEM_freeN(sima->info_spare);
|
||||
if(sima->spare)
|
||||
IMB_freeImBuf(sima->spare);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_NODE) {
|
||||
/* SpaceNode *snode= (SpaceNode *)sl; */
|
||||
}
|
||||
}
|
||||
|
||||
BLI_freelistN(&sa->spacedata);
|
||||
}
|
||||
|
||||
/* can be called for area-full, so it should keep interesting stuff */
|
||||
void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2)
|
||||
{
|
||||
SpaceLink *sl;
|
||||
|
||||
BLI_duplicatelist(lb1, lb2);
|
||||
|
||||
/* lb1 is copy from lb2, from lb2 we free stuff, rely on event system to properly re-alloc */
|
||||
|
||||
sl= lb2->first;
|
||||
while(sl) {
|
||||
if(sl->spacetype==SPACE_FILE) {
|
||||
SpaceFile *sfile= (SpaceFile*) sl;
|
||||
sfile->libfiledata= NULL;
|
||||
sfile->filelist= NULL;
|
||||
sfile->pupmenu= NULL;
|
||||
sfile->menup= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_VIEW3D) {
|
||||
View3D *v3d= (View3D*)sl;
|
||||
// XXX BIF_view3d_previewrender_free(v3d);
|
||||
v3d->depths= NULL;
|
||||
v3d->retopo_view_data= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_OOPS) {
|
||||
SpaceOops *so= (SpaceOops *)sl;
|
||||
so->oops.first= so->oops.last= NULL;
|
||||
so->tree.first= so->tree.last= NULL;
|
||||
so->treestore= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMASEL) {
|
||||
SpaceImaSel *simasel= (SpaceImaSel*) sl;
|
||||
simasel->pupmenu= NULL;
|
||||
simasel->menup= NULL;
|
||||
// XXX simasel->files = BIF_filelist_new();
|
||||
// XXX BIF_filelist_setdir(simasel->files, simasel->dir);
|
||||
// XXX BIF_filelist_settype(simasel->files, simasel->type);
|
||||
/* see SPACE_FILE - elubie */
|
||||
}
|
||||
else if(sl->spacetype==SPACE_NODE) {
|
||||
SpaceNode *snode= (SpaceNode *)sl;
|
||||
snode->nodetree= NULL;
|
||||
}
|
||||
|
||||
sl= sl->next;
|
||||
}
|
||||
|
||||
/* but some things we copy */
|
||||
|
||||
sl= lb1->first;
|
||||
while(sl) {
|
||||
sl->area= newarea;
|
||||
|
||||
if(sl->spacetype==SPACE_BUTS) {
|
||||
SpaceButs *buts= (SpaceButs *)sl;
|
||||
buts->ri= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_FILE) {
|
||||
SpaceFile *sfile= (SpaceFile*) sl;
|
||||
sfile->menup= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IPO) {
|
||||
SpaceIpo *si= (SpaceIpo *)sl;
|
||||
si->editipo= NULL;
|
||||
si->ipokey.first= si->ipokey.last= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_VIEW3D) {
|
||||
View3D *vd= (View3D *)sl;
|
||||
if(vd->bgpic) {
|
||||
vd->bgpic= MEM_dupallocN(vd->bgpic);
|
||||
if(vd->bgpic->ima) vd->bgpic->ima->id.us++;
|
||||
}
|
||||
vd->clipbb= MEM_dupallocN(vd->clipbb);
|
||||
vd->ri= NULL;
|
||||
vd->properties_storage= NULL;
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMAGE) {
|
||||
SpaceImage *sima= (SpaceImage *)sl;
|
||||
if(sima->cumap)
|
||||
sima->cumap= curvemapping_copy(sima->cumap);
|
||||
if(sima->info_str)
|
||||
sima->info_str= MEM_dupallocN(sima->info_str);
|
||||
if(sima->info_spare)
|
||||
sima->info_spare= MEM_dupallocN(sima->info_spare);
|
||||
}
|
||||
sl= sl->next;
|
||||
}
|
||||
|
||||
/* again: from old View3D restore localview (because full) */
|
||||
sl= lb2->first;
|
||||
while(sl) {
|
||||
if(sl->spacetype==SPACE_VIEW3D) {
|
||||
View3D *v3d= (View3D*) sl;
|
||||
if(v3d->localvd) {
|
||||
// XXX restore_localviewdata(v3d);
|
||||
v3d->localvd= NULL;
|
||||
v3d->properties_storage= NULL;
|
||||
v3d->localview= 0;
|
||||
v3d->lay &= 0xFFFFFF;
|
||||
}
|
||||
}
|
||||
sl= sl->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
43
source/blender/editors/include/ED_area.h
Normal file
43
source/blender/editors/include/ED_area.h
Normal file
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef ED_AREA_H
|
||||
#define ED_AREA_H
|
||||
|
||||
|
||||
#include "DNA_screen_types.h"
|
||||
#include "DNA_space_types.h"
|
||||
#include "DNA_view2d_types.h"
|
||||
#include "DNA_view3d_types.h"
|
||||
|
||||
void freespacelist(ScrArea *sa);
|
||||
void duplicatespacelist(ScrArea *newarea, struct ListBase *lb1, struct ListBase *lb2);
|
||||
|
||||
|
||||
|
||||
#endif /* ED_AREA_H */
|
||||
|
33
source/blender/editors/include/ED_interface.h
Normal file
33
source/blender/editors/include/ED_interface.h
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef ED_INTERFACE_H
|
||||
#define ED_INTERFACE_H
|
||||
|
||||
|
||||
#endif /* ED_INTERFACE_H */
|
||||
|
33
source/blender/editors/include/ED_mesh.h
Normal file
33
source/blender/editors/include/ED_mesh.h
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef ED_AREA_H
|
||||
#define ED_AREA_H
|
||||
|
||||
|
||||
#endif /* ED_AREA_H */
|
||||
|
33
source/blender/editors/include/ED_object.h
Normal file
33
source/blender/editors/include/ED_object.h
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef ED_OBJECT_H
|
||||
#define ED_OBJECT_H
|
||||
|
||||
|
||||
#endif /* ED_OBJECT_H */
|
||||
|
34
source/blender/editors/include/ED_screen.h
Normal file
34
source/blender/editors/include/ED_screen.h
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef ED_SCREEN_H
|
||||
#define ED_SCREEN_H
|
||||
|
||||
#include "DNA_screen_types.h"
|
||||
|
||||
#endif /* ED_SCREEN_H */
|
||||
|
33
source/blender/editors/include/ED_transform.h
Normal file
33
source/blender/editors/include/ED_transform.h
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* $Id:
|
||||
*
|
||||
* ***** BEGIN GPL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Contributor(s): Blender Foundation
|
||||
*
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
#ifndef ED_TRANSFORM_H
|
||||
#define ED_TRANSFORM_H
|
||||
|
||||
|
||||
#endif /* ED_TRANSFORM_H */
|
||||
|
52
source/blender/editors/interface/Makefile
Normal file
52
source/blender/editors/interface/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#
|
||||
# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2007 Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Makes module object directory and bounces make to subdirectories.
|
||||
|
||||
LIBNAME = ed_screen
|
||||
DIR = $(OCGDIR)/blender/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
CFLAGS += $(LEVEL_1_C_WARNINGS)
|
||||
|
||||
CPPFLAGS += -I$(OPENGL_HEADERS)
|
||||
|
||||
CPPFLAGS += -I$(NAN_BMFONT)/include
|
||||
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
|
||||
|
||||
CPPFLAGS += -I../../windowmanager
|
||||
CPPFLAGS += -I../../blenkernel
|
||||
CPPFLAGS += -I../../blenloader
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../imbuf
|
||||
|
||||
# own include
|
||||
|
||||
CPPFLAGS += -I../include
|
52
source/blender/editors/mesh/Makefile
Normal file
52
source/blender/editors/mesh/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#
|
||||
# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2007 Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Makes module object directory and bounces make to subdirectories.
|
||||
|
||||
LIBNAME = ed_screen
|
||||
DIR = $(OCGDIR)/blender/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
CFLAGS += $(LEVEL_1_C_WARNINGS)
|
||||
|
||||
CPPFLAGS += -I$(OPENGL_HEADERS)
|
||||
|
||||
CPPFLAGS += -I$(NAN_BMFONT)/include
|
||||
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
|
||||
|
||||
CPPFLAGS += -I../../windowmanager
|
||||
CPPFLAGS += -I../../blenkernel
|
||||
CPPFLAGS += -I../../blenloader
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../imbuf
|
||||
|
||||
# own include
|
||||
|
||||
CPPFLAGS += -I../include
|
52
source/blender/editors/object/Makefile
Normal file
52
source/blender/editors/object/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#
|
||||
# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2007 Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Makes module object directory and bounces make to subdirectories.
|
||||
|
||||
LIBNAME = ed_screen
|
||||
DIR = $(OCGDIR)/blender/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
CFLAGS += $(LEVEL_1_C_WARNINGS)
|
||||
|
||||
CPPFLAGS += -I$(OPENGL_HEADERS)
|
||||
|
||||
CPPFLAGS += -I$(NAN_BMFONT)/include
|
||||
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
|
||||
|
||||
CPPFLAGS += -I../../windowmanager
|
||||
CPPFLAGS += -I../../blenkernel
|
||||
CPPFLAGS += -I../../blenloader
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../imbuf
|
||||
|
||||
# own include
|
||||
|
||||
CPPFLAGS += -I../include
|
@ -37,13 +37,16 @@ CFLAGS += $(LEVEL_1_C_WARNINGS)
|
||||
|
||||
CPPFLAGS += -I$(OPENGL_HEADERS)
|
||||
|
||||
# not very neat....
|
||||
CPPFLAGS += -I../../../blenkernel
|
||||
CPPFLAGS += -I../../../blenlib
|
||||
CPPFLAGS += -I../../../makesdna
|
||||
CPPFLAGS += -I../../../imbuf
|
||||
CPPFLAGS += -I$(NAN_BMFONT)/include
|
||||
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
|
||||
|
||||
CPPFLAGS += -I../../windowmanager
|
||||
CPPFLAGS += -I../../blenkernel
|
||||
CPPFLAGS += -I../../blenloader
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../imbuf
|
||||
|
||||
# own include
|
||||
|
||||
CPPFLAGS += -I../include
|
||||
|
@ -26,7 +26,32 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
void unlink_screen()
|
||||
#include "WM_api.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "ED_area.h"
|
||||
#include "ED_screen.h"
|
||||
|
||||
|
||||
static void del_area(ScrArea *sa)
|
||||
{
|
||||
/* bad level to blenkernel, solve */
|
||||
|
||||
freespacelist(sa);
|
||||
|
||||
// uiFreeBlocks(&sa->uiblocks);
|
||||
// uiFreePanels(&sa->panels);
|
||||
|
||||
// BPY_free_scriptlink(&sa->scriptlink);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* bad level to blenkernel, solve */
|
||||
void unlink_screen(bScreen *sc)
|
||||
{
|
||||
ScrArea *sa;
|
||||
|
||||
for (sa= sc->areabase.first; sa; sa= sa->next)
|
||||
del_area(sa);
|
||||
}
|
52
source/blender/editors/transform/Makefile
Normal file
52
source/blender/editors/transform/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
#
|
||||
# $Id: Makefile 14 2002-10-13 15:57:19Z hans $
|
||||
#
|
||||
# ***** BEGIN GPL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2007 Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
#
|
||||
# Makes module object directory and bounces make to subdirectories.
|
||||
|
||||
LIBNAME = ed_screen
|
||||
DIR = $(OCGDIR)/blender/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
CFLAGS += $(LEVEL_1_C_WARNINGS)
|
||||
|
||||
CPPFLAGS += -I$(OPENGL_HEADERS)
|
||||
|
||||
CPPFLAGS += -I$(NAN_BMFONT)/include
|
||||
CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
|
||||
|
||||
CPPFLAGS += -I../../windowmanager
|
||||
CPPFLAGS += -I../../blenkernel
|
||||
CPPFLAGS += -I../../blenloader
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../imbuf
|
||||
|
||||
# own include
|
||||
|
||||
CPPFLAGS += -I../include
|
@ -40,7 +40,6 @@
|
||||
#include "BKE_scene.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BIF_toolbox.h" /* error() */
|
||||
|
||||
#include "BLO_sys_types.h"
|
||||
|
||||
@ -501,7 +500,7 @@ void start_qt(struct RenderData *rd, int rectx, int recty) {
|
||||
|
||||
if(err != noErr) {
|
||||
G.afbreek = 1;
|
||||
error("Unable to create Quicktime movie: %s", name);
|
||||
// XXX error("Unable to create Quicktime movie: %s", name);
|
||||
} else {
|
||||
printf("Created QuickTime movie: %s\n", name);
|
||||
|
||||
|
@ -53,6 +53,8 @@ void WM_write_autosave (struct bContext *C);
|
||||
/* mouse cursors */
|
||||
void WM_init_cursor_data (void);
|
||||
void WM_set_cursor (struct bContext *C, int curs);
|
||||
void WM_waitcursor (struct bContext *C, int val);
|
||||
void WM_timecursor (struct bContext *C, int nr);
|
||||
|
||||
/* keymap and handlers */
|
||||
void WM_keymap_set_item (ListBase *lb, char *idname, short type,
|
||||
|
@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "GHOST_C-api.h"
|
||||
|
||||
@ -100,32 +101,80 @@ void WM_set_cursor(bContext *C, int curs)
|
||||
}
|
||||
|
||||
GHOST_SetCursorVisibility(win->ghostwin, 1);
|
||||
|
||||
|
||||
LastCursor=CurrentCursor;
|
||||
CurrentCursor=curs;
|
||||
|
||||
/* previous cursor? */
|
||||
if (curs==LASTCURSOR) curs=LastCursor;
|
||||
|
||||
/* detect if we use system cursor or Blender cursor */
|
||||
if(curs>=BC_GHOST_CURSORS) {
|
||||
GHOST_SetCursorShape(win->ghostwin, convert_cursor(curs));
|
||||
return;
|
||||
}
|
||||
|
||||
if ((curs<LASTCURSOR)||(curs>=BC_NUMCURSORS)) return;
|
||||
|
||||
|
||||
LastCursor=CurrentCursor;
|
||||
CurrentCursor=curs;
|
||||
|
||||
if (curs==LASTCURSOR) curs=LastCursor;
|
||||
|
||||
if (curs==SYSCURSOR) { /* System default Cursor */
|
||||
GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD));
|
||||
}
|
||||
else if ( (U.curssize==0) || (BlenderCursor[curs]->big_bm == NULL) ) {
|
||||
window_set_custom_cursor_ex(win, BlenderCursor[curs], 0);
|
||||
}
|
||||
else {
|
||||
window_set_custom_cursor_ex(win, BlenderCursor[curs], 1);
|
||||
if ((curs<LASTCURSOR)||(curs>=BC_NUMCURSORS)) return;
|
||||
|
||||
if (curs==SYSCURSOR) { /* System default Cursor */
|
||||
GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD));
|
||||
}
|
||||
else if ( (U.curssize==0) || (BlenderCursor[curs]->big_bm == NULL) ) {
|
||||
window_set_custom_cursor_ex(win, BlenderCursor[curs], 0);
|
||||
}
|
||||
else {
|
||||
window_set_custom_cursor_ex(win, BlenderCursor[curs], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WM_waitcursor(bContext *C, int val)
|
||||
{
|
||||
if(C->window) {
|
||||
if(val) {
|
||||
WM_set_cursor(C, CURSOR_WAIT);
|
||||
} else {
|
||||
WM_set_cursor(C, LASTCURSOR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void WM_timecursor(bContext *C, int nr)
|
||||
{
|
||||
/* 10 8x8 digits */
|
||||
static char number_bitmaps[10][8]= {
|
||||
{0, 56, 68, 68, 68, 68, 68, 56},
|
||||
{0, 24, 16, 16, 16, 16, 16, 56},
|
||||
{0, 60, 66, 32, 16, 8, 4, 126},
|
||||
{0, 124, 32, 16, 56, 64, 66, 60},
|
||||
{0, 32, 48, 40, 36, 126, 32, 32},
|
||||
{0, 124, 4, 60, 64, 64, 68, 56},
|
||||
{0, 56, 4, 4, 60, 68, 68, 56},
|
||||
{0, 124, 64, 32, 16, 8, 8, 8},
|
||||
{0, 60, 66, 66, 60, 66, 66, 60},
|
||||
{0, 56, 68, 68, 120, 64, 68, 56}
|
||||
};
|
||||
unsigned char mask[16][2];
|
||||
unsigned char bitmap[16][2];
|
||||
int i, idx;
|
||||
|
||||
memset(&bitmap, 0x00, sizeof(bitmap));
|
||||
memset(&mask, 0xFF, sizeof(mask));
|
||||
|
||||
/* print number bottom right justified */
|
||||
for (idx= 3; nr && idx>=0; idx--) {
|
||||
char *digit= number_bitmaps[nr%10];
|
||||
int x = idx%2;
|
||||
int y = idx/2;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
bitmap[i + y*8][x]= digit[i];
|
||||
nr/= 10;
|
||||
}
|
||||
|
||||
window_set_custom_cursor(C->window, mask, bitmap, 7, 7);
|
||||
}
|
||||
|
||||
|
||||
/* ******************************************************************
|
||||
Custom Cursor Description:
|
||||
|
||||
|
@ -378,12 +378,10 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
/* with borders */
|
||||
G.windowstate = G_WINDOWSTATE_BORDER;
|
||||
/* with borders XXX OLD CRUFT!*/
|
||||
break;
|
||||
case 'W':
|
||||
/* borderless, win + linux */
|
||||
G.windowstate = G_WINDOWSTATE_FULLSCREEN;
|
||||
/* borderless, win + linux XXX OLD CRUFT */
|
||||
break;
|
||||
case 'R':
|
||||
/* Registering filetypes only makes sense on windows... */
|
||||
|
Loading…
Reference in New Issue
Block a user